@code-yeongyu/senpi 2026.6.4 → 2026.6.6-3
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 +39 -1
- package/README.md +19 -4
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/register-bedrock.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.js.map +1 -1
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +12 -2
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/cli/initial-message.d.ts +1 -1
- package/dist/cli/initial-message.d.ts.map +1 -1
- package/dist/cli/initial-message.js.map +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/cli-main.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +0 -8
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +32 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +51 -79
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-guidance.d.ts.map +1 -1
- package/dist/core/auth-guidance.js.map +1 -1
- package/dist/core/auth-storage.d.ts +4 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +4 -8
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/build.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/build.js.map +1 -1
- package/dist/core/dynamic-prompt/exploration.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/exploration.js.map +1 -1
- package/dist/core/dynamic-prompt/identity.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/identity.js.map +1 -1
- package/dist/core/dynamic-prompt/index.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/intent-gate.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/intent-gate.js.map +1 -1
- package/dist/core/dynamic-prompt/parallel-tools.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/parallel-tools.js.map +1 -1
- package/dist/core/dynamic-prompt/policies.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/policies.js.map +1 -1
- package/dist/core/dynamic-prompt/style.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/style.js.map +1 -1
- package/dist/core/dynamic-prompt/tool-categorization.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/tool-categorization.js.map +1 -1
- package/dist/core/dynamic-prompt/tool-section.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/tool-section.js.map +1 -1
- package/dist/core/dynamic-prompt/types.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/verification.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/verification.js.map +1 -1
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/builtin/anthropic-bash/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/anthropic-bash/index.js.map +1 -1
- package/dist/core/extensions/builtin/anthropic-web-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/anthropic-web-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/index.js.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/timeout.d.ts.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/timeout.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/checkpoint-state.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/circuit-breaker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/circuit-breaker.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/context-reduction.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/context-reduction.js +1 -1
- package/dist/core/extensions/builtin/compaction/context-reduction.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/degradation-monitor.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/degradation-monitor.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/overflow-detection.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/overflow-detection.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/per-turn-cap.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/per-turn-cap.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/policy.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/policy.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/prompts.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/prompts.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/repair-tool-pairs.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/repair-tool-pairs.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/restoration-tracker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/restoration-tracker.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/state.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/todo-bridge.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/todo-bridge.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/tool-truncation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/tool-truncation.js.map +1 -1
- package/dist/core/extensions/builtin/diff.d.ts.map +1 -1
- package/dist/core/extensions/builtin/diff.js.map +1 -1
- package/dist/core/extensions/builtin/files.d.ts.map +1 -1
- package/dist/core/extensions/builtin/files.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/constants.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/constants.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.js +0 -2
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/params.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/params.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/parser.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/parser.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-diff.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-diff.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-replace.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-replace.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview-format.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview-format.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/seek-sequence.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/seek-sequence.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.js +7 -5
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-render.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-render.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/text.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/text.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/workspace.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/workspace.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/filter.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/filter.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/indexer.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/indexer.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/overlay.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/overlay.js +3 -6
- package/dist/core/extensions/builtin/history-search/overlay.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/kimi-web-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/kimi-web-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/openai-web-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/openai-web-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/arity.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/arity.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/cli.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/cli.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/config.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/config.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/evaluate.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/evaluate.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/events.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/events.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/external-dir.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/external-dir.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/index.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/non-interactive.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/non-interactive.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.js +3 -1
- package/dist/core/extensions/builtin/permission-system/parsers.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/prompt.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/service.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/service.js +2 -5
- package/dist/core/extensions/builtin/permission-system/service.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/settings.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/storage.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/storage.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/types.js +3 -5
- package/dist/core/extensions/builtin/permission-system/types.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/wildcard.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/wildcard.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/file-operations.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/file-operations.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/index.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-6.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-6.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-url-widget.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-url-widget.js.map +1 -1
- package/dist/core/extensions/builtin/redraws.d.ts.map +1 -1
- package/dist/core/extensions/builtin/redraws.js.map +1 -1
- package/dist/core/extensions/builtin/service-tier.d.ts.map +1 -1
- package/dist/core/extensions/builtin/service-tier.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/index.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/loader.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/loader.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay-format.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay-format.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay.js +13 -18
- package/dist/core/extensions/builtin/session-observer/overlay.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/scanner.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/scanner.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/text.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/text.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-entries.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-entries.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-format.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-format.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/system-messages.d.ts.map +1 -1
- package/dist/core/extensions/builtin/system-messages.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/continuation/config.d.ts +1 -1
- package/dist/core/extensions/builtin/todotools/continuation/config.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/continuation/config.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/continuation/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/continuation/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/continuation/prompt.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/continuation/runtime.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/continuation/runtime.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/settings.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/state.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/system-messages.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/system-messages.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todoread.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todoread.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todowrite.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todowrite.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/index.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-chat-completions-payload.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-chat-completions-payload.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-responses-payload.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-responses-payload.js.map +1 -1
- package/dist/core/extensions/builtin/tps.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tps.js.map +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +35 -43
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +1 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +17 -18
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/keybindings.d.ts +1 -1
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +0 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +8 -10
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/output-guard.d.ts.map +1 -1
- package/dist/core/output-guard.js.map +1 -1
- package/dist/core/package-manager.d.ts +1 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +25 -13
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-attribution.d.ts.map +1 -1
- package/dist/core/provider-attribution.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader.d.ts +1 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +26 -53
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-cwd.d.ts.map +1 -1
- package/dist/core/session-cwd.js +0 -1
- package/dist/core/session-cwd.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +7 -11
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-work-barrier.d.ts.map +1 -1
- package/dist/core/session-work-barrier.js +5 -3
- package/dist/core/session-work-barrier.js.map +1 -1
- package/dist/core/settings-manager.d.ts +10 -2
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +77 -46
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/telemetry.d.ts.map +1 -1
- package/dist/core/telemetry.js.map +1 -1
- package/dist/core/thinking-levels.d.ts.map +1 -1
- package/dist/core/thinking-levels.js.map +1 -1
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +9 -6
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/diff-render.d.ts.map +1 -1
- package/dist/core/tools/diff-render.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
- package/dist/core/tools/file-mutation-queue.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +1 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +12 -18
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/path-utils.d.ts.map +1 -1
- package/dist/core/tools/path-utils.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +1 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +1 -2
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts +9 -0
- package/dist/core/trust-manager.d.ts.map +1 -0
- package/dist/core/trust-manager.js +133 -0
- package/dist/core/trust-manager.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +54 -2
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/armin.d.ts.map +1 -1
- package/dist/modes/interactive/components/armin.js +6 -10
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +2 -11
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +6 -11
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +0 -3
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +1 -3
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +1 -3
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +5 -15
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js +0 -5
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +1 -8
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +1 -6
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
- package/dist/modes/interactive/components/daxnuts.js +6 -8
- package/dist/modes/interactive/components/daxnuts.js.map +1 -1
- package/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js +2 -2
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js +0 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +1 -6
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +2 -8
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +1 -9
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/favorite-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/favorite-models-selector.js +9 -15
- package/dist/modes/interactive/components/favorite-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +10 -3
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +3 -9
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-favorites.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-favorites.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +9 -22
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +3 -12
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +33 -58
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +0 -4
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.js +0 -1
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +1 -3
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js +0 -2
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +0 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +9 -28
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +18 -32
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts +20 -0
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/trust-selector.js +81 -0
- package/dist/modes/interactive/components/trust-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +3 -6
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +0 -1
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +24 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +112 -101
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/session-info-format.d.ts.map +1 -1
- package/dist/modes/interactive/session-info-format.js.map +1 -1
- package/dist/modes/interactive/startup-tools.d.ts.map +1 -1
- package/dist/modes/interactive/startup-tools.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +0 -6
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/working-status.d.ts.map +1 -1
- package/dist/modes/interactive/working-status.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/provider-native-rendering.d.ts.map +1 -1
- package/dist/modes/provider-native-rendering.js.map +1 -1
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +7 -8
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +56 -9
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/self-update-bootstrap.d.ts.map +1 -1
- package/dist/self-update-bootstrap.js.map +1 -1
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard-native.d.ts.map +1 -1
- package/dist/utils/clipboard-native.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/deprecation.d.ts.map +1 -1
- package/dist/utils/deprecation.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/fs-watch.d.ts.map +1 -1
- package/dist/utils/fs-watch.js.map +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/html.d.ts.map +1 -1
- package/dist/utils/html.js.map +1 -1
- package/dist/utils/image-convert.d.ts.map +1 -1
- package/dist/utils/image-convert.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/image-resize-worker.d.ts.map +1 -1
- package/dist/utils/image-resize-worker.js.map +1 -1
- package/dist/utils/image-resize.d.ts.map +1 -1
- package/dist/utils/image-resize.js.map +1 -1
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/mime.d.ts.map +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/photon.d.ts.map +1 -1
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/pi-user-agent.d.ts.map +1 -1
- package/dist/utils/pi-user-agent.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/sleep.d.ts.map +1 -1
- package/dist/utils/sleep.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/windows-self-update.d.ts.map +1 -1
- package/dist/utils/windows-self-update.js.map +1 -1
- package/docs/extensions.md +1 -1
- package/docs/packages.md +3 -1
- package/docs/prompt-templates.md +1 -1
- package/docs/settings.md +10 -0
- package/docs/skills.md +3 -3
- package/docs/themes.md +1 -1
- package/docs/usage.md +15 -3
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/minimal-mode.ts +6 -6
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +7 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +2 -27
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +7 -20
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +0 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +0 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +0 -7
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +3 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +0 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/uuid.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/uuid.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +0 -16
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/node.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +6 -6
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/bedrock-provider.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cli.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cli.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +30 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +30 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +174 -29
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +178 -54
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/oauth.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot-headers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot-headers.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +0 -7
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-prompt-cache.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-prompt-cache.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/register-builtins.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/register-builtins.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/session-resources.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/session-resources.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.js +10 -8
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/hermes.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/hermes.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/json-mix.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/json-mix.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/morph-xml.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/morph-xml.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/xml-tool-tag-scanner.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/xml-tool-tag-scanner.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/yaml-xml.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/yaml-xml.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +3 -7
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/hash.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/hash.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/oauth-page.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/oauth-page.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/pkce.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/pkce.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-pair-repair.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-pair-repair.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +5 -5
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +0 -3
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js +1 -6
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js +4 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +43 -54
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js +0 -8
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +14 -14
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +11 -13
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +0 -11
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +4 -9
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +4 -12
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +0 -8
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js +0 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +2 -4
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/slash-command-autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/slash-command-autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +4 -6
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +24 -29
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +25 -27
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +14 -12
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@types/node/README.md +3 -3
- package/node_modules/@types/node/assert/strict.d.ts +3 -55
- package/node_modules/@types/node/assert.d.ts +49 -177
- package/node_modules/@types/node/async_hooks.d.ts +151 -43
- package/node_modules/@types/node/buffer.buffer.d.ts +2 -8
- package/node_modules/@types/node/buffer.d.ts +43 -212
- package/node_modules/@types/node/child_process.d.ts +23 -133
- package/node_modules/@types/node/cluster.d.ts +238 -384
- package/node_modules/@types/node/compatibility/iterators.d.ts +1 -0
- package/node_modules/@types/node/console.d.ts +45 -404
- package/node_modules/@types/node/constants.d.ts +3 -10
- package/node_modules/@types/node/crypto.d.ts +640 -1127
- package/node_modules/@types/node/dgram.d.ts +14 -77
- package/node_modules/@types/node/diagnostics_channel.d.ts +3 -29
- package/node_modules/@types/node/dns/promises.d.ts +4 -10
- package/node_modules/@types/node/dns.d.ts +130 -177
- package/node_modules/@types/node/domain.d.ts +12 -32
- package/node_modules/@types/node/events.d.ts +872 -840
- package/node_modules/@types/node/fs/promises.d.ts +193 -20
- package/node_modules/@types/node/fs.d.ts +754 -435
- package/node_modules/@types/node/globals.d.ts +8 -30
- package/node_modules/@types/node/globals.typedarray.d.ts +63 -0
- package/node_modules/@types/node/http.d.ts +363 -305
- package/node_modules/@types/node/http2.d.ts +545 -781
- package/node_modules/@types/node/https.d.ts +64 -243
- package/node_modules/@types/node/index.d.ts +26 -6
- package/node_modules/@types/node/inspector/promises.d.ts +35 -0
- package/node_modules/@types/node/inspector.d.ts +68 -57
- package/node_modules/@types/node/inspector.generated.d.ts +764 -410
- package/node_modules/@types/node/module.d.ts +53 -189
- package/node_modules/@types/node/net.d.ts +101 -207
- package/node_modules/@types/node/os.d.ts +11 -19
- package/node_modules/@types/node/package.json +13 -3
- package/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/node/path.d.ts +119 -141
- package/node_modules/@types/node/perf_hooks.d.ts +317 -673
- package/node_modules/@types/node/process.d.ts +277 -157
- package/node_modules/@types/node/punycode.d.ts +3 -31
- package/node_modules/@types/node/querystring.d.ts +3 -16
- package/node_modules/@types/node/quic.d.ts +897 -0
- package/node_modules/@types/node/readline/promises.d.ts +3 -6
- package/node_modules/@types/node/readline.d.ts +65 -152
- package/node_modules/@types/node/repl.d.ts +101 -109
- package/node_modules/@types/node/sea.d.ts +9 -115
- package/node_modules/@types/node/sqlite.d.ts +415 -68
- package/node_modules/@types/node/stream/consumers.d.ts +91 -15
- package/node_modules/@types/node/stream/iter.d.ts +301 -0
- package/node_modules/@types/node/stream/promises.d.ts +136 -15
- package/node_modules/@types/node/stream/web.d.ts +179 -501
- package/node_modules/@types/node/stream.d.ts +577 -490
- package/node_modules/@types/node/string_decoder.d.ts +3 -43
- package/node_modules/@types/node/test/reporters.d.ts +59 -0
- package/node_modules/@types/node/test.d.ts +402 -286
- package/node_modules/@types/node/timers/promises.d.ts +3 -18
- package/node_modules/@types/node/timers.d.ts +3 -141
- package/node_modules/@types/node/tls.d.ts +115 -241
- package/node_modules/@types/node/trace_events.d.ts +3 -97
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +2 -8
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +2 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +28 -6
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +119 -0
- package/node_modules/@types/node/tty.d.ts +57 -40
- package/node_modules/@types/node/url.d.ts +156 -584
- package/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/node/util.d.ts +167 -1096
- package/node_modules/@types/node/v8.d.ts +75 -15
- package/node_modules/@types/node/vm.d.ts +334 -198
- package/node_modules/@types/node/wasi.d.ts +24 -74
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
- package/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/node/web-globals/events.d.ts +9 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +14 -0
- package/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
- package/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- package/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/node/worker_threads.d.ts +280 -393
- package/node_modules/@types/node/zlib/iter.d.ts +131 -0
- package/node_modules/@types/node/zlib.d.ts +7 -165
- package/node_modules/undici-types/agent.d.ts +13 -12
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +13 -12
- package/node_modules/undici-types/cache-interceptor.d.ts +179 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +34 -19
- package/node_modules/undici-types/connector.d.ts +4 -2
- package/node_modules/undici-types/cookies.d.ts +2 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
- package/node_modules/undici-types/dispatcher.d.ts +127 -104
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
- package/node_modules/undici-types/errors.d.ts +82 -54
- package/node_modules/undici-types/eventsource.d.ts +9 -4
- package/node_modules/undici-types/fetch.d.ts +22 -20
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +8 -8
- package/node_modules/undici-types/header.d.ts +157 -1
- package/node_modules/undici-types/index.d.ts +67 -47
- package/node_modules/undici-types/interceptors.d.ts +71 -8
- package/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +6 -4
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +21 -20
- package/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -4
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +15 -13
- package/node_modules/undici-types/proxy-agent.d.ts +5 -4
- package/node_modules/undici-types/readable.d.ts +19 -16
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +19 -10
- package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +148 -29
- package/node_modules/undici-types/websocket.d.ts +48 -10
- package/npm-shrinkwrap.json +21 -21
- package/package.json +13 -8
- package/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
- package/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
|
@@ -1,46 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* The `node:stream` module provides an API for implementing the stream interface.
|
|
4
|
-
*
|
|
5
|
-
* There are many stream objects provided by Node.js. For instance, a [request to an HTTP server](https://nodejs.org/docs/latest-v22.x/api/http.html#class-httpincomingmessage)
|
|
6
|
-
* and [`process.stdout`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdout) are both stream instances.
|
|
7
|
-
*
|
|
8
|
-
* Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`](https://nodejs.org/docs/latest-v22.x/api/events.html#class-eventemitter).
|
|
9
|
-
*
|
|
10
|
-
* To access the `node:stream` module:
|
|
11
|
-
*
|
|
12
|
-
* ```js
|
|
13
|
-
* import stream from 'node:stream';
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* The `node:stream` module is useful for creating new types of stream instances.
|
|
17
|
-
* It is usually not necessary to use the `node:stream` module to consume streams.
|
|
18
|
-
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/stream.js)
|
|
19
|
-
*/
|
|
20
|
-
declare module "stream" {
|
|
1
|
+
declare module "node:stream" {
|
|
2
|
+
import { Blob } from "node:buffer";
|
|
21
3
|
import { Abortable, EventEmitter } from "node:events";
|
|
22
|
-
import
|
|
23
|
-
import * as
|
|
24
|
-
import * as streamWeb from "node:stream/web";
|
|
25
|
-
|
|
26
|
-
type ComposeFnParam = (source: any) => void;
|
|
27
|
-
|
|
4
|
+
import * as promises from "node:stream/promises";
|
|
5
|
+
import * as web from "node:stream/web";
|
|
28
6
|
class Stream extends EventEmitter {
|
|
7
|
+
/**
|
|
8
|
+
* @since v0.9.4
|
|
9
|
+
*/
|
|
29
10
|
pipe<T extends NodeJS.WritableStream>(
|
|
30
11
|
destination: T,
|
|
31
|
-
options?:
|
|
32
|
-
end?: boolean | undefined;
|
|
33
|
-
},
|
|
34
|
-
): T;
|
|
35
|
-
compose<T extends NodeJS.ReadableStream>(
|
|
36
|
-
stream: T | ComposeFnParam | Iterable<T> | AsyncIterable<T>,
|
|
37
|
-
options?: { signal: AbortSignal },
|
|
12
|
+
options?: Stream.PipeOptions,
|
|
38
13
|
): T;
|
|
39
14
|
}
|
|
40
15
|
namespace Stream {
|
|
41
|
-
export {
|
|
16
|
+
export { promises, Stream };
|
|
42
17
|
}
|
|
43
18
|
namespace Stream {
|
|
19
|
+
interface PipeOptions {
|
|
20
|
+
/**
|
|
21
|
+
* End the writer when the reader ends.
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
end?: boolean | undefined;
|
|
25
|
+
}
|
|
44
26
|
interface StreamOptions<T extends Stream> extends Abortable {
|
|
45
27
|
emitClose?: boolean | undefined;
|
|
46
28
|
highWaterMark?: number | undefined;
|
|
@@ -53,19 +35,49 @@ declare module "stream" {
|
|
|
53
35
|
encoding?: BufferEncoding | undefined;
|
|
54
36
|
read?: ((this: T, size: number) => void) | undefined;
|
|
55
37
|
}
|
|
56
|
-
interface
|
|
38
|
+
interface ReadableIteratorOptions {
|
|
57
39
|
/**
|
|
58
|
-
*
|
|
40
|
+
* When set to `false`, calling `return` on the async iterator,
|
|
41
|
+
* or exiting a `for await...of` iteration using a `break`,
|
|
42
|
+
* `return`, or `throw` will not destroy the stream.
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
destroyOnReturn?: boolean | undefined;
|
|
46
|
+
}
|
|
47
|
+
interface ReadableOperatorOptions extends Abortable {
|
|
48
|
+
/**
|
|
49
|
+
* The maximum concurrent invocations of `fn` to call
|
|
50
|
+
* on the stream at once.
|
|
59
51
|
* @default 1
|
|
60
52
|
*/
|
|
61
53
|
concurrency?: number | undefined;
|
|
62
|
-
/**
|
|
63
|
-
|
|
54
|
+
/**
|
|
55
|
+
* How many items to buffer while waiting for user consumption
|
|
56
|
+
* of the output.
|
|
57
|
+
* @default concurrency * 2 - 1
|
|
58
|
+
*/
|
|
59
|
+
highWaterMark?: number | undefined;
|
|
60
|
+
}
|
|
61
|
+
/** @deprecated Use `ReadableOperatorOptions` instead. */
|
|
62
|
+
interface ArrayOptions extends ReadableOperatorOptions {}
|
|
63
|
+
interface ReadableToWebOptions {
|
|
64
|
+
strategy?: web.QueuingStrategy | undefined;
|
|
65
|
+
type?: web.ReadableStreamType | undefined;
|
|
66
|
+
}
|
|
67
|
+
interface ReadableEventMap {
|
|
68
|
+
"close": [];
|
|
69
|
+
"data": [chunk: any];
|
|
70
|
+
"end": [];
|
|
71
|
+
"error": [err: Error];
|
|
72
|
+
"pause": [];
|
|
73
|
+
"readable": [];
|
|
74
|
+
"resume": [];
|
|
64
75
|
}
|
|
65
76
|
/**
|
|
66
77
|
* @since v0.9.4
|
|
67
78
|
*/
|
|
68
79
|
class Readable extends Stream implements NodeJS.ReadableStream {
|
|
80
|
+
constructor(options?: ReadableOptions);
|
|
69
81
|
/**
|
|
70
82
|
* A utility method for creating Readable Streams out of iterators.
|
|
71
83
|
* @since v12.3.0, v10.17.0
|
|
@@ -78,7 +90,7 @@ declare module "stream" {
|
|
|
78
90
|
* @since v17.0.0
|
|
79
91
|
*/
|
|
80
92
|
static fromWeb(
|
|
81
|
-
readableStream:
|
|
93
|
+
readableStream: web.ReadableStream,
|
|
82
94
|
options?: Pick<ReadableOptions, "encoding" | "highWaterMark" | "objectMode" | "signal">,
|
|
83
95
|
): Readable;
|
|
84
96
|
/**
|
|
@@ -86,16 +98,14 @@ declare module "stream" {
|
|
|
86
98
|
* @since v17.0.0
|
|
87
99
|
*/
|
|
88
100
|
static toWeb(
|
|
89
|
-
streamReadable:
|
|
90
|
-
options?:
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
): streamWeb.ReadableStream;
|
|
101
|
+
streamReadable: NodeJS.ReadableStream,
|
|
102
|
+
options?: ReadableToWebOptions,
|
|
103
|
+
): web.ReadableStream;
|
|
94
104
|
/**
|
|
95
105
|
* Returns whether the stream has been read from or cancelled.
|
|
96
106
|
* @since v16.8.0
|
|
97
107
|
*/
|
|
98
|
-
static isDisturbed(stream:
|
|
108
|
+
static isDisturbed(stream: NodeJS.ReadableStream | web.ReadableStream): boolean;
|
|
99
109
|
/**
|
|
100
110
|
* Returns whether the stream was destroyed or errored before emitting `'end'`.
|
|
101
111
|
* @since v16.8.0
|
|
@@ -118,16 +128,16 @@ declare module "stream" {
|
|
|
118
128
|
*/
|
|
119
129
|
readonly readableEncoding: BufferEncoding | null;
|
|
120
130
|
/**
|
|
121
|
-
* Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-
|
|
131
|
+
* Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v25.x/api/stream.html#event-end) event is emitted.
|
|
122
132
|
* @since v12.9.0
|
|
123
133
|
*/
|
|
124
134
|
readonly readableEnded: boolean;
|
|
125
135
|
/**
|
|
126
136
|
* This property reflects the current state of a `Readable` stream as described
|
|
127
|
-
* in the [Three states](https://nodejs.org/docs/latest-
|
|
137
|
+
* in the [Three states](https://nodejs.org/docs/latest-v25.x/api/stream.html#three-states) section.
|
|
128
138
|
* @since v9.4.0
|
|
129
139
|
*/
|
|
130
|
-
|
|
140
|
+
readableFlowing: boolean | null;
|
|
131
141
|
/**
|
|
132
142
|
* Returns the value of `highWaterMark` passed when creating this `Readable`.
|
|
133
143
|
* @since v9.3.0
|
|
@@ -160,7 +170,6 @@ declare module "stream" {
|
|
|
160
170
|
* @since v18.0.0
|
|
161
171
|
*/
|
|
162
172
|
readonly errored: Error | null;
|
|
163
|
-
constructor(opts?: ReadableOptions);
|
|
164
173
|
_construct?(callback: (error?: Error | null) => void): void;
|
|
165
174
|
_read(size: number): void;
|
|
166
175
|
/**
|
|
@@ -444,16 +453,46 @@ declare module "stream" {
|
|
|
444
453
|
*/
|
|
445
454
|
wrap(stream: NodeJS.ReadableStream): this;
|
|
446
455
|
push(chunk: any, encoding?: BufferEncoding): boolean;
|
|
456
|
+
/**
|
|
457
|
+
* ```js
|
|
458
|
+
* import { Readable } from 'node:stream';
|
|
459
|
+
*
|
|
460
|
+
* async function* splitToWords(source) {
|
|
461
|
+
* for await (const chunk of source) {
|
|
462
|
+
* const words = String(chunk).split(' ');
|
|
463
|
+
*
|
|
464
|
+
* for (const word of words) {
|
|
465
|
+
* yield word;
|
|
466
|
+
* }
|
|
467
|
+
* }
|
|
468
|
+
* }
|
|
469
|
+
*
|
|
470
|
+
* const wordsStream = Readable.from(['text passed through', 'composed stream']).compose(splitToWords);
|
|
471
|
+
* const words = await wordsStream.toArray();
|
|
472
|
+
*
|
|
473
|
+
* console.log(words); // prints ['text', 'passed', 'through', 'composed', 'stream']
|
|
474
|
+
* ```
|
|
475
|
+
*
|
|
476
|
+
* `readable.compose(s)` is equivalent to `stream.compose(readable, s)`.
|
|
477
|
+
*
|
|
478
|
+
* This method also allows for an `AbortSignal` to be provided, which will destroy
|
|
479
|
+
* the composed stream when aborted.
|
|
480
|
+
*
|
|
481
|
+
* See [`stream.compose(...streams)`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamcomposestreams) for more information.
|
|
482
|
+
* @since v19.1.0, v18.13.0
|
|
483
|
+
* @returns a stream composed with the stream `stream`.
|
|
484
|
+
*/
|
|
485
|
+
compose(
|
|
486
|
+
stream: NodeJS.WritableStream | web.WritableStream | web.TransformStream | ((source: any) => void),
|
|
487
|
+
options?: Abortable,
|
|
488
|
+
): Duplex;
|
|
447
489
|
/**
|
|
448
490
|
* The iterator created by this method gives users the option to cancel the destruction
|
|
449
491
|
* of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`,
|
|
450
492
|
* or if the iterator should destroy the stream if the stream emitted an error during iteration.
|
|
451
493
|
* @since v16.3.0
|
|
452
|
-
* @param options.destroyOnReturn When set to `false`, calling `return` on the async iterator,
|
|
453
|
-
* or exiting a `for await...of` iteration using a `break`, `return`, or `throw` will not destroy the stream.
|
|
454
|
-
* **Default: `true`**.
|
|
455
494
|
*/
|
|
456
|
-
iterator(options?:
|
|
495
|
+
iterator(options?: ReadableIteratorOptions): NodeJS.AsyncIterator<any>;
|
|
457
496
|
/**
|
|
458
497
|
* This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream.
|
|
459
498
|
* If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream.
|
|
@@ -461,7 +500,7 @@ declare module "stream" {
|
|
|
461
500
|
* @param fn a function to map over every chunk in the stream. Async or not.
|
|
462
501
|
* @returns a stream mapped with the function *fn*.
|
|
463
502
|
*/
|
|
464
|
-
map(fn: (data: any, options?:
|
|
503
|
+
map(fn: (data: any, options?: Abortable) => any, options?: ReadableOperatorOptions): Readable;
|
|
465
504
|
/**
|
|
466
505
|
* This method allows filtering the stream. For each chunk in the stream the *fn* function will be called
|
|
467
506
|
* and if it returns a truthy value, the chunk will be passed to the result stream.
|
|
@@ -471,8 +510,8 @@ declare module "stream" {
|
|
|
471
510
|
* @returns a stream filtered with the predicate *fn*.
|
|
472
511
|
*/
|
|
473
512
|
filter(
|
|
474
|
-
fn: (data: any, options?:
|
|
475
|
-
options?:
|
|
513
|
+
fn: (data: any, options?: Abortable) => boolean | Promise<boolean>,
|
|
514
|
+
options?: ReadableOperatorOptions,
|
|
476
515
|
): Readable;
|
|
477
516
|
/**
|
|
478
517
|
* This method allows iterating a stream. For each chunk in the stream the *fn* function will be called.
|
|
@@ -490,8 +529,8 @@ declare module "stream" {
|
|
|
490
529
|
* @returns a promise for when the stream has finished.
|
|
491
530
|
*/
|
|
492
531
|
forEach(
|
|
493
|
-
fn: (data: any, options?:
|
|
494
|
-
options?:
|
|
532
|
+
fn: (data: any, options?: Abortable) => void | Promise<void>,
|
|
533
|
+
options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
|
|
495
534
|
): Promise<void>;
|
|
496
535
|
/**
|
|
497
536
|
* This method allows easily obtaining the contents of a stream.
|
|
@@ -501,7 +540,7 @@ declare module "stream" {
|
|
|
501
540
|
* @since v17.5.0
|
|
502
541
|
* @returns a promise containing an array with the contents of the stream.
|
|
503
542
|
*/
|
|
504
|
-
toArray(options?:
|
|
543
|
+
toArray(options?: Abortable): Promise<any[]>;
|
|
505
544
|
/**
|
|
506
545
|
* This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream
|
|
507
546
|
* until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk
|
|
@@ -512,8 +551,8 @@ declare module "stream" {
|
|
|
512
551
|
* @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks.
|
|
513
552
|
*/
|
|
514
553
|
some(
|
|
515
|
-
fn: (data: any, options?:
|
|
516
|
-
options?:
|
|
554
|
+
fn: (data: any, options?: Abortable) => boolean | Promise<boolean>,
|
|
555
|
+
options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
|
|
517
556
|
): Promise<boolean>;
|
|
518
557
|
/**
|
|
519
558
|
* This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream
|
|
@@ -526,12 +565,12 @@ declare module "stream" {
|
|
|
526
565
|
* or `undefined` if no element was found.
|
|
527
566
|
*/
|
|
528
567
|
find<T>(
|
|
529
|
-
fn: (data: any, options?:
|
|
530
|
-
options?:
|
|
568
|
+
fn: (data: any, options?: Abortable) => data is T,
|
|
569
|
+
options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
|
|
531
570
|
): Promise<T | undefined>;
|
|
532
571
|
find(
|
|
533
|
-
fn: (data: any, options?:
|
|
534
|
-
options?:
|
|
572
|
+
fn: (data: any, options?: Abortable) => boolean | Promise<boolean>,
|
|
573
|
+
options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
|
|
535
574
|
): Promise<any>;
|
|
536
575
|
/**
|
|
537
576
|
* This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream
|
|
@@ -543,8 +582,8 @@ declare module "stream" {
|
|
|
543
582
|
* @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks.
|
|
544
583
|
*/
|
|
545
584
|
every(
|
|
546
|
-
fn: (data: any, options?:
|
|
547
|
-
options?:
|
|
585
|
+
fn: (data: any, options?: Abortable) => boolean | Promise<boolean>,
|
|
586
|
+
options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
|
|
548
587
|
): Promise<boolean>;
|
|
549
588
|
/**
|
|
550
589
|
* This method returns a new stream by applying the given callback to each chunk of the stream
|
|
@@ -556,28 +595,24 @@ declare module "stream" {
|
|
|
556
595
|
* @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator.
|
|
557
596
|
* @returns a stream flat-mapped with the function *fn*.
|
|
558
597
|
*/
|
|
559
|
-
flatMap(
|
|
598
|
+
flatMap(
|
|
599
|
+
fn: (data: any, options?: Abortable) => any,
|
|
600
|
+
options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
|
|
601
|
+
): Readable;
|
|
560
602
|
/**
|
|
561
603
|
* This method returns a new stream with the first *limit* chunks dropped from the start.
|
|
562
604
|
* @since v17.5.0
|
|
563
605
|
* @param limit the number of chunks to drop from the readable.
|
|
564
606
|
* @returns a stream with *limit* chunks dropped from the start.
|
|
565
607
|
*/
|
|
566
|
-
drop(limit: number, options?:
|
|
608
|
+
drop(limit: number, options?: Abortable): Readable;
|
|
567
609
|
/**
|
|
568
610
|
* This method returns a new stream with the first *limit* chunks.
|
|
569
611
|
* @since v17.5.0
|
|
570
612
|
* @param limit the number of chunks to take from the readable.
|
|
571
613
|
* @returns a stream with *limit* chunks taken.
|
|
572
614
|
*/
|
|
573
|
-
take(limit: number, options?:
|
|
574
|
-
/**
|
|
575
|
-
* This method returns a new stream with chunks of the underlying stream paired with a counter
|
|
576
|
-
* in the form `[index, chunk]`. The first index value is `0` and it increases by 1 for each chunk produced.
|
|
577
|
-
* @since v17.5.0
|
|
578
|
-
* @returns a stream of indexed pairs.
|
|
579
|
-
*/
|
|
580
|
-
asIndexedPairs(options?: Pick<ArrayOptions, "signal">): Readable;
|
|
615
|
+
take(limit: number, options?: Abortable): Readable;
|
|
581
616
|
/**
|
|
582
617
|
* This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation
|
|
583
618
|
* on the previous element. It returns a promise for the final value of the reduction.
|
|
@@ -592,15 +627,11 @@ declare module "stream" {
|
|
|
592
627
|
* @param initial the initial value to use in the reduction.
|
|
593
628
|
* @returns a promise for the final value of the reduction.
|
|
594
629
|
*/
|
|
595
|
-
reduce<T
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
options?: Pick<ArrayOptions, "signal">,
|
|
599
|
-
): Promise<T>;
|
|
600
|
-
reduce<T = any>(
|
|
601
|
-
fn: (previous: T, data: any, options?: Pick<ArrayOptions, "signal">) => T,
|
|
630
|
+
reduce<T>(fn: (previous: any, data: any, options?: Abortable) => T): Promise<T>;
|
|
631
|
+
reduce<T>(
|
|
632
|
+
fn: (previous: T, data: any, options?: Abortable) => T,
|
|
602
633
|
initial: T,
|
|
603
|
-
options?:
|
|
634
|
+
options?: Abortable,
|
|
604
635
|
): Promise<T>;
|
|
605
636
|
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
606
637
|
/**
|
|
@@ -616,78 +647,61 @@ declare module "stream" {
|
|
|
616
647
|
*/
|
|
617
648
|
destroy(error?: Error): this;
|
|
618
649
|
/**
|
|
619
|
-
*
|
|
620
|
-
*
|
|
621
|
-
|
|
622
|
-
* 2. data
|
|
623
|
-
* 3. end
|
|
624
|
-
* 4. error
|
|
625
|
-
* 5. pause
|
|
626
|
-
* 6. readable
|
|
627
|
-
* 7. resume
|
|
628
|
-
*/
|
|
629
|
-
addListener(event: "close", listener: () => void): this;
|
|
630
|
-
addListener(event: "data", listener: (chunk: any) => void): this;
|
|
631
|
-
addListener(event: "end", listener: () => void): this;
|
|
632
|
-
addListener(event: "error", listener: (err: Error) => void): this;
|
|
633
|
-
addListener(event: "pause", listener: () => void): this;
|
|
634
|
-
addListener(event: "readable", listener: () => void): this;
|
|
635
|
-
addListener(event: "resume", listener: () => void): this;
|
|
636
|
-
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
637
|
-
emit(event: "close"): boolean;
|
|
638
|
-
emit(event: "data", chunk: any): boolean;
|
|
639
|
-
emit(event: "end"): boolean;
|
|
640
|
-
emit(event: "error", err: Error): boolean;
|
|
641
|
-
emit(event: "pause"): boolean;
|
|
642
|
-
emit(event: "readable"): boolean;
|
|
643
|
-
emit(event: "resume"): boolean;
|
|
644
|
-
emit(event: string | symbol, ...args: any[]): boolean;
|
|
645
|
-
on(event: "close", listener: () => void): this;
|
|
646
|
-
on(event: "data", listener: (chunk: any) => void): this;
|
|
647
|
-
on(event: "end", listener: () => void): this;
|
|
648
|
-
on(event: "error", listener: (err: Error) => void): this;
|
|
649
|
-
on(event: "pause", listener: () => void): this;
|
|
650
|
-
on(event: "readable", listener: () => void): this;
|
|
651
|
-
on(event: "resume", listener: () => void): this;
|
|
652
|
-
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
653
|
-
once(event: "close", listener: () => void): this;
|
|
654
|
-
once(event: "data", listener: (chunk: any) => void): this;
|
|
655
|
-
once(event: "end", listener: () => void): this;
|
|
656
|
-
once(event: "error", listener: (err: Error) => void): this;
|
|
657
|
-
once(event: "pause", listener: () => void): this;
|
|
658
|
-
once(event: "readable", listener: () => void): this;
|
|
659
|
-
once(event: "resume", listener: () => void): this;
|
|
660
|
-
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
661
|
-
prependListener(event: "close", listener: () => void): this;
|
|
662
|
-
prependListener(event: "data", listener: (chunk: any) => void): this;
|
|
663
|
-
prependListener(event: "end", listener: () => void): this;
|
|
664
|
-
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
665
|
-
prependListener(event: "pause", listener: () => void): this;
|
|
666
|
-
prependListener(event: "readable", listener: () => void): this;
|
|
667
|
-
prependListener(event: "resume", listener: () => void): this;
|
|
668
|
-
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
669
|
-
prependOnceListener(event: "close", listener: () => void): this;
|
|
670
|
-
prependOnceListener(event: "data", listener: (chunk: any) => void): this;
|
|
671
|
-
prependOnceListener(event: "end", listener: () => void): this;
|
|
672
|
-
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
673
|
-
prependOnceListener(event: "pause", listener: () => void): this;
|
|
674
|
-
prependOnceListener(event: "readable", listener: () => void): this;
|
|
675
|
-
prependOnceListener(event: "resume", listener: () => void): this;
|
|
676
|
-
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
677
|
-
removeListener(event: "close", listener: () => void): this;
|
|
678
|
-
removeListener(event: "data", listener: (chunk: any) => void): this;
|
|
679
|
-
removeListener(event: "end", listener: () => void): this;
|
|
680
|
-
removeListener(event: "error", listener: (err: Error) => void): this;
|
|
681
|
-
removeListener(event: "pause", listener: () => void): this;
|
|
682
|
-
removeListener(event: "readable", listener: () => void): this;
|
|
683
|
-
removeListener(event: "resume", listener: () => void): this;
|
|
684
|
-
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
650
|
+
* @returns `AsyncIterator` to fully consume the stream.
|
|
651
|
+
* @since v10.0.0
|
|
652
|
+
*/
|
|
685
653
|
[Symbol.asyncIterator](): NodeJS.AsyncIterator<any>;
|
|
686
654
|
/**
|
|
687
|
-
* Calls `readable.destroy()` with an `AbortError` and returns
|
|
655
|
+
* Calls `readable.destroy()` with an `AbortError` and returns
|
|
656
|
+
* a promise that fulfills when the stream is finished.
|
|
688
657
|
* @since v20.4.0
|
|
689
658
|
*/
|
|
690
659
|
[Symbol.asyncDispose](): Promise<void>;
|
|
660
|
+
// #region InternalEventEmitter
|
|
661
|
+
addListener<E extends keyof ReadableEventMap>(
|
|
662
|
+
eventName: E,
|
|
663
|
+
listener: (...args: ReadableEventMap[E]) => void,
|
|
664
|
+
): this;
|
|
665
|
+
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
666
|
+
emit<E extends keyof ReadableEventMap>(eventName: E, ...args: ReadableEventMap[E]): boolean;
|
|
667
|
+
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
668
|
+
listenerCount<E extends keyof ReadableEventMap>(
|
|
669
|
+
eventName: E,
|
|
670
|
+
listener?: (...args: ReadableEventMap[E]) => void,
|
|
671
|
+
): number;
|
|
672
|
+
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
|
673
|
+
listeners<E extends keyof ReadableEventMap>(eventName: E): ((...args: ReadableEventMap[E]) => void)[];
|
|
674
|
+
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
675
|
+
off<E extends keyof ReadableEventMap>(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this;
|
|
676
|
+
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
677
|
+
on<E extends keyof ReadableEventMap>(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this;
|
|
678
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
679
|
+
once<E extends keyof ReadableEventMap>(
|
|
680
|
+
eventName: E,
|
|
681
|
+
listener: (...args: ReadableEventMap[E]) => void,
|
|
682
|
+
): this;
|
|
683
|
+
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
684
|
+
prependListener<E extends keyof ReadableEventMap>(
|
|
685
|
+
eventName: E,
|
|
686
|
+
listener: (...args: ReadableEventMap[E]) => void,
|
|
687
|
+
): this;
|
|
688
|
+
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
689
|
+
prependOnceListener<E extends keyof ReadableEventMap>(
|
|
690
|
+
eventName: E,
|
|
691
|
+
listener: (...args: ReadableEventMap[E]) => void,
|
|
692
|
+
): this;
|
|
693
|
+
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
694
|
+
rawListeners<E extends keyof ReadableEventMap>(eventName: E): ((...args: ReadableEventMap[E]) => void)[];
|
|
695
|
+
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
696
|
+
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
697
|
+
removeAllListeners<E extends keyof ReadableEventMap>(eventName?: E): this;
|
|
698
|
+
removeAllListeners(eventName?: string | symbol): this;
|
|
699
|
+
removeListener<E extends keyof ReadableEventMap>(
|
|
700
|
+
eventName: E,
|
|
701
|
+
listener: (...args: ReadableEventMap[E]) => void,
|
|
702
|
+
): this;
|
|
703
|
+
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
704
|
+
// #endregion
|
|
691
705
|
}
|
|
692
706
|
interface WritableOptions<T extends Writable = Writable> extends StreamOptions<T> {
|
|
693
707
|
decodeStrings?: boolean | undefined;
|
|
@@ -703,38 +717,47 @@ declare module "stream" {
|
|
|
703
717
|
writev?:
|
|
704
718
|
| ((
|
|
705
719
|
this: T,
|
|
706
|
-
chunks:
|
|
720
|
+
chunks: {
|
|
707
721
|
chunk: any;
|
|
708
722
|
encoding: BufferEncoding;
|
|
709
|
-
}
|
|
723
|
+
}[],
|
|
710
724
|
callback: (error?: Error | null) => void,
|
|
711
725
|
) => void)
|
|
712
726
|
| undefined;
|
|
713
727
|
final?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined;
|
|
714
728
|
}
|
|
729
|
+
interface WritableEventMap {
|
|
730
|
+
"close": [];
|
|
731
|
+
"drain": [];
|
|
732
|
+
"error": [err: Error];
|
|
733
|
+
"finish": [];
|
|
734
|
+
"pipe": [src: Readable];
|
|
735
|
+
"unpipe": [src: Readable];
|
|
736
|
+
}
|
|
715
737
|
/**
|
|
716
738
|
* @since v0.9.4
|
|
717
739
|
*/
|
|
718
740
|
class Writable extends Stream implements NodeJS.WritableStream {
|
|
741
|
+
constructor(options?: WritableOptions);
|
|
719
742
|
/**
|
|
720
743
|
* A utility method for creating a `Writable` from a web `WritableStream`.
|
|
721
744
|
* @since v17.0.0
|
|
722
745
|
*/
|
|
723
746
|
static fromWeb(
|
|
724
|
-
writableStream:
|
|
747
|
+
writableStream: web.WritableStream,
|
|
725
748
|
options?: Pick<WritableOptions, "decodeStrings" | "highWaterMark" | "objectMode" | "signal">,
|
|
726
749
|
): Writable;
|
|
727
750
|
/**
|
|
728
751
|
* A utility method for creating a web `WritableStream` from a `Writable`.
|
|
729
752
|
* @since v17.0.0
|
|
730
753
|
*/
|
|
731
|
-
static toWeb(streamWritable:
|
|
754
|
+
static toWeb(streamWritable: NodeJS.WritableStream): web.WritableStream;
|
|
732
755
|
/**
|
|
733
756
|
* Is `true` if it is safe to call `writable.write()`, which means
|
|
734
757
|
* the stream has not been destroyed, errored, or ended.
|
|
735
758
|
* @since v11.4.0
|
|
736
759
|
*/
|
|
737
|
-
|
|
760
|
+
writable: boolean;
|
|
738
761
|
/**
|
|
739
762
|
* Returns whether the stream was destroyed or errored before emitting `'finish'`.
|
|
740
763
|
* @since v18.0.0, v16.17.0
|
|
@@ -794,13 +817,12 @@ declare module "stream" {
|
|
|
794
817
|
* @since v15.2.0, v14.17.0
|
|
795
818
|
*/
|
|
796
819
|
readonly writableNeedDrain: boolean;
|
|
797
|
-
constructor(opts?: WritableOptions);
|
|
798
820
|
_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
799
821
|
_writev?(
|
|
800
|
-
chunks:
|
|
822
|
+
chunks: {
|
|
801
823
|
chunk: any;
|
|
802
824
|
encoding: BufferEncoding;
|
|
803
|
-
}
|
|
825
|
+
}[],
|
|
804
826
|
callback: (error?: Error | null) => void,
|
|
805
827
|
): void;
|
|
806
828
|
_construct?(callback: (error?: Error | null) => void): void;
|
|
@@ -985,64 +1007,56 @@ declare module "stream" {
|
|
|
985
1007
|
*/
|
|
986
1008
|
destroy(error?: Error): this;
|
|
987
1009
|
/**
|
|
988
|
-
*
|
|
989
|
-
*
|
|
990
|
-
*
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
addListener(
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
on(
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1039
|
-
removeListener(event: "close", listener: () => void): this;
|
|
1040
|
-
removeListener(event: "drain", listener: () => void): this;
|
|
1041
|
-
removeListener(event: "error", listener: (err: Error) => void): this;
|
|
1042
|
-
removeListener(event: "finish", listener: () => void): this;
|
|
1043
|
-
removeListener(event: "pipe", listener: (src: Readable) => void): this;
|
|
1044
|
-
removeListener(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1045
|
-
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1010
|
+
* Calls `writable.destroy()` with an `AbortError` and returns
|
|
1011
|
+
* a promise that fulfills when the stream is finished.
|
|
1012
|
+
* @since v22.4.0, v20.16.0
|
|
1013
|
+
*/
|
|
1014
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
1015
|
+
// #region InternalEventEmitter
|
|
1016
|
+
addListener<E extends keyof WritableEventMap>(
|
|
1017
|
+
eventName: E,
|
|
1018
|
+
listener: (...args: WritableEventMap[E]) => void,
|
|
1019
|
+
): this;
|
|
1020
|
+
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
1021
|
+
emit<E extends keyof WritableEventMap>(eventName: E, ...args: WritableEventMap[E]): boolean;
|
|
1022
|
+
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
1023
|
+
listenerCount<E extends keyof WritableEventMap>(
|
|
1024
|
+
eventName: E,
|
|
1025
|
+
listener?: (...args: WritableEventMap[E]) => void,
|
|
1026
|
+
): number;
|
|
1027
|
+
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
|
1028
|
+
listeners<E extends keyof WritableEventMap>(eventName: E): ((...args: WritableEventMap[E]) => void)[];
|
|
1029
|
+
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
1030
|
+
off<E extends keyof WritableEventMap>(eventName: E, listener: (...args: WritableEventMap[E]) => void): this;
|
|
1031
|
+
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
1032
|
+
on<E extends keyof WritableEventMap>(eventName: E, listener: (...args: WritableEventMap[E]) => void): this;
|
|
1033
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
1034
|
+
once<E extends keyof WritableEventMap>(
|
|
1035
|
+
eventName: E,
|
|
1036
|
+
listener: (...args: WritableEventMap[E]) => void,
|
|
1037
|
+
): this;
|
|
1038
|
+
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
1039
|
+
prependListener<E extends keyof WritableEventMap>(
|
|
1040
|
+
eventName: E,
|
|
1041
|
+
listener: (...args: WritableEventMap[E]) => void,
|
|
1042
|
+
): this;
|
|
1043
|
+
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
1044
|
+
prependOnceListener<E extends keyof WritableEventMap>(
|
|
1045
|
+
eventName: E,
|
|
1046
|
+
listener: (...args: WritableEventMap[E]) => void,
|
|
1047
|
+
): this;
|
|
1048
|
+
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
1049
|
+
rawListeners<E extends keyof WritableEventMap>(eventName: E): ((...args: WritableEventMap[E]) => void)[];
|
|
1050
|
+
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
1051
|
+
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
1052
|
+
removeAllListeners<E extends keyof WritableEventMap>(eventName?: E): this;
|
|
1053
|
+
removeAllListeners(eventName?: string | symbol): this;
|
|
1054
|
+
removeListener<E extends keyof WritableEventMap>(
|
|
1055
|
+
eventName: E,
|
|
1056
|
+
listener: (...args: WritableEventMap[E]) => void,
|
|
1057
|
+
): this;
|
|
1058
|
+
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
1059
|
+
// #endregion
|
|
1046
1060
|
}
|
|
1047
1061
|
interface DuplexOptions<T extends Duplex = Duplex> extends ReadableOptions<T>, WritableOptions<T> {
|
|
1048
1062
|
allowHalfOpen?: boolean | undefined;
|
|
@@ -1052,6 +1066,10 @@ declare module "stream" {
|
|
|
1052
1066
|
writableHighWaterMark?: number | undefined;
|
|
1053
1067
|
writableCorked?: number | undefined;
|
|
1054
1068
|
}
|
|
1069
|
+
interface DuplexToWebOptions {
|
|
1070
|
+
readableType?: web.ReadableStreamType | undefined;
|
|
1071
|
+
}
|
|
1072
|
+
interface DuplexEventMap extends ReadableEventMap, WritableEventMap {}
|
|
1055
1073
|
/**
|
|
1056
1074
|
* Duplex streams are streams that implement both the `Readable` and `Writable` interfaces.
|
|
1057
1075
|
*
|
|
@@ -1063,17 +1081,7 @@ declare module "stream" {
|
|
|
1063
1081
|
* @since v0.9.4
|
|
1064
1082
|
*/
|
|
1065
1083
|
class Duplex extends Stream implements NodeJS.ReadWriteStream {
|
|
1066
|
-
|
|
1067
|
-
* If `false` then the stream will automatically end the writable side when the
|
|
1068
|
-
* readable side ends. Set initially by the `allowHalfOpen` constructor option,
|
|
1069
|
-
* which defaults to `true`.
|
|
1070
|
-
*
|
|
1071
|
-
* This can be changed manually to change the half-open behavior of an existing
|
|
1072
|
-
* `Duplex` stream instance, but must be changed before the `'end'` event is emitted.
|
|
1073
|
-
* @since v0.9.4
|
|
1074
|
-
*/
|
|
1075
|
-
allowHalfOpen: boolean;
|
|
1076
|
-
constructor(opts?: DuplexOptions);
|
|
1084
|
+
constructor(options?: DuplexOptions);
|
|
1077
1085
|
/**
|
|
1078
1086
|
* A utility method for creating duplex streams.
|
|
1079
1087
|
*
|
|
@@ -1097,137 +1105,87 @@ declare module "stream" {
|
|
|
1097
1105
|
*/
|
|
1098
1106
|
static from(
|
|
1099
1107
|
src:
|
|
1100
|
-
|
|
|
1101
|
-
|
|
|
1102
|
-
|
|
|
1108
|
+
| NodeJS.ReadableStream
|
|
1109
|
+
| NodeJS.WritableStream
|
|
1110
|
+
| Blob
|
|
1103
1111
|
| string
|
|
1104
1112
|
| Iterable<any>
|
|
1105
1113
|
| AsyncIterable<any>
|
|
1106
|
-
|
|
|
1114
|
+
| ((source: AsyncIterable<any>) => AsyncIterable<any>)
|
|
1115
|
+
| ((source: AsyncIterable<any>) => Promise<void>)
|
|
1107
1116
|
| Promise<any>
|
|
1108
|
-
|
|
|
1117
|
+
| web.ReadableWritablePair
|
|
1118
|
+
| web.ReadableStream
|
|
1119
|
+
| web.WritableStream,
|
|
1109
1120
|
): Duplex;
|
|
1110
1121
|
/**
|
|
1111
1122
|
* A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`.
|
|
1112
1123
|
* @since v17.0.0
|
|
1113
1124
|
*/
|
|
1114
|
-
static toWeb(streamDuplex:
|
|
1115
|
-
readable: streamWeb.ReadableStream;
|
|
1116
|
-
writable: streamWeb.WritableStream;
|
|
1117
|
-
};
|
|
1125
|
+
static toWeb(streamDuplex: NodeJS.ReadWriteStream, options?: DuplexToWebOptions): web.ReadableWritablePair;
|
|
1118
1126
|
/**
|
|
1119
1127
|
* A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`.
|
|
1120
1128
|
* @since v17.0.0
|
|
1121
1129
|
*/
|
|
1122
1130
|
static fromWeb(
|
|
1123
|
-
duplexStream:
|
|
1124
|
-
readable: streamWeb.ReadableStream;
|
|
1125
|
-
writable: streamWeb.WritableStream;
|
|
1126
|
-
},
|
|
1131
|
+
duplexStream: web.ReadableWritablePair,
|
|
1127
1132
|
options?: Pick<
|
|
1128
1133
|
DuplexOptions,
|
|
1129
1134
|
"allowHalfOpen" | "decodeStrings" | "encoding" | "highWaterMark" | "objectMode" | "signal"
|
|
1130
1135
|
>,
|
|
1131
1136
|
): Duplex;
|
|
1132
1137
|
/**
|
|
1133
|
-
*
|
|
1134
|
-
*
|
|
1135
|
-
*
|
|
1136
|
-
*
|
|
1137
|
-
*
|
|
1138
|
-
*
|
|
1139
|
-
*
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
addListener(
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
once(event: "data", listener: (chunk: any) => void): this;
|
|
1185
|
-
once(event: "drain", listener: () => void): this;
|
|
1186
|
-
once(event: "end", listener: () => void): this;
|
|
1187
|
-
once(event: "error", listener: (err: Error) => void): this;
|
|
1188
|
-
once(event: "finish", listener: () => void): this;
|
|
1189
|
-
once(event: "pause", listener: () => void): this;
|
|
1190
|
-
once(event: "pipe", listener: (src: Readable) => void): this;
|
|
1191
|
-
once(event: "readable", listener: () => void): this;
|
|
1192
|
-
once(event: "resume", listener: () => void): this;
|
|
1193
|
-
once(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1194
|
-
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1195
|
-
prependListener(event: "close", listener: () => void): this;
|
|
1196
|
-
prependListener(event: "data", listener: (chunk: any) => void): this;
|
|
1197
|
-
prependListener(event: "drain", listener: () => void): this;
|
|
1198
|
-
prependListener(event: "end", listener: () => void): this;
|
|
1199
|
-
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
1200
|
-
prependListener(event: "finish", listener: () => void): this;
|
|
1201
|
-
prependListener(event: "pause", listener: () => void): this;
|
|
1202
|
-
prependListener(event: "pipe", listener: (src: Readable) => void): this;
|
|
1203
|
-
prependListener(event: "readable", listener: () => void): this;
|
|
1204
|
-
prependListener(event: "resume", listener: () => void): this;
|
|
1205
|
-
prependListener(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1206
|
-
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1207
|
-
prependOnceListener(event: "close", listener: () => void): this;
|
|
1208
|
-
prependOnceListener(event: "data", listener: (chunk: any) => void): this;
|
|
1209
|
-
prependOnceListener(event: "drain", listener: () => void): this;
|
|
1210
|
-
prependOnceListener(event: "end", listener: () => void): this;
|
|
1211
|
-
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
1212
|
-
prependOnceListener(event: "finish", listener: () => void): this;
|
|
1213
|
-
prependOnceListener(event: "pause", listener: () => void): this;
|
|
1214
|
-
prependOnceListener(event: "pipe", listener: (src: Readable) => void): this;
|
|
1215
|
-
prependOnceListener(event: "readable", listener: () => void): this;
|
|
1216
|
-
prependOnceListener(event: "resume", listener: () => void): this;
|
|
1217
|
-
prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1218
|
-
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1219
|
-
removeListener(event: "close", listener: () => void): this;
|
|
1220
|
-
removeListener(event: "data", listener: (chunk: any) => void): this;
|
|
1221
|
-
removeListener(event: "drain", listener: () => void): this;
|
|
1222
|
-
removeListener(event: "end", listener: () => void): this;
|
|
1223
|
-
removeListener(event: "error", listener: (err: Error) => void): this;
|
|
1224
|
-
removeListener(event: "finish", listener: () => void): this;
|
|
1225
|
-
removeListener(event: "pause", listener: () => void): this;
|
|
1226
|
-
removeListener(event: "pipe", listener: (src: Readable) => void): this;
|
|
1227
|
-
removeListener(event: "readable", listener: () => void): this;
|
|
1228
|
-
removeListener(event: "resume", listener: () => void): this;
|
|
1229
|
-
removeListener(event: "unpipe", listener: (src: Readable) => void): this;
|
|
1230
|
-
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1138
|
+
* If `false` then the stream will automatically end the writable side when the
|
|
1139
|
+
* readable side ends. Set initially by the `allowHalfOpen` constructor option,
|
|
1140
|
+
* which defaults to `true`.
|
|
1141
|
+
*
|
|
1142
|
+
* This can be changed manually to change the half-open behavior of an existing
|
|
1143
|
+
* `Duplex` stream instance, but must be changed before the `'end'` event is emitted.
|
|
1144
|
+
* @since v0.9.4
|
|
1145
|
+
*/
|
|
1146
|
+
allowHalfOpen: boolean;
|
|
1147
|
+
// #region InternalEventEmitter
|
|
1148
|
+
addListener<E extends keyof DuplexEventMap>(
|
|
1149
|
+
eventName: E,
|
|
1150
|
+
listener: (...args: DuplexEventMap[E]) => void,
|
|
1151
|
+
): this;
|
|
1152
|
+
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
1153
|
+
emit<E extends keyof DuplexEventMap>(eventName: E, ...args: DuplexEventMap[E]): boolean;
|
|
1154
|
+
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
1155
|
+
listenerCount<E extends keyof DuplexEventMap>(
|
|
1156
|
+
eventName: E,
|
|
1157
|
+
listener?: (...args: DuplexEventMap[E]) => void,
|
|
1158
|
+
): number;
|
|
1159
|
+
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
|
1160
|
+
listeners<E extends keyof DuplexEventMap>(eventName: E): ((...args: DuplexEventMap[E]) => void)[];
|
|
1161
|
+
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
1162
|
+
off<E extends keyof DuplexEventMap>(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this;
|
|
1163
|
+
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
1164
|
+
on<E extends keyof DuplexEventMap>(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this;
|
|
1165
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
1166
|
+
once<E extends keyof DuplexEventMap>(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this;
|
|
1167
|
+
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
1168
|
+
prependListener<E extends keyof DuplexEventMap>(
|
|
1169
|
+
eventName: E,
|
|
1170
|
+
listener: (...args: DuplexEventMap[E]) => void,
|
|
1171
|
+
): this;
|
|
1172
|
+
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
1173
|
+
prependOnceListener<E extends keyof DuplexEventMap>(
|
|
1174
|
+
eventName: E,
|
|
1175
|
+
listener: (...args: DuplexEventMap[E]) => void,
|
|
1176
|
+
): this;
|
|
1177
|
+
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
1178
|
+
rawListeners<E extends keyof DuplexEventMap>(eventName: E): ((...args: DuplexEventMap[E]) => void)[];
|
|
1179
|
+
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
1180
|
+
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
1181
|
+
removeAllListeners<E extends keyof DuplexEventMap>(eventName?: E): this;
|
|
1182
|
+
removeAllListeners(eventName?: string | symbol): this;
|
|
1183
|
+
removeListener<E extends keyof DuplexEventMap>(
|
|
1184
|
+
eventName: E,
|
|
1185
|
+
listener: (...args: DuplexEventMap[E]) => void,
|
|
1186
|
+
): this;
|
|
1187
|
+
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
1188
|
+
// #endregion
|
|
1231
1189
|
}
|
|
1232
1190
|
interface Duplex extends Readable, Writable {}
|
|
1233
1191
|
/**
|
|
@@ -1268,7 +1226,7 @@ declare module "stream" {
|
|
|
1268
1226
|
* @since v0.9.4
|
|
1269
1227
|
*/
|
|
1270
1228
|
class Transform extends Duplex {
|
|
1271
|
-
constructor(
|
|
1229
|
+
constructor(options?: TransformOptions);
|
|
1272
1230
|
_transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
|
|
1273
1231
|
_flush(callback: TransformCallback): void;
|
|
1274
1232
|
}
|
|
@@ -1356,7 +1314,9 @@ declare module "stream" {
|
|
|
1356
1314
|
* @param signal A signal representing possible cancellation
|
|
1357
1315
|
* @param stream A stream to attach a signal to.
|
|
1358
1316
|
*/
|
|
1359
|
-
function addAbortSignal<
|
|
1317
|
+
function addAbortSignal<
|
|
1318
|
+
T extends NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream,
|
|
1319
|
+
>(signal: AbortSignal, stream: T): T;
|
|
1360
1320
|
/**
|
|
1361
1321
|
* Returns the default highWaterMark used by streams.
|
|
1362
1322
|
* Defaults to `65536` (64 KiB), or `16` for `objectMode`.
|
|
@@ -1400,7 +1360,7 @@ declare module "stream" {
|
|
|
1400
1360
|
* Especially useful in error handling scenarios where a stream is destroyed
|
|
1401
1361
|
* prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`.
|
|
1402
1362
|
*
|
|
1403
|
-
* The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-
|
|
1363
|
+
* The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamfinishedstream-options).
|
|
1404
1364
|
*
|
|
1405
1365
|
* `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been
|
|
1406
1366
|
* invoked. The reason for this is so that unexpected `'error'` events (due to
|
|
@@ -1420,46 +1380,57 @@ declare module "stream" {
|
|
|
1420
1380
|
* @returns A cleanup function which removes all registered listeners.
|
|
1421
1381
|
*/
|
|
1422
1382
|
function finished(
|
|
1423
|
-
stream: NodeJS.ReadableStream | NodeJS.WritableStream |
|
|
1383
|
+
stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream,
|
|
1424
1384
|
options: FinishedOptions,
|
|
1425
1385
|
callback: (err?: NodeJS.ErrnoException | null) => void,
|
|
1426
1386
|
): () => void;
|
|
1427
1387
|
function finished(
|
|
1428
|
-
stream: NodeJS.ReadableStream | NodeJS.WritableStream |
|
|
1388
|
+
stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream,
|
|
1429
1389
|
callback: (err?: NodeJS.ErrnoException | null) => void,
|
|
1430
1390
|
): () => void;
|
|
1431
1391
|
namespace finished {
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
options?: FinishedOptions,
|
|
1435
|
-
): Promise<void>;
|
|
1392
|
+
import __promisify__ = promises.finished;
|
|
1393
|
+
export { __promisify__ };
|
|
1436
1394
|
}
|
|
1437
|
-
type PipelineSourceFunction<
|
|
1438
|
-
type PipelineSource<
|
|
1439
|
-
|
|
1395
|
+
type PipelineSourceFunction<O> = (options?: Abortable) => Iterable<O> | AsyncIterable<O>;
|
|
1396
|
+
type PipelineSource<O> =
|
|
1397
|
+
| NodeJS.ReadableStream
|
|
1398
|
+
| web.ReadableStream<O>
|
|
1399
|
+
| web.TransformStream<any, O>
|
|
1400
|
+
| Iterable<O>
|
|
1401
|
+
| AsyncIterable<O>
|
|
1402
|
+
| PipelineSourceFunction<O>;
|
|
1403
|
+
type PipelineSourceArgument<T> = (T extends (...args: any[]) => infer R ? R : T) extends infer S
|
|
1404
|
+
? S extends web.TransformStream<any, infer O> ? web.ReadableStream<O> : S
|
|
1405
|
+
: never;
|
|
1406
|
+
type PipelineTransformGenerator<S extends PipelineTransformSource<any>, O> = (
|
|
1407
|
+
source: PipelineSourceArgument<S>,
|
|
1408
|
+
options?: Abortable,
|
|
1409
|
+
) => AsyncIterable<O>;
|
|
1410
|
+
type PipelineTransformStreams<I, O> =
|
|
1440
1411
|
| NodeJS.ReadWriteStream
|
|
1441
|
-
|
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
type
|
|
1447
|
-
type
|
|
1448
|
-
|
|
1449
|
-
|
|
1412
|
+
| web.TransformStream<I, O>;
|
|
1413
|
+
type PipelineTransform<S extends PipelineTransformSource<any>, O> = S extends
|
|
1414
|
+
PipelineSource<infer I> | PipelineTransformStreams<any, infer I> | ((...args: any[]) => infer I)
|
|
1415
|
+
? PipelineTransformStreams<I, O> | PipelineTransformGenerator<S, O>
|
|
1416
|
+
: never;
|
|
1417
|
+
type PipelineTransformSource<O> = PipelineSource<O> | PipelineTransform<any, O>;
|
|
1418
|
+
type PipelineDestinationFunction<S extends PipelineTransformSource<any>, R> = (
|
|
1419
|
+
source: PipelineSourceArgument<S>,
|
|
1420
|
+
options?: Abortable,
|
|
1421
|
+
) => R;
|
|
1422
|
+
type PipelineDestination<S extends PipelineTransformSource<any>, R> = S extends
|
|
1423
|
+
PipelineSource<infer I> | PipelineTransform<any, infer I> ?
|
|
1450
1424
|
| NodeJS.WritableStream
|
|
1451
|
-
|
|
|
1452
|
-
|
|
|
1425
|
+
| web.WritableStream<I>
|
|
1426
|
+
| web.TransformStream<I, any>
|
|
1427
|
+
| PipelineDestinationFunction<S, R>
|
|
1453
1428
|
: never;
|
|
1454
|
-
type PipelineCallback<S extends PipelineDestination<any, any>> =
|
|
1455
|
-
|
|
1456
|
-
: (
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
interface PipelineOptions {
|
|
1460
|
-
signal?: AbortSignal | undefined;
|
|
1461
|
-
end?: boolean | undefined;
|
|
1462
|
-
}
|
|
1429
|
+
type PipelineCallback<S extends PipelineDestination<any, any>> = (
|
|
1430
|
+
err: NodeJS.ErrnoException | null,
|
|
1431
|
+
value: S extends (...args: any[]) => PromiseLike<infer R> ? R : undefined,
|
|
1432
|
+
) => void;
|
|
1433
|
+
type PipelineResult<S extends PipelineDestination<any, any>> = S extends NodeJS.WritableStream ? S : Duplex;
|
|
1463
1434
|
/**
|
|
1464
1435
|
* A module method to pipe between streams and generators forwarding errors and
|
|
1465
1436
|
* properly cleaning up and provide a callback when the pipeline is complete.
|
|
@@ -1488,7 +1459,7 @@ declare module "stream" {
|
|
|
1488
1459
|
* );
|
|
1489
1460
|
* ```
|
|
1490
1461
|
*
|
|
1491
|
-
* The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-
|
|
1462
|
+
* The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streampipelinesource-transforms-destination-options).
|
|
1492
1463
|
*
|
|
1493
1464
|
* `stream.pipeline()` will call `stream.destroy(err)` on all streams except:
|
|
1494
1465
|
*
|
|
@@ -1525,163 +1496,279 @@ declare module "stream" {
|
|
|
1525
1496
|
* @since v10.0.0
|
|
1526
1497
|
* @param callback Called when the pipeline is fully done.
|
|
1527
1498
|
*/
|
|
1528
|
-
function pipeline<
|
|
1529
|
-
source:
|
|
1530
|
-
destination:
|
|
1531
|
-
callback: PipelineCallback<
|
|
1532
|
-
):
|
|
1499
|
+
function pipeline<S extends PipelineSource<any>, D extends PipelineDestination<S, any>>(
|
|
1500
|
+
source: S,
|
|
1501
|
+
destination: D,
|
|
1502
|
+
callback: PipelineCallback<D>,
|
|
1503
|
+
): PipelineResult<D>;
|
|
1533
1504
|
function pipeline<
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1505
|
+
S extends PipelineSource<any>,
|
|
1506
|
+
T extends PipelineTransform<S, any>,
|
|
1507
|
+
D extends PipelineDestination<T, any>,
|
|
1537
1508
|
>(
|
|
1538
|
-
source:
|
|
1539
|
-
|
|
1540
|
-
destination:
|
|
1541
|
-
callback: PipelineCallback<
|
|
1542
|
-
):
|
|
1509
|
+
source: S,
|
|
1510
|
+
transform: T,
|
|
1511
|
+
destination: D,
|
|
1512
|
+
callback: PipelineCallback<D>,
|
|
1513
|
+
): PipelineResult<D>;
|
|
1543
1514
|
function pipeline<
|
|
1544
|
-
|
|
1545
|
-
T1 extends PipelineTransform<
|
|
1515
|
+
S extends PipelineSource<any>,
|
|
1516
|
+
T1 extends PipelineTransform<S, any>,
|
|
1546
1517
|
T2 extends PipelineTransform<T1, any>,
|
|
1547
|
-
|
|
1518
|
+
D extends PipelineDestination<T2, any>,
|
|
1548
1519
|
>(
|
|
1549
|
-
source:
|
|
1520
|
+
source: S,
|
|
1550
1521
|
transform1: T1,
|
|
1551
1522
|
transform2: T2,
|
|
1552
|
-
destination:
|
|
1553
|
-
callback: PipelineCallback<
|
|
1554
|
-
):
|
|
1523
|
+
destination: D,
|
|
1524
|
+
callback: PipelineCallback<D>,
|
|
1525
|
+
): PipelineResult<D>;
|
|
1555
1526
|
function pipeline<
|
|
1556
|
-
|
|
1557
|
-
T1 extends PipelineTransform<
|
|
1527
|
+
S extends PipelineSource<any>,
|
|
1528
|
+
T1 extends PipelineTransform<S, any>,
|
|
1558
1529
|
T2 extends PipelineTransform<T1, any>,
|
|
1559
1530
|
T3 extends PipelineTransform<T2, any>,
|
|
1560
|
-
|
|
1531
|
+
D extends PipelineDestination<T3, any>,
|
|
1561
1532
|
>(
|
|
1562
|
-
source:
|
|
1533
|
+
source: S,
|
|
1563
1534
|
transform1: T1,
|
|
1564
1535
|
transform2: T2,
|
|
1565
1536
|
transform3: T3,
|
|
1566
|
-
destination:
|
|
1567
|
-
callback: PipelineCallback<
|
|
1568
|
-
):
|
|
1537
|
+
destination: D,
|
|
1538
|
+
callback: PipelineCallback<D>,
|
|
1539
|
+
): PipelineResult<D>;
|
|
1569
1540
|
function pipeline<
|
|
1570
|
-
|
|
1571
|
-
T1 extends PipelineTransform<
|
|
1541
|
+
S extends PipelineSource<any>,
|
|
1542
|
+
T1 extends PipelineTransform<S, any>,
|
|
1572
1543
|
T2 extends PipelineTransform<T1, any>,
|
|
1573
1544
|
T3 extends PipelineTransform<T2, any>,
|
|
1574
1545
|
T4 extends PipelineTransform<T3, any>,
|
|
1575
|
-
|
|
1546
|
+
D extends PipelineDestination<T4, any>,
|
|
1576
1547
|
>(
|
|
1577
|
-
source:
|
|
1548
|
+
source: S,
|
|
1578
1549
|
transform1: T1,
|
|
1579
1550
|
transform2: T2,
|
|
1580
1551
|
transform3: T3,
|
|
1581
1552
|
transform4: T4,
|
|
1582
|
-
destination:
|
|
1583
|
-
callback: PipelineCallback<
|
|
1584
|
-
):
|
|
1553
|
+
destination: D,
|
|
1554
|
+
callback: PipelineCallback<D>,
|
|
1555
|
+
): PipelineResult<D>;
|
|
1585
1556
|
function pipeline(
|
|
1586
|
-
streams: ReadonlyArray<
|
|
1557
|
+
streams: ReadonlyArray<PipelineSource<any> | PipelineTransform<any, any> | PipelineDestination<any, any>>,
|
|
1587
1558
|
callback: (err: NodeJS.ErrnoException | null) => void,
|
|
1588
1559
|
): NodeJS.WritableStream;
|
|
1589
1560
|
function pipeline(
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
>
|
|
1561
|
+
...streams: [
|
|
1562
|
+
...[PipelineSource<any>, ...PipelineTransform<any, any>[], PipelineDestination<any, any>],
|
|
1563
|
+
callback: ((err: NodeJS.ErrnoException | null) => void),
|
|
1564
|
+
]
|
|
1595
1565
|
): NodeJS.WritableStream;
|
|
1596
1566
|
namespace pipeline {
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
destination: B,
|
|
1600
|
-
options?: PipelineOptions,
|
|
1601
|
-
): PipelinePromise<B>;
|
|
1602
|
-
function __promisify__<
|
|
1603
|
-
A extends PipelineSource<any>,
|
|
1604
|
-
T1 extends PipelineTransform<A, any>,
|
|
1605
|
-
B extends PipelineDestination<T1, any>,
|
|
1606
|
-
>(
|
|
1607
|
-
source: A,
|
|
1608
|
-
transform1: T1,
|
|
1609
|
-
destination: B,
|
|
1610
|
-
options?: PipelineOptions,
|
|
1611
|
-
): PipelinePromise<B>;
|
|
1612
|
-
function __promisify__<
|
|
1613
|
-
A extends PipelineSource<any>,
|
|
1614
|
-
T1 extends PipelineTransform<A, any>,
|
|
1615
|
-
T2 extends PipelineTransform<T1, any>,
|
|
1616
|
-
B extends PipelineDestination<T2, any>,
|
|
1617
|
-
>(
|
|
1618
|
-
source: A,
|
|
1619
|
-
transform1: T1,
|
|
1620
|
-
transform2: T2,
|
|
1621
|
-
destination: B,
|
|
1622
|
-
options?: PipelineOptions,
|
|
1623
|
-
): PipelinePromise<B>;
|
|
1624
|
-
function __promisify__<
|
|
1625
|
-
A extends PipelineSource<any>,
|
|
1626
|
-
T1 extends PipelineTransform<A, any>,
|
|
1627
|
-
T2 extends PipelineTransform<T1, any>,
|
|
1628
|
-
T3 extends PipelineTransform<T2, any>,
|
|
1629
|
-
B extends PipelineDestination<T3, any>,
|
|
1630
|
-
>(
|
|
1631
|
-
source: A,
|
|
1632
|
-
transform1: T1,
|
|
1633
|
-
transform2: T2,
|
|
1634
|
-
transform3: T3,
|
|
1635
|
-
destination: B,
|
|
1636
|
-
options?: PipelineOptions,
|
|
1637
|
-
): PipelinePromise<B>;
|
|
1638
|
-
function __promisify__<
|
|
1639
|
-
A extends PipelineSource<any>,
|
|
1640
|
-
T1 extends PipelineTransform<A, any>,
|
|
1641
|
-
T2 extends PipelineTransform<T1, any>,
|
|
1642
|
-
T3 extends PipelineTransform<T2, any>,
|
|
1643
|
-
T4 extends PipelineTransform<T3, any>,
|
|
1644
|
-
B extends PipelineDestination<T4, any>,
|
|
1645
|
-
>(
|
|
1646
|
-
source: A,
|
|
1647
|
-
transform1: T1,
|
|
1648
|
-
transform2: T2,
|
|
1649
|
-
transform3: T3,
|
|
1650
|
-
transform4: T4,
|
|
1651
|
-
destination: B,
|
|
1652
|
-
options?: PipelineOptions,
|
|
1653
|
-
): PipelinePromise<B>;
|
|
1654
|
-
function __promisify__(
|
|
1655
|
-
streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
|
|
1656
|
-
options?: PipelineOptions,
|
|
1657
|
-
): Promise<void>;
|
|
1658
|
-
function __promisify__(
|
|
1659
|
-
stream1: NodeJS.ReadableStream,
|
|
1660
|
-
stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
|
|
1661
|
-
...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
|
|
1662
|
-
): Promise<void>;
|
|
1663
|
-
}
|
|
1664
|
-
// TODO: this interface never existed; remove in next major
|
|
1665
|
-
interface Pipe {
|
|
1666
|
-
close(): void;
|
|
1667
|
-
hasRef(): boolean;
|
|
1668
|
-
ref(): void;
|
|
1669
|
-
unref(): void;
|
|
1567
|
+
import __promisify__ = promises.pipeline;
|
|
1568
|
+
export { __promisify__ };
|
|
1670
1569
|
}
|
|
1570
|
+
type ComposeSource<O> =
|
|
1571
|
+
| NodeJS.ReadableStream
|
|
1572
|
+
| web.ReadableStream<O>
|
|
1573
|
+
| Iterable<O>
|
|
1574
|
+
| AsyncIterable<O>
|
|
1575
|
+
| (() => AsyncIterable<O>);
|
|
1576
|
+
type ComposeTransformStreams<I, O> = NodeJS.ReadWriteStream | web.TransformStream<I, O>;
|
|
1577
|
+
type ComposeTransformGenerator<I, O> = (source: AsyncIterable<I>) => AsyncIterable<O>;
|
|
1578
|
+
type ComposeTransform<S extends ComposeTransformSource<any>, O> = S extends
|
|
1579
|
+
ComposeSource<infer I> | ComposeTransformStreams<any, infer I> | ComposeTransformGenerator<any, infer I>
|
|
1580
|
+
? ComposeTransformStreams<I, O> | ComposeTransformGenerator<I, O>
|
|
1581
|
+
: never;
|
|
1582
|
+
type ComposeTransformSource<O> = ComposeSource<O> | ComposeTransform<any, O>;
|
|
1583
|
+
type ComposeDestination<S extends ComposeTransformSource<any>> = S extends ComposeTransformSource<infer I> ?
|
|
1584
|
+
| NodeJS.WritableStream
|
|
1585
|
+
| web.WritableStream<I>
|
|
1586
|
+
| web.TransformStream<I, any>
|
|
1587
|
+
| ((source: AsyncIterable<I>) => void)
|
|
1588
|
+
: never;
|
|
1589
|
+
/**
|
|
1590
|
+
* Combines two or more streams into a `Duplex` stream that writes to the
|
|
1591
|
+
* first stream and reads from the last. Each provided stream is piped into
|
|
1592
|
+
* the next, using `stream.pipeline`. If any of the streams error then all
|
|
1593
|
+
* are destroyed, including the outer `Duplex` stream.
|
|
1594
|
+
*
|
|
1595
|
+
* Because `stream.compose` returns a new stream that in turn can (and
|
|
1596
|
+
* should) be piped into other streams, it enables composition. In contrast,
|
|
1597
|
+
* when passing streams to `stream.pipeline`, typically the first stream is
|
|
1598
|
+
* a readable stream and the last a writable stream, forming a closed
|
|
1599
|
+
* circuit.
|
|
1600
|
+
*
|
|
1601
|
+
* If passed a `Function` it must be a factory method taking a `source`
|
|
1602
|
+
* `Iterable`.
|
|
1603
|
+
*
|
|
1604
|
+
* ```js
|
|
1605
|
+
* import { compose, Transform } from 'node:stream';
|
|
1606
|
+
*
|
|
1607
|
+
* const removeSpaces = new Transform({
|
|
1608
|
+
* transform(chunk, encoding, callback) {
|
|
1609
|
+
* callback(null, String(chunk).replace(' ', ''));
|
|
1610
|
+
* },
|
|
1611
|
+
* });
|
|
1612
|
+
*
|
|
1613
|
+
* async function* toUpper(source) {
|
|
1614
|
+
* for await (const chunk of source) {
|
|
1615
|
+
* yield String(chunk).toUpperCase();
|
|
1616
|
+
* }
|
|
1617
|
+
* }
|
|
1618
|
+
*
|
|
1619
|
+
* let res = '';
|
|
1620
|
+
* for await (const buf of compose(removeSpaces, toUpper).end('hello world')) {
|
|
1621
|
+
* res += buf;
|
|
1622
|
+
* }
|
|
1623
|
+
*
|
|
1624
|
+
* console.log(res); // prints 'HELLOWORLD'
|
|
1625
|
+
* ```
|
|
1626
|
+
*
|
|
1627
|
+
* `stream.compose` can be used to convert async iterables, generators and
|
|
1628
|
+
* functions into streams.
|
|
1629
|
+
*
|
|
1630
|
+
* * `AsyncIterable` converts into a readable `Duplex`. Cannot yield
|
|
1631
|
+
* `null`.
|
|
1632
|
+
* * `AsyncGeneratorFunction` converts into a readable/writable transform `Duplex`.
|
|
1633
|
+
* Must take a source `AsyncIterable` as first parameter. Cannot yield
|
|
1634
|
+
* `null`.
|
|
1635
|
+
* * `AsyncFunction` converts into a writable `Duplex`. Must return
|
|
1636
|
+
* either `null` or `undefined`.
|
|
1637
|
+
*
|
|
1638
|
+
* ```js
|
|
1639
|
+
* import { compose } from 'node:stream';
|
|
1640
|
+
* import { finished } from 'node:stream/promises';
|
|
1641
|
+
*
|
|
1642
|
+
* // Convert AsyncIterable into readable Duplex.
|
|
1643
|
+
* const s1 = compose(async function*() {
|
|
1644
|
+
* yield 'Hello';
|
|
1645
|
+
* yield 'World';
|
|
1646
|
+
* }());
|
|
1647
|
+
*
|
|
1648
|
+
* // Convert AsyncGenerator into transform Duplex.
|
|
1649
|
+
* const s2 = compose(async function*(source) {
|
|
1650
|
+
* for await (const chunk of source) {
|
|
1651
|
+
* yield String(chunk).toUpperCase();
|
|
1652
|
+
* }
|
|
1653
|
+
* });
|
|
1654
|
+
*
|
|
1655
|
+
* let res = '';
|
|
1656
|
+
*
|
|
1657
|
+
* // Convert AsyncFunction into writable Duplex.
|
|
1658
|
+
* const s3 = compose(async function(source) {
|
|
1659
|
+
* for await (const chunk of source) {
|
|
1660
|
+
* res += chunk;
|
|
1661
|
+
* }
|
|
1662
|
+
* });
|
|
1663
|
+
*
|
|
1664
|
+
* await finished(compose(s1, s2, s3));
|
|
1665
|
+
*
|
|
1666
|
+
* console.log(res); // prints 'HELLOWORLD'
|
|
1667
|
+
* ```
|
|
1668
|
+
*
|
|
1669
|
+
* For convenience, the `readable.compose(stream)` method is available on
|
|
1670
|
+
* `Readable` and `Duplex` streams as a wrapper for this function.
|
|
1671
|
+
* @since v16.9.0
|
|
1672
|
+
* @experimental
|
|
1673
|
+
*/
|
|
1674
|
+
/* eslint-disable @definitelytyped/no-unnecessary-generics */
|
|
1675
|
+
function compose(stream: ComposeSource<any> | ComposeDestination<any>): Duplex;
|
|
1676
|
+
function compose<
|
|
1677
|
+
S extends ComposeSource<any> | ComposeTransform<any, any>,
|
|
1678
|
+
D extends ComposeTransform<S, any> | ComposeDestination<S>,
|
|
1679
|
+
>(
|
|
1680
|
+
source: S,
|
|
1681
|
+
destination: D,
|
|
1682
|
+
): Duplex;
|
|
1683
|
+
function compose<
|
|
1684
|
+
S extends ComposeSource<any> | ComposeTransform<any, any>,
|
|
1685
|
+
T extends ComposeTransform<S, any>,
|
|
1686
|
+
D extends ComposeTransform<T, any> | ComposeDestination<T>,
|
|
1687
|
+
>(source: S, transform: T, destination: D): Duplex;
|
|
1688
|
+
function compose<
|
|
1689
|
+
S extends ComposeSource<any> | ComposeTransform<any, any>,
|
|
1690
|
+
T1 extends ComposeTransform<S, any>,
|
|
1691
|
+
T2 extends ComposeTransform<T1, any>,
|
|
1692
|
+
D extends ComposeTransform<T2, any> | ComposeDestination<T2>,
|
|
1693
|
+
>(source: S, transform1: T1, transform2: T2, destination: D): Duplex;
|
|
1694
|
+
function compose<
|
|
1695
|
+
S extends ComposeSource<any> | ComposeTransform<any, any>,
|
|
1696
|
+
T1 extends ComposeTransform<S, any>,
|
|
1697
|
+
T2 extends ComposeTransform<T1, any>,
|
|
1698
|
+
T3 extends ComposeTransform<T2, any>,
|
|
1699
|
+
D extends ComposeTransform<T3, any> | ComposeDestination<T3>,
|
|
1700
|
+
>(source: S, transform1: T1, transform2: T2, transform3: T3, destination: D): Duplex;
|
|
1701
|
+
function compose<
|
|
1702
|
+
S extends ComposeSource<any> | ComposeTransform<any, any>,
|
|
1703
|
+
T1 extends ComposeTransform<S, any>,
|
|
1704
|
+
T2 extends ComposeTransform<T1, any>,
|
|
1705
|
+
T3 extends ComposeTransform<T2, any>,
|
|
1706
|
+
T4 extends ComposeTransform<T3, any>,
|
|
1707
|
+
D extends ComposeTransform<T4, any> | ComposeDestination<T4>,
|
|
1708
|
+
>(source: S, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: D): Duplex;
|
|
1709
|
+
function compose(
|
|
1710
|
+
...streams: [
|
|
1711
|
+
ComposeSource<any>,
|
|
1712
|
+
...ComposeTransform<any, any>[],
|
|
1713
|
+
ComposeDestination<any>,
|
|
1714
|
+
]
|
|
1715
|
+
): Duplex;
|
|
1716
|
+
/* eslint-enable @definitelytyped/no-unnecessary-generics */
|
|
1671
1717
|
/**
|
|
1672
1718
|
* Returns whether the stream has encountered an error.
|
|
1673
1719
|
* @since v17.3.0, v16.14.0
|
|
1674
1720
|
*/
|
|
1675
|
-
function isErrored(
|
|
1721
|
+
function isErrored(
|
|
1722
|
+
stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream,
|
|
1723
|
+
): boolean;
|
|
1676
1724
|
/**
|
|
1677
1725
|
* Returns whether the stream is readable.
|
|
1678
1726
|
* @since v17.4.0, v16.14.0
|
|
1727
|
+
* @returns Only returns `null` if `stream` is not a valid `Readable`, `Duplex` or `ReadableStream`.
|
|
1728
|
+
*/
|
|
1729
|
+
function isReadable(stream: NodeJS.ReadableStream | web.ReadableStream): boolean | null;
|
|
1730
|
+
/**
|
|
1731
|
+
* Returns whether the stream is writable.
|
|
1732
|
+
* @since v20.0.0
|
|
1733
|
+
* @returns Only returns `null` if `stream` is not a valid `Writable`, `Duplex` or `WritableStream`.
|
|
1679
1734
|
*/
|
|
1680
|
-
function
|
|
1735
|
+
function isWritable(stream: NodeJS.WritableStream | web.WritableStream): boolean | null;
|
|
1736
|
+
}
|
|
1737
|
+
global {
|
|
1738
|
+
namespace NodeJS {
|
|
1739
|
+
// These interfaces are vestigial, and correspond roughly to the "streams2" interfaces
|
|
1740
|
+
// from early versions of Node.js, but they are still used widely across the ecosystem.
|
|
1741
|
+
// Accordingly, they are commonly used as "in-types" for @types/node APIs, so that
|
|
1742
|
+
// eg. streams returned from older libraries will still be considered valid input to
|
|
1743
|
+
// functions which accept stream arguments.
|
|
1744
|
+
// It's not possible to change or remove these without astronomical levels of breakage.
|
|
1745
|
+
interface ReadableStream extends EventEmitter {
|
|
1746
|
+
readable: boolean;
|
|
1747
|
+
read(size?: number): string | Buffer;
|
|
1748
|
+
setEncoding(encoding: BufferEncoding): this;
|
|
1749
|
+
pause(): this;
|
|
1750
|
+
resume(): this;
|
|
1751
|
+
isPaused(): boolean;
|
|
1752
|
+
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
|
|
1753
|
+
unpipe(destination?: WritableStream): this;
|
|
1754
|
+
unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
|
|
1755
|
+
wrap(oldStream: ReadableStream): this;
|
|
1756
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
|
|
1757
|
+
}
|
|
1758
|
+
interface WritableStream extends EventEmitter {
|
|
1759
|
+
writable: boolean;
|
|
1760
|
+
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
|
|
1761
|
+
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
|
|
1762
|
+
end(cb?: () => void): this;
|
|
1763
|
+
end(data: string | Uint8Array, cb?: () => void): this;
|
|
1764
|
+
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
|
|
1765
|
+
}
|
|
1766
|
+
interface ReadWriteStream extends ReadableStream, WritableStream {}
|
|
1767
|
+
}
|
|
1681
1768
|
}
|
|
1682
1769
|
export = Stream;
|
|
1683
1770
|
}
|
|
1684
|
-
declare module "
|
|
1685
|
-
import stream = require("stream");
|
|
1771
|
+
declare module "stream" {
|
|
1772
|
+
import stream = require("node:stream");
|
|
1686
1773
|
export = stream;
|
|
1687
1774
|
}
|