@zergai/ztc 0.5.0-beta.1 → 0.6.0-beta.1
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/README.md +65 -46
- package/THIRD_PARTY_NOTICES.md +7 -2
- package/bin/zmux-darwin-arm64 +0 -0
- package/bin/ztc-audio-darwin-arm64 +0 -0
- package/bin/ztc-capture-darwin-arm64 +0 -0
- package/bin/ztc-computer-darwin-arm64 +0 -0
- package/bin/ztc-llm-darwin-arm64 +0 -0
- package/bin/ztc-tts-darwin-arm64 +0 -0
- package/bin/ztc-tui-darwin-arm64 +0 -0
- package/bin/zterm-darwin-arm64 +0 -0
- package/dist/App.js +26 -9
- package/dist/agent/agent.d.ts +77 -0
- package/dist/agent/agent.js +618 -94
- package/dist/agent/backends/account_login.js +3 -1
- package/dist/agent/backends/anthropic.js +4 -3
- package/dist/agent/backends/bedrock.d.ts +20 -0
- package/dist/agent/backends/bedrock.js +175 -0
- package/dist/agent/backends/claude_cli.js +8 -0
- package/dist/agent/backends/codex_app_server.js +2 -0
- package/dist/agent/backends/codex_auth.d.ts +5 -2
- package/dist/agent/backends/codex_auth.js +131 -31
- package/dist/agent/backends/gemini.js +1 -1
- package/dist/agent/backends/http_error.d.ts +2 -0
- package/dist/agent/backends/http_error.js +4 -0
- package/dist/agent/backends/index.d.ts +3 -0
- package/dist/agent/backends/index.js +16 -0
- package/dist/agent/backends/model_pool.d.ts +20 -0
- package/dist/agent/backends/model_pool.js +98 -0
- package/dist/agent/backends/openai.js +2 -0
- package/dist/agent/backends/openai_compatible.js +8 -3
- package/dist/agent/backends/openai_responses.d.ts +14 -3
- package/dist/agent/backends/openai_responses.js +91 -26
- package/dist/agent/backends/responses_reasoning.d.ts +5 -0
- package/dist/agent/backends/responses_reasoning.js +23 -0
- package/dist/agent/backends/transport_errors.d.ts +6 -0
- package/dist/agent/backends/transport_errors.js +11 -0
- package/dist/agent/backends/types.d.ts +25 -2
- package/dist/agent/backends/types.js +4 -0
- package/dist/agent/backends/zrouter_stream.d.ts +16 -0
- package/dist/agent/backends/zrouter_stream.js +162 -17
- package/dist/agent/background_workers.d.ts +68 -0
- package/dist/agent/background_workers.js +139 -0
- package/dist/agent/commands/accounts.d.ts +9 -1
- package/dist/agent/commands/accounts.js +13 -5
- package/dist/agent/commands/auth.d.ts +30 -1
- package/dist/agent/commands/auth.js +166 -35
- package/dist/agent/commands/command_refusal.d.ts +8 -0
- package/dist/agent/commands/command_refusal.js +8 -0
- package/dist/agent/commands/compact.js +16 -10
- package/dist/agent/commands/config.js +386 -80
- package/dist/agent/commands/connect.d.ts +20 -0
- package/dist/agent/commands/connect.js +150 -0
- package/dist/agent/commands/credential_redaction.d.ts +12 -0
- package/dist/agent/commands/credential_redaction.js +46 -0
- package/dist/agent/commands/credential_status.d.ts +72 -0
- package/dist/agent/commands/credential_status.js +181 -0
- package/dist/agent/commands/direct_credential_prompt.d.ts +71 -0
- package/dist/agent/commands/direct_credential_prompt.js +422 -0
- package/dist/agent/commands/effort.d.ts +1 -0
- package/dist/agent/commands/effort.js +16 -34
- package/dist/agent/commands/goal.d.ts +0 -4
- package/dist/agent/commands/goal.js +48 -10
- package/dist/agent/commands/handoff.d.ts +6 -0
- package/dist/agent/commands/handoff.js +17 -0
- package/dist/agent/commands/help.js +1 -1
- package/dist/agent/commands/inbox.js +3 -0
- package/dist/agent/commands/index.js +5 -3
- package/dist/agent/commands/keybindings.js +4 -3
- package/dist/agent/commands/mirror.js +29 -16
- package/dist/agent/commands/model.js +83 -4
- package/dist/agent/commands/models.d.ts +1 -1
- package/dist/agent/commands/models.js +89 -67
- package/dist/agent/commands/openai_compat_wizard.d.ts +3 -2
- package/dist/agent/commands/openai_compat_wizard.js +53 -15
- package/dist/agent/commands/provider_choices.d.ts +56 -0
- package/dist/agent/commands/provider_choices.js +72 -3
- package/dist/agent/commands/provider_model_defaults.d.ts +7 -0
- package/dist/agent/commands/provider_model_defaults.js +11 -0
- package/dist/agent/commands/provider_selection.d.ts +27 -2
- package/dist/agent/commands/provider_selection.js +143 -8
- package/dist/agent/commands/reasoning_page.d.ts +33 -0
- package/dist/agent/commands/reasoning_page.js +595 -0
- package/dist/agent/commands/reasoning_picker.d.ts +14 -0
- package/dist/agent/commands/reasoning_picker.js +99 -0
- package/dist/agent/commands/reasoning_settings.d.ts +18 -0
- package/dist/agent/commands/reasoning_settings.js +46 -0
- package/dist/agent/commands/settings.d.ts +2 -0
- package/dist/agent/commands/settings.js +689 -264
- package/dist/agent/commands/status.js +13 -44
- package/dist/agent/commands/types.d.ts +108 -2
- package/dist/agent/commands/update.d.ts +18 -0
- package/dist/agent/commands/update.js +55 -96
- package/dist/agent/completion_state.d.ts +18 -0
- package/dist/agent/completion_state.js +35 -3
- package/dist/agent/factory.d.ts +9 -1
- package/dist/agent/factory.js +61 -17
- package/dist/agent/loop_policy.d.ts +14 -0
- package/dist/agent/loop_policy.js +9 -0
- package/dist/agent/request_encoder.d.ts +6 -0
- package/dist/agent/request_encoder.js +36 -6
- package/dist/agent/result_emit_cap.d.ts +1 -0
- package/dist/agent/result_emit_cap.js +1 -0
- package/dist/agent/runaway_output.d.ts +32 -0
- package/dist/agent/runaway_output.js +80 -0
- package/dist/agent/runtime/command_execution_policy.d.ts +6 -0
- package/dist/agent/runtime/command_execution_policy.js +39 -0
- package/dist/agent/runtime/evidence.d.ts +17 -1
- package/dist/agent/runtime/evidence.js +58 -8
- package/dist/agent/runtime/execution_context.js +7 -3
- package/dist/agent/runtime/read_only_command.d.ts +15 -0
- package/dist/agent/runtime/read_only_command.js +265 -0
- package/dist/agent/runtime/recovery.js +2 -38
- package/dist/agent/runtime/source_verification.js +3 -1
- package/dist/agent/runtime/tool_checkpoints.js +5 -1
- package/dist/agent/runtime/tool_runtime.js +15 -1
- package/dist/agent/runtime/tool_scheduler.js +3 -1
- package/dist/agent/subagent.d.ts +4 -0
- package/dist/agent/subagent.js +195 -23
- package/dist/agent/system_prompt.d.ts +3 -1
- package/dist/agent/system_prompt.js +3 -1
- package/dist/agent/tool_response_store.d.ts +9 -0
- package/dist/agent/tool_response_store.js +39 -3
- package/dist/agent/tool_result_parsing.d.ts +2 -0
- package/dist/agent/tool_result_parsing.js +1 -0
- package/dist/agent/tool_result_presentation.d.ts +21 -0
- package/dist/agent/tool_result_presentation.js +237 -0
- package/dist/agent/tools/apply_patch.js +130 -42
- package/dist/agent/tools/deferred.js +22 -2
- package/dist/agent/tools/delegate.js +182 -49
- package/dist/agent/tools/edit_view.d.ts +13 -0
- package/dist/agent/tools/edit_view.js +134 -0
- package/dist/agent/tools/file.js +54 -16
- package/dist/agent/tools/recall_tool_response.d.ts +6 -0
- package/dist/agent/tools/recall_tool_response.js +60 -17
- package/dist/agent/tools/screenshot.js +5 -3
- package/dist/agent/tools/search.js +18 -9
- package/dist/agent/tools/shell.d.ts +1 -1
- package/dist/agent/tools/shell.js +48 -10
- package/dist/agent/tools/sim_domain_tools.js +7 -1
- package/dist/agent/tools/tool_groups.d.ts +34 -0
- package/dist/agent/tools/tool_groups.js +112 -0
- package/dist/agent/tools/types.d.ts +10 -0
- package/dist/app/activity.js +2 -1
- package/dist/app/agent_runner.js +13 -4
- package/dist/app/ask_user_response.d.ts +6 -0
- package/dist/app/ask_user_response.js +26 -0
- package/dist/app/command_context.js +11 -5
- package/dist/app/launch_notices.d.ts +10 -0
- package/dist/app/launch_notices.js +20 -0
- package/dist/app/selection_completion.d.ts +30 -1
- package/dist/app/selection_completion.js +191 -28
- package/dist/app/session_manager.d.ts +5 -0
- package/dist/app/session_manager.js +50 -12
- package/dist/app/session_messages.d.ts +3 -0
- package/dist/app/session_messages.js +34 -12
- package/dist/app/workspace_admission_details.d.ts +7 -0
- package/dist/app/workspace_admission_details.js +45 -1
- package/dist/cli_args.js +1 -1
- package/dist/cli_main.js +20 -3
- package/dist/cli_ratatui.d.ts +95 -3
- package/dist/cli_ratatui.js +654 -161
- package/dist/components/InputArea.js +1 -1
- package/dist/config/compaction.d.ts +2 -1
- package/dist/config/compaction.js +2 -1
- package/dist/config/defaults.js +20 -48
- package/dist/config/provider_api_key_env.d.ts +76 -0
- package/dist/config/provider_api_key_env.js +148 -0
- package/dist/config/resolved.d.ts +4 -4
- package/dist/config/types.d.ts +102 -1
- package/dist/config.d.ts +70 -8
- package/dist/config.js +253 -63
- package/dist/diagnostics/session_export.d.ts +1 -0
- package/dist/diagnostics/session_export.js +81 -13
- package/dist/emulation/catalog.d.ts +2 -0
- package/dist/emulation/catalog.js +50 -21
- package/dist/emulation/tool_adapters.d.ts +6 -0
- package/dist/emulation/tool_adapters.js +30 -0
- package/dist/emulation/ztc_addendum.d.ts +22 -0
- package/dist/emulation/ztc_addendum.js +37 -0
- package/dist/events.d.ts +3 -0
- package/dist/headless.d.ts +35 -1
- package/dist/headless.js +209 -14
- package/dist/headless_cli.js +6 -0
- package/dist/headless_cli_args.d.ts +4 -0
- package/dist/headless_cli_args.js +2 -0
- package/dist/headless_output_schema.d.ts +46 -0
- package/dist/headless_output_schema.js +386 -0
- package/dist/headless_trajectory.d.ts +44 -0
- package/dist/headless_trajectory.js +113 -0
- package/dist/library.d.ts +6 -3
- package/dist/library.js +8 -4
- package/dist/lsp/client.js +4 -1
- package/dist/lsp/servers.js +2 -0
- package/dist/onboarding/first_run.d.ts +26 -6
- package/dist/onboarding/first_run.js +63 -45
- package/dist/onboarding/router_tips.d.ts +7 -0
- package/dist/onboarding/router_tips.js +38 -0
- package/dist/onboarding/setup.js +1 -1
- package/dist/onboarding/wordmark.d.ts +7 -0
- package/dist/onboarding/wordmark.js +14 -0
- package/dist/onboarding/zergai_login.d.ts +48 -0
- package/dist/onboarding/zergai_login.js +60 -0
- package/dist/prompts/subagent_worker.j2 +20 -0
- package/dist/prompts/tool_delegate_task.j2 +5 -14
- package/dist/router_auth.d.ts +37 -3
- package/dist/router_auth.js +221 -73
- package/dist/runtime_info.d.ts +19 -6
- package/dist/runtime_info.js +64 -28
- package/dist/session.d.ts +9 -0
- package/dist/session.js +41 -8
- package/dist/session_handoff_contract.d.ts +13 -0
- package/dist/session_handoff_contract.js +81 -15
- package/dist/session_media.d.ts +5 -0
- package/dist/session_media.js +2 -1
- package/dist/simulation/domain_types.d.ts +3 -3
- package/dist/simulation/living/context.d.ts +9 -9
- package/dist/simulation/living/definition.d.ts +1 -1
- package/dist/simulation/living/open-world.d.ts +3 -3
- package/dist/simulation/living/recall.d.ts +1 -1
- package/dist/simulation/living/types.d.ts +18 -18
- package/dist/simulation/orchestration/world_response.d.ts +2 -2
- package/dist/simulation/toolkit/dynamic_meetings.d.ts +1 -1
- package/dist/simulation/toolkit/dynamic_state.d.ts +1 -1
- package/dist/simulation/world/bootstrap_schema.d.ts +1 -1
- package/dist/simulation/world/gm_schema.d.ts +8 -8
- package/dist/skills/loader.js +3 -1
- package/dist/types.d.ts +6 -2
- package/dist/ui/core/input.d.ts +5 -1
- package/dist/ui/core/input.js +5 -1
- package/dist/ui/core/input_segments.d.ts +5 -1
- package/dist/ui/core/input_segments.js +5 -3
- package/dist/ui/ratatui/headless_pane_manager.d.ts +3 -1
- package/dist/ui/ratatui/headless_pane_manager.js +16 -5
- package/dist/ui/ratatui/input.js +4 -3
- package/dist/ui/ratatui/process.js +22 -13
- package/dist/ui/ratatui/protocol.d.ts +14 -0
- package/dist/ui/ratatui/protocol.js +2 -0
- package/dist/ui/scrollback.d.ts +17 -0
- package/dist/ui/scrollback.js +138 -4
- package/dist/ui/terminal_image.d.ts +129 -0
- package/dist/ui/terminal_image.js +516 -0
- package/dist/ui/transcript_render_cache.d.ts +4 -4
- package/dist/ui/transcript_render_cache.js +7 -4
- package/dist/ui/views/app.d.ts +7 -3
- package/dist/ui/views/app.js +13 -6
- package/dist/ui/views/completion_menu.js +18 -10
- package/dist/ui/views/input_area.d.ts +1 -2
- package/dist/ui/views/input_area.js +2 -2
- package/dist/ui/views/message_list.d.ts +8 -1
- package/dist/ui/views/message_list.js +176 -45
- package/dist/ui/views/status_bar.js +7 -1
- package/dist/ui/views/theme.d.ts +2 -0
- package/dist/ui/views/theme.js +2 -0
- package/dist/ui/widgets/color_panel.js +4 -3
- package/dist/ui/widgets/form.d.ts +8 -1
- package/dist/ui/widgets/form.js +36 -22
- package/dist/ui/widgets/index.d.ts +1 -1
- package/dist/ui/widgets/index.js +1 -1
- package/dist/ui/widgets/log_view.js +4 -3
- package/dist/ui/widgets/navigator_panel.js +5 -4
- package/dist/ui/widgets/panel_frame.d.ts +2 -0
- package/dist/ui/widgets/panel_frame.js +14 -0
- package/dist/ui/widgets/prompt_viewer.js +2 -1
- package/dist/ui/widgets/questionnaire.js +3 -3
- package/dist/ui/widgets/reasoning_track.d.ts +60 -0
- package/dist/ui/widgets/reasoning_track.js +218 -0
- package/dist/ui/widgets/resume_panel.js +15 -10
- package/dist/ui/widgets/rewind_panel.js +4 -16
- package/dist/ui/widgets/select.d.ts +90 -4
- package/dist/ui/widgets/select.js +305 -135
- package/dist/ui/widgets/settings_panel.d.ts +21 -1
- package/dist/ui/widgets/settings_panel.js +266 -45
- package/dist/ui/widgets/status_line_panel.js +6 -5
- package/dist/ui/widgets/text_input.d.ts +4 -0
- package/dist/ui/widgets/text_input.js +20 -13
- package/dist/ui/widgets/types.d.ts +2 -0
- package/dist/utils/compaction.d.ts +24 -4
- package/dist/utils/compaction.js +228 -44
- package/dist/utils/context.js +1 -0
- package/dist/utils/debug_log.d.ts +12 -0
- package/dist/utils/debug_log.js +25 -3
- package/dist/utils/deepseek.d.ts +3 -1
- package/dist/utils/deepseek.js +29 -1
- package/dist/utils/docker_target.d.ts +28 -0
- package/dist/utils/docker_target.js +89 -0
- package/dist/utils/ephemeral.js +2 -0
- package/dist/utils/fireworks.d.ts +4 -4
- package/dist/utils/fireworks.js +11 -7
- package/dist/utils/idle_compaction.d.ts +32 -0
- package/dist/utils/idle_compaction.js +113 -0
- package/dist/utils/mid_turn_compaction.d.ts +12 -0
- package/dist/utils/mid_turn_compaction.js +17 -0
- package/dist/utils/open_url.d.ts +4 -0
- package/dist/utils/open_url.js +10 -0
- package/dist/utils/openrouter_prices.d.ts +165 -0
- package/dist/utils/openrouter_prices.js +313 -0
- package/dist/utils/router_catalog.d.ts +13 -0
- package/dist/utils/router_catalog.js +30 -3
- package/dist/utils/sandbox.d.ts +12 -0
- package/dist/utils/sandbox.js +23 -5
- package/dist/utils/session_interactivity.d.ts +21 -0
- package/dist/utils/session_interactivity.js +28 -0
- package/dist/utils/shell.d.ts +7 -0
- package/dist/utils/shell.js +43 -7
- package/dist/utils/subprocess_env.d.ts +27 -0
- package/dist/utils/subprocess_env.js +69 -3
- package/dist/utils/tool_output_copies.d.ts +44 -0
- package/dist/utils/tool_output_copies.js +196 -0
- package/dist/utils/tool_result_message.d.ts +7 -0
- package/dist/utils/tool_result_message.js +11 -0
- package/dist/utils/tool_trace.d.ts +15 -0
- package/dist/utils/tool_trace.js +40 -9
- package/dist/web/event_history_store.d.ts +2 -0
- package/dist/web/event_history_store.js +31 -6
- package/dist/web/mirror_client.d.ts +3 -0
- package/dist/web/mirror_stream.d.ts +11 -0
- package/dist/web/mirror_stream.js +23 -3
- package/dist/worker/executor.js +3 -1
- package/dist/worker/toolsets.d.ts +1 -1
- package/dist/worker/toolsets.js +4 -3
- package/dist/worker/types.d.ts +6 -0
- package/dist/worker/worker_models.d.ts +17 -0
- package/dist/worker/worker_models.js +79 -0
- package/dist/zlm-embed.mjs +53761 -10916
- package/node_modules/@zerg/model-contracts/README.md +16 -5
- package/node_modules/@zerg/model-contracts/index.d.ts +7 -3
- package/node_modules/@zerg/model-contracts/index.js +40 -18
- package/node_modules/abort-controller/LICENSE +21 -0
- package/node_modules/abort-controller/README.md +98 -0
- package/node_modules/abort-controller/browser.js +13 -0
- package/node_modules/abort-controller/browser.mjs +11 -0
- package/node_modules/abort-controller/dist/abort-controller.d.ts +43 -0
- package/node_modules/abort-controller/dist/abort-controller.js +127 -0
- package/node_modules/abort-controller/dist/abort-controller.js.map +1 -0
- package/node_modules/abort-controller/dist/abort-controller.mjs +118 -0
- package/node_modules/abort-controller/dist/abort-controller.mjs.map +1 -0
- package/node_modules/abort-controller/dist/abort-controller.umd.js +5 -0
- package/node_modules/abort-controller/dist/abort-controller.umd.js.map +1 -0
- package/node_modules/abort-controller/package.json +97 -0
- package/node_modules/abort-controller/polyfill.js +21 -0
- package/node_modules/abort-controller/polyfill.mjs +19 -0
- package/node_modules/bluebird/LICENSE +1 -1
- package/node_modules/bluebird/README.md +8 -2
- package/node_modules/bluebird/js/browser/bluebird.core.js +325 -150
- package/node_modules/bluebird/js/browser/bluebird.core.min.js +4 -4
- package/node_modules/bluebird/js/browser/bluebird.js +362 -165
- package/node_modules/bluebird/js/browser/bluebird.min.js +5 -5
- package/node_modules/bluebird/js/release/async.js +15 -56
- package/node_modules/bluebird/js/release/debuggability.js +118 -25
- package/node_modules/bluebird/js/release/finally.js +37 -2
- package/node_modules/bluebird/js/release/generators.js +1 -1
- package/node_modules/bluebird/js/release/join.js +4 -7
- package/node_modules/bluebird/js/release/map.js +10 -3
- package/node_modules/bluebird/js/release/promise.js +89 -43
- package/node_modules/bluebird/js/release/promise_array.js +2 -0
- package/node_modules/bluebird/js/release/props.js +1 -1
- package/node_modules/bluebird/js/release/reduce.js +16 -5
- package/node_modules/bluebird/js/release/schedule.js +6 -5
- package/node_modules/bluebird/js/release/settle.js +4 -0
- package/node_modules/bluebird/js/release/util.js +53 -11
- package/node_modules/bluebird/package.json +7 -5
- package/node_modules/buffer/AUTHORS.md +3 -0
- package/node_modules/buffer/README.md +1 -1
- package/node_modules/buffer/index.d.ts +11 -3
- package/node_modules/buffer/index.js +424 -135
- package/node_modules/buffer/package.json +8 -11
- package/node_modules/compress-commons/README.md +1 -1
- package/node_modules/compress-commons/lib/archivers/archive-entry.js +6 -16
- package/node_modules/compress-commons/lib/archivers/archive-output-stream.js +79 -98
- package/node_modules/compress-commons/lib/archivers/zip/constants.js +99 -70
- package/node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js +70 -92
- package/node_modules/compress-commons/lib/archivers/zip/unix-stat.js +19 -53
- package/node_modules/compress-commons/lib/archivers/zip/util.js +49 -49
- package/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js +356 -389
- package/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js +335 -404
- package/node_modules/compress-commons/lib/compress-commons.js +18 -13
- package/node_modules/compress-commons/lib/util/index.js +11 -21
- package/node_modules/compress-commons/node_modules/readable-stream/README.md +116 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/_stream_duplex.js +4 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/_stream_passthrough.js +4 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/_stream_readable.js +4 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/_stream_transform.js +4 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/_stream_writable.js +4 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/shims/process.js +19 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +52 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/buffer_list.js +157 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/compose.js +194 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/destroy.js +290 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/duplex.js +143 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/duplexify.js +378 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +286 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/from.js +98 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +51 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/legacy.js +94 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/operators.js +457 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/passthrough.js +39 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/pipeline.js +471 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/readable.js +1290 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/state.js +39 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/transform.js +180 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/utils.js +327 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/writable.js +819 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/validators.js +530 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/ours/browser.js +35 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/ours/errors.js +343 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/ours/index.js +65 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/ours/primordials.js +124 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/ours/util/inspect.js +55 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/ours/util.js +148 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/stream/promises.js +43 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/stream.js +143 -0
- package/node_modules/compress-commons/node_modules/readable-stream/package.json +89 -0
- package/node_modules/compress-commons/package.json +13 -10
- package/node_modules/crc32-stream/README.md +8 -8
- package/node_modules/crc32-stream/lib/crc32-stream.js +4 -23
- package/node_modules/crc32-stream/lib/deflate-crc32-stream.js +5 -27
- package/node_modules/crc32-stream/lib/index.js +7 -6
- package/node_modules/crc32-stream/node_modules/readable-stream/README.md +116 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/_stream_duplex.js +4 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/_stream_passthrough.js +4 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/_stream_readable.js +4 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/_stream_transform.js +4 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/_stream_writable.js +4 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/shims/process.js +19 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +52 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/buffer_list.js +157 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/compose.js +194 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/destroy.js +290 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/duplex.js +143 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/duplexify.js +378 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +286 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/from.js +98 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +51 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/legacy.js +94 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/operators.js +457 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/passthrough.js +39 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/pipeline.js +471 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/readable.js +1290 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/state.js +39 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/transform.js +180 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/utils.js +327 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/writable.js +819 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/validators.js +530 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/ours/browser.js +35 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/ours/errors.js +343 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/ours/index.js +65 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/ours/primordials.js +124 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/ours/util/inspect.js +55 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/ours/util.js +148 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/stream/promises.js +43 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/stream.js +143 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/package.json +89 -0
- package/node_modules/crc32-stream/package.json +9 -10
- package/node_modules/event-target-shim/LICENSE +22 -0
- package/node_modules/event-target-shim/README.md +293 -0
- package/node_modules/event-target-shim/dist/event-target-shim.js +871 -0
- package/node_modules/event-target-shim/dist/event-target-shim.js.map +1 -0
- package/node_modules/event-target-shim/dist/event-target-shim.mjs +862 -0
- package/node_modules/event-target-shim/dist/event-target-shim.mjs.map +1 -0
- package/node_modules/event-target-shim/dist/event-target-shim.umd.js +6 -0
- package/node_modules/event-target-shim/dist/event-target-shim.umd.js.map +1 -0
- package/node_modules/event-target-shim/index.d.ts +399 -0
- package/node_modules/event-target-shim/package.json +82 -0
- package/node_modules/events/.airtap.yml +15 -0
- package/node_modules/events/.github/FUNDING.yml +12 -0
- package/node_modules/events/.travis.yml +18 -0
- package/node_modules/events/History.md +118 -0
- package/node_modules/events/LICENSE +22 -0
- package/node_modules/events/Readme.md +50 -0
- package/node_modules/events/events.js +497 -0
- package/node_modules/events/package.json +37 -0
- package/node_modules/events/security.md +10 -0
- package/node_modules/events/tests/add-listeners.js +111 -0
- package/node_modules/events/tests/check-listener-leaks.js +101 -0
- package/node_modules/events/tests/common.js +104 -0
- package/node_modules/events/tests/errors.js +13 -0
- package/node_modules/events/tests/events-list.js +28 -0
- package/node_modules/events/tests/events-once.js +234 -0
- package/node_modules/events/tests/index.js +64 -0
- package/node_modules/events/tests/legacy-compat.js +16 -0
- package/node_modules/events/tests/listener-count.js +37 -0
- package/node_modules/events/tests/listeners-side-effects.js +56 -0
- package/node_modules/events/tests/listeners.js +168 -0
- package/node_modules/events/tests/max-listeners.js +47 -0
- package/node_modules/events/tests/method-names.js +35 -0
- package/node_modules/events/tests/modify-in-emit.js +90 -0
- package/node_modules/events/tests/num-args.js +60 -0
- package/node_modules/events/tests/once.js +83 -0
- package/node_modules/events/tests/prepend.js +31 -0
- package/node_modules/events/tests/remove-all-listeners.js +133 -0
- package/node_modules/events/tests/remove-listeners.js +212 -0
- package/node_modules/events/tests/set-max-listeners-side-effects.js +31 -0
- package/node_modules/events/tests/special-event-names.js +45 -0
- package/node_modules/events/tests/subclass.js +66 -0
- package/node_modules/events/tests/symbols.js +25 -0
- package/node_modules/exceljs/lib/stream/xlsx/workbook-reader.js +5 -1
- package/node_modules/exceljs/lib/stream/xlsx/workbook-writer.js +2 -2
- package/node_modules/exceljs/lib/utils/zip-archive.js +85 -0
- package/node_modules/exceljs/package.json +3 -3
- package/node_modules/fs-extra/LICENSE +15 -0
- package/node_modules/fs-extra/README.md +294 -0
- package/node_modules/fs-extra/lib/copy/copy-sync.js +171 -0
- package/node_modules/fs-extra/lib/copy/copy.js +182 -0
- package/node_modules/fs-extra/lib/copy/index.js +7 -0
- package/node_modules/fs-extra/lib/empty/index.js +39 -0
- package/node_modules/fs-extra/lib/ensure/file.js +66 -0
- package/node_modules/fs-extra/lib/ensure/index.js +23 -0
- package/node_modules/fs-extra/lib/ensure/link.js +64 -0
- package/node_modules/fs-extra/lib/ensure/symlink-paths.js +101 -0
- package/node_modules/fs-extra/lib/ensure/symlink-type.js +34 -0
- package/node_modules/fs-extra/lib/ensure/symlink.js +67 -0
- package/node_modules/fs-extra/lib/esm.mjs +68 -0
- package/node_modules/fs-extra/lib/fs/index.js +146 -0
- package/node_modules/fs-extra/lib/index.js +16 -0
- package/node_modules/fs-extra/lib/json/index.js +16 -0
- package/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
- package/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
- package/node_modules/fs-extra/lib/json/output-json.js +12 -0
- package/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
- package/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
- package/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
- package/node_modules/fs-extra/lib/move/index.js +7 -0
- package/node_modules/fs-extra/lib/move/move-sync.js +55 -0
- package/node_modules/fs-extra/lib/move/move.js +59 -0
- package/node_modules/fs-extra/lib/output-file/index.js +31 -0
- package/node_modules/fs-extra/lib/path-exists/index.js +12 -0
- package/node_modules/fs-extra/lib/remove/index.js +17 -0
- package/node_modules/fs-extra/lib/util/stat.js +159 -0
- package/node_modules/fs-extra/lib/util/utimes.js +36 -0
- package/node_modules/fs-extra/package.json +71 -0
- package/node_modules/is-stream/index.d.ts +90 -0
- package/node_modules/is-stream/index.js +37 -0
- package/node_modules/is-stream/license +9 -0
- package/node_modules/is-stream/package.json +48 -0
- package/node_modules/is-stream/readme.md +57 -0
- package/node_modules/jsonfile/LICENSE +15 -0
- package/node_modules/jsonfile/README.md +230 -0
- package/node_modules/jsonfile/index.js +88 -0
- package/node_modules/jsonfile/package.json +40 -0
- package/node_modules/jsonfile/utils.js +18 -0
- package/node_modules/node-int64/.npmignore +3 -0
- package/node_modules/node-int64/Int64.js +268 -0
- package/node_modules/node-int64/LICENSE +19 -0
- package/node_modules/node-int64/README.md +78 -0
- package/node_modules/node-int64/package.json +27 -0
- package/node_modules/node-int64/test.js +120 -0
- package/node_modules/process/.eslintrc +21 -0
- package/node_modules/process/LICENSE +22 -0
- package/node_modules/process/README.md +26 -0
- package/node_modules/process/browser.js +184 -0
- package/node_modules/process/index.js +2 -0
- package/node_modules/process/package.json +27 -0
- package/node_modules/process/test.js +199 -0
- package/node_modules/universalify/LICENSE +20 -0
- package/node_modules/universalify/README.md +76 -0
- package/node_modules/universalify/index.js +24 -0
- package/node_modules/universalify/package.json +34 -0
- package/node_modules/unzipper/README.md +206 -176
- package/node_modules/unzipper/eslint.config.mjs +29 -0
- package/node_modules/unzipper/lib/BufferStream.js +9 -15
- package/node_modules/unzipper/lib/Decrypt.js +58 -36
- package/node_modules/unzipper/lib/NoopStream.js +5 -10
- package/node_modules/unzipper/lib/Open/directory.js +140 -127
- package/node_modules/unzipper/lib/Open/index.js +72 -32
- package/node_modules/unzipper/lib/Open/unzip.js +68 -74
- package/node_modules/unzipper/lib/PullStream.js +50 -55
- package/node_modules/unzipper/lib/extract.js +26 -18
- package/node_modules/unzipper/lib/parse.js +119 -118
- package/node_modules/unzipper/lib/parseBuffer.js +55 -0
- package/node_modules/unzipper/lib/parseExtraField.js +17 -14
- package/node_modules/unzipper/lib/parseOne.js +23 -27
- package/node_modules/unzipper/package.json +12 -13
- package/node_modules/unzipper/unzip.js +0 -6
- package/node_modules/zip-stream/README.md +5 -5
- package/node_modules/zip-stream/index.js +143 -169
- package/node_modules/zip-stream/node_modules/readable-stream/README.md +116 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/_stream_duplex.js +4 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/_stream_passthrough.js +4 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/_stream_readable.js +4 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/_stream_transform.js +4 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/_stream_writable.js +4 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/shims/process.js +19 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +52 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/buffer_list.js +157 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/compose.js +194 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/destroy.js +290 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/duplex.js +143 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/duplexify.js +378 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +286 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/from.js +98 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +51 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/legacy.js +94 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/operators.js +457 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/passthrough.js +39 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/pipeline.js +471 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/readable.js +1290 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/state.js +39 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/transform.js +180 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/utils.js +327 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/writable.js +819 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/validators.js +530 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/ours/browser.js +35 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/ours/errors.js +343 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/ours/index.js +65 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/ours/primordials.js +124 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/ours/util/inspect.js +55 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/ours/util.js +148 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/stream/promises.js +43 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/stream.js +143 -0
- package/node_modules/zip-stream/node_modules/readable-stream/package.json +89 -0
- package/node_modules/zip-stream/package.json +15 -12
- package/node_modules/zip-stream/utils.js +21 -0
- package/package.json +22 -10
- package/packages/exceljs/PROVENANCE.md +24 -1
- package/packages/exceljs/lib/stream/xlsx/workbook-reader.js +5 -1
- package/packages/exceljs/lib/stream/xlsx/workbook-writer.js +2 -2
- package/packages/exceljs/lib/utils/zip-archive.js +85 -0
- package/packages/exceljs/package.json +3 -3
- package/packages/model-contracts/README.md +16 -5
- package/packages/model-contracts/index.d.ts +7 -3
- package/packages/model-contracts/index.js +40 -18
- package/scripts/install-macos-app.mjs +10 -1
- package/node_modules/archiver/LICENSE +0 -22
- package/node_modules/archiver/README.md +0 -94
- package/node_modules/archiver/index.js +0 -84
- package/node_modules/archiver/lib/core.js +0 -974
- package/node_modules/archiver/lib/error.js +0 -40
- package/node_modules/archiver/lib/plugins/json.js +0 -110
- package/node_modules/archiver/lib/plugins/tar.js +0 -167
- package/node_modules/archiver/lib/plugins/zip.js +0 -120
- package/node_modules/archiver/package.json +0 -60
- package/node_modules/archiver-utils/LICENSE +0 -22
- package/node_modules/archiver-utils/README.md +0 -7
- package/node_modules/archiver-utils/file.js +0 -209
- package/node_modules/archiver-utils/index.js +0 -156
- package/node_modules/archiver-utils/node_modules/readable-stream/.travis.yml +0 -34
- package/node_modules/archiver-utils/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/archiver-utils/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/archiver-utils/node_modules/readable-stream/README.md +0 -58
- package/node_modules/archiver-utils/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
- package/node_modules/archiver-utils/node_modules/readable-stream/duplex-browser.js +0 -1
- package/node_modules/archiver-utils/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/_stream_duplex.js +0 -131
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/_stream_passthrough.js +0 -47
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/_stream_readable.js +0 -1019
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/_stream_transform.js +0 -214
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/_stream_writable.js +0 -685
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -78
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -84
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/archiver-utils/node_modules/readable-stream/package.json +0 -52
- package/node_modules/archiver-utils/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/archiver-utils/node_modules/readable-stream/readable-browser.js +0 -7
- package/node_modules/archiver-utils/node_modules/readable-stream/readable.js +0 -19
- package/node_modules/archiver-utils/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/archiver-utils/node_modules/readable-stream/writable-browser.js +0 -1
- package/node_modules/archiver-utils/node_modules/readable-stream/writable.js +0 -8
- package/node_modules/archiver-utils/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/archiver-utils/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/archiver-utils/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/archiver-utils/node_modules/safe-buffer/index.js +0 -62
- package/node_modules/archiver-utils/node_modules/safe-buffer/package.json +0 -37
- package/node_modules/archiver-utils/node_modules/string_decoder/.travis.yml +0 -50
- package/node_modules/archiver-utils/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/archiver-utils/node_modules/string_decoder/README.md +0 -47
- package/node_modules/archiver-utils/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/archiver-utils/node_modules/string_decoder/package.json +0 -31
- package/node_modules/archiver-utils/package.json +0 -54
- package/node_modules/async/CHANGELOG.md +0 -351
- package/node_modules/async/LICENSE +0 -19
- package/node_modules/async/README.md +0 -59
- package/node_modules/async/all.js +0 -119
- package/node_modules/async/allLimit.js +0 -46
- package/node_modules/async/allSeries.js +0 -45
- package/node_modules/async/any.js +0 -122
- package/node_modules/async/anyLimit.js +0 -47
- package/node_modules/async/anySeries.js +0 -46
- package/node_modules/async/apply.js +0 -11
- package/node_modules/async/applyEach.js +0 -57
- package/node_modules/async/applyEachSeries.js +0 -37
- package/node_modules/async/asyncify.js +0 -118
- package/node_modules/async/auto.js +0 -333
- package/node_modules/async/autoInject.js +0 -182
- package/node_modules/async/bower.json +0 -17
- package/node_modules/async/cargo.js +0 -63
- package/node_modules/async/cargoQueue.js +0 -71
- package/node_modules/async/compose.js +0 -55
- package/node_modules/async/concat.js +0 -115
- package/node_modules/async/concatLimit.js +0 -60
- package/node_modules/async/concatSeries.js +0 -41
- package/node_modules/async/constant.js +0 -14
- package/node_modules/async/detect.js +0 -96
- package/node_modules/async/detectLimit.js +0 -48
- package/node_modules/async/detectSeries.js +0 -47
- package/node_modules/async/dir.js +0 -43
- package/node_modules/async/dist/async.js +0 -6061
- package/node_modules/async/dist/async.min.js +0 -1
- package/node_modules/async/dist/async.mjs +0 -5948
- package/node_modules/async/doDuring.js +0 -68
- package/node_modules/async/doUntil.js +0 -46
- package/node_modules/async/doWhilst.js +0 -68
- package/node_modules/async/during.js +0 -78
- package/node_modules/async/each.js +0 -129
- package/node_modules/async/eachLimit.js +0 -50
- package/node_modules/async/eachOf.js +0 -185
- package/node_modules/async/eachOfLimit.js +0 -47
- package/node_modules/async/eachOfSeries.js +0 -39
- package/node_modules/async/eachSeries.js +0 -44
- package/node_modules/async/ensureAsync.js +0 -67
- package/node_modules/async/every.js +0 -119
- package/node_modules/async/everyLimit.js +0 -46
- package/node_modules/async/everySeries.js +0 -45
- package/node_modules/async/filter.js +0 -93
- package/node_modules/async/filterLimit.js +0 -45
- package/node_modules/async/filterSeries.js +0 -43
- package/node_modules/async/find.js +0 -96
- package/node_modules/async/findLimit.js +0 -48
- package/node_modules/async/findSeries.js +0 -47
- package/node_modules/async/flatMap.js +0 -115
- package/node_modules/async/flatMapLimit.js +0 -60
- package/node_modules/async/flatMapSeries.js +0 -41
- package/node_modules/async/foldl.js +0 -153
- package/node_modules/async/foldr.js +0 -41
- package/node_modules/async/forEach.js +0 -129
- package/node_modules/async/forEachLimit.js +0 -50
- package/node_modules/async/forEachOf.js +0 -185
- package/node_modules/async/forEachOfLimit.js +0 -47
- package/node_modules/async/forEachOfSeries.js +0 -39
- package/node_modules/async/forEachSeries.js +0 -44
- package/node_modules/async/forever.js +0 -68
- package/node_modules/async/groupBy.js +0 -108
- package/node_modules/async/groupByLimit.js +0 -71
- package/node_modules/async/groupBySeries.js +0 -36
- package/node_modules/async/index.js +0 -588
- package/node_modules/async/inject.js +0 -153
- package/node_modules/async/internal/DoublyLinkedList.js +0 -92
- package/node_modules/async/internal/Heap.js +0 -120
- package/node_modules/async/internal/applyEach.js +0 -29
- package/node_modules/async/internal/asyncEachOfLimit.js +0 -75
- package/node_modules/async/internal/awaitify.js +0 -28
- package/node_modules/async/internal/breakLoop.js +0 -10
- package/node_modules/async/internal/consoleFunc.js +0 -31
- package/node_modules/async/internal/createTester.js +0 -40
- package/node_modules/async/internal/eachOfLimit.js +0 -90
- package/node_modules/async/internal/filter.js +0 -55
- package/node_modules/async/internal/getIterator.js +0 -11
- package/node_modules/async/internal/initialParams.js +0 -14
- package/node_modules/async/internal/isArrayLike.js +0 -10
- package/node_modules/async/internal/iterator.js +0 -57
- package/node_modules/async/internal/map.js +0 -30
- package/node_modules/async/internal/once.js +0 -17
- package/node_modules/async/internal/onlyOnce.js +0 -15
- package/node_modules/async/internal/parallel.js +0 -34
- package/node_modules/async/internal/promiseCallback.js +0 -23
- package/node_modules/async/internal/queue.js +0 -294
- package/node_modules/async/internal/range.js +0 -14
- package/node_modules/async/internal/reject.js +0 -26
- package/node_modules/async/internal/setImmediate.js +0 -34
- package/node_modules/async/internal/withoutIndex.js +0 -10
- package/node_modules/async/internal/wrapAsync.js +0 -34
- package/node_modules/async/log.js +0 -41
- package/node_modules/async/map.js +0 -142
- package/node_modules/async/mapLimit.js +0 -45
- package/node_modules/async/mapSeries.js +0 -44
- package/node_modules/async/mapValues.js +0 -152
- package/node_modules/async/mapValuesLimit.js +0 -61
- package/node_modules/async/mapValuesSeries.js +0 -37
- package/node_modules/async/memoize.js +0 -91
- package/node_modules/async/nextTick.js +0 -52
- package/node_modules/async/package.json +0 -75
- package/node_modules/async/parallel.js +0 -180
- package/node_modules/async/parallelLimit.js +0 -41
- package/node_modules/async/priorityQueue.js +0 -60
- package/node_modules/async/queue.js +0 -24
- package/node_modules/async/race.js +0 -67
- package/node_modules/async/reduce.js +0 -153
- package/node_modules/async/reduceRight.js +0 -41
- package/node_modules/async/reflect.js +0 -78
- package/node_modules/async/reflectAll.js +0 -93
- package/node_modules/async/reject.js +0 -87
- package/node_modules/async/rejectLimit.js +0 -45
- package/node_modules/async/rejectSeries.js +0 -43
- package/node_modules/async/retry.js +0 -159
- package/node_modules/async/retryable.js +0 -77
- package/node_modules/async/select.js +0 -93
- package/node_modules/async/selectLimit.js +0 -45
- package/node_modules/async/selectSeries.js +0 -43
- package/node_modules/async/seq.js +0 -79
- package/node_modules/async/series.js +0 -186
- package/node_modules/async/setImmediate.js +0 -45
- package/node_modules/async/some.js +0 -122
- package/node_modules/async/someLimit.js +0 -47
- package/node_modules/async/someSeries.js +0 -46
- package/node_modules/async/sortBy.js +0 -190
- package/node_modules/async/timeout.js +0 -89
- package/node_modules/async/times.js +0 -50
- package/node_modules/async/timesLimit.js +0 -43
- package/node_modules/async/timesSeries.js +0 -32
- package/node_modules/async/transform.js +0 -173
- package/node_modules/async/tryEach.js +0 -78
- package/node_modules/async/unmemoize.js +0 -25
- package/node_modules/async/until.js +0 -61
- package/node_modules/async/waterfall.js +0 -105
- package/node_modules/async/whilst.js +0 -78
- package/node_modules/async/wrapSync.js +0 -118
- package/node_modules/big-integer/BigInteger.d.ts +0 -2393
- package/node_modules/big-integer/BigInteger.js +0 -1453
- package/node_modules/big-integer/BigInteger.min.js +0 -1
- package/node_modules/big-integer/LICENSE +0 -24
- package/node_modules/big-integer/README.md +0 -589
- package/node_modules/big-integer/bower.json +0 -29
- package/node_modules/big-integer/package.json +0 -48
- package/node_modules/big-integer/tsconfig.json +0 -24
- package/node_modules/binary/.npmignore +0 -1
- package/node_modules/binary/.travis.yml +0 -4
- package/node_modules/binary/README.markdown +0 -177
- package/node_modules/binary/example/buf.js +0 -11
- package/node_modules/binary/example/parse.js +0 -10
- package/node_modules/binary/example/stream.js +0 -12
- package/node_modules/binary/index.js +0 -397
- package/node_modules/binary/lib/vars.js +0 -28
- package/node_modules/binary/package.json +0 -38
- package/node_modules/binary/perf/loop.js +0 -92
- package/node_modules/binary/perf/small.js +0 -80
- package/node_modules/binary/test/bu.js +0 -46
- package/node_modules/binary/test/deferred.js +0 -20
- package/node_modules/binary/test/dots.js +0 -23
- package/node_modules/binary/test/eof.js +0 -41
- package/node_modules/binary/test/flush.js +0 -17
- package/node_modules/binary/test/from_buffer.js +0 -14
- package/node_modules/binary/test/get_buffer.js +0 -28
- package/node_modules/binary/test/immediate.js +0 -18
- package/node_modules/binary/test/interval.js +0 -38
- package/node_modules/binary/test/into_buffer.js +0 -35
- package/node_modules/binary/test/into_stream.js +0 -43
- package/node_modules/binary/test/loop.js +0 -44
- package/node_modules/binary/test/loop_scan.js +0 -54
- package/node_modules/binary/test/lu.js +0 -46
- package/node_modules/binary/test/negbs.js +0 -29
- package/node_modules/binary/test/negls.js +0 -29
- package/node_modules/binary/test/nested.js +0 -35
- package/node_modules/binary/test/not_enough_buf.js +0 -17
- package/node_modules/binary/test/not_enough_parse.js +0 -19
- package/node_modules/binary/test/parse.js +0 -54
- package/node_modules/binary/test/peek.js +0 -40
- package/node_modules/binary/test/pipe.js +0 -49
- package/node_modules/binary/test/posbs.js +0 -29
- package/node_modules/binary/test/posls.js +0 -29
- package/node_modules/binary/test/scan.js +0 -33
- package/node_modules/binary/test/scan_buf.js +0 -18
- package/node_modules/binary/test/scan_buf_null.js +0 -16
- package/node_modules/binary/test/skip.js +0 -58
- package/node_modules/binary/test/split.js +0 -34
- package/node_modules/bl/.travis.yml +0 -17
- package/node_modules/bl/BufferList.js +0 -396
- package/node_modules/bl/LICENSE.md +0 -13
- package/node_modules/bl/README.md +0 -247
- package/node_modules/bl/bl.js +0 -84
- package/node_modules/bl/package.json +0 -37
- package/node_modules/bl/test/convert.js +0 -21
- package/node_modules/bl/test/indexOf.js +0 -492
- package/node_modules/bl/test/isBufferList.js +0 -32
- package/node_modules/bl/test/test.js +0 -869
- package/node_modules/buffer-crc32/LICENSE +0 -19
- package/node_modules/buffer-crc32/README.md +0 -47
- package/node_modules/buffer-crc32/index.js +0 -111
- package/node_modules/buffer-crc32/package.json +0 -39
- package/node_modules/buffer-indexof-polyfill/.eslintrc +0 -33
- package/node_modules/buffer-indexof-polyfill/.travis.yml +0 -17
- package/node_modules/buffer-indexof-polyfill/LICENSE +0 -22
- package/node_modules/buffer-indexof-polyfill/README.md +0 -33
- package/node_modules/buffer-indexof-polyfill/index.js +0 -73
- package/node_modules/buffer-indexof-polyfill/init-buffer.js +0 -8
- package/node_modules/buffer-indexof-polyfill/package.json +0 -34
- package/node_modules/buffer-indexof-polyfill/test/indexof.js +0 -128
- package/node_modules/buffers/README.markdown +0 -122
- package/node_modules/buffers/examples/slice.js +0 -9
- package/node_modules/buffers/examples/splice.js +0 -17
- package/node_modules/buffers/index.js +0 -269
- package/node_modules/buffers/package.json +0 -14
- package/node_modules/buffers/test/buffers.js +0 -209
- package/node_modules/chainsaw/.npmignore +0 -1
- package/node_modules/chainsaw/README.markdown +0 -157
- package/node_modules/chainsaw/examples/add_do.js +0 -25
- package/node_modules/chainsaw/examples/prompt.js +0 -67
- package/node_modules/chainsaw/index.js +0 -145
- package/node_modules/chainsaw/package.json +0 -23
- package/node_modules/chainsaw/test/chainsaw.js +0 -418
- package/node_modules/concat-map/.travis.yml +0 -4
- package/node_modules/concat-map/LICENSE +0 -18
- package/node_modules/concat-map/README.markdown +0 -62
- package/node_modules/concat-map/example/map.js +0 -6
- package/node_modules/concat-map/index.js +0 -13
- package/node_modules/concat-map/package.json +0 -43
- package/node_modules/concat-map/test/map.js +0 -39
- package/node_modules/end-of-stream/LICENSE +0 -21
- package/node_modules/end-of-stream/README.md +0 -54
- package/node_modules/end-of-stream/index.js +0 -96
- package/node_modules/end-of-stream/package.json +0 -37
- package/node_modules/fs-constants/LICENSE +0 -21
- package/node_modules/fs-constants/README.md +0 -26
- package/node_modules/fs-constants/browser.js +0 -1
- package/node_modules/fs-constants/index.js +0 -1
- package/node_modules/fs-constants/package.json +0 -19
- package/node_modules/fs.realpath/LICENSE +0 -43
- package/node_modules/fs.realpath/README.md +0 -33
- package/node_modules/fs.realpath/index.js +0 -66
- package/node_modules/fs.realpath/old.js +0 -303
- package/node_modules/fs.realpath/package.json +0 -26
- package/node_modules/fstream/.travis.yml +0 -9
- package/node_modules/fstream/LICENSE +0 -15
- package/node_modules/fstream/README.md +0 -76
- package/node_modules/fstream/examples/filter-pipe.js +0 -134
- package/node_modules/fstream/examples/pipe.js +0 -118
- package/node_modules/fstream/examples/reader.js +0 -68
- package/node_modules/fstream/examples/symlink-write.js +0 -27
- package/node_modules/fstream/fstream.js +0 -35
- package/node_modules/fstream/lib/abstract.js +0 -85
- package/node_modules/fstream/lib/collect.js +0 -70
- package/node_modules/fstream/lib/dir-reader.js +0 -252
- package/node_modules/fstream/lib/dir-writer.js +0 -174
- package/node_modules/fstream/lib/file-reader.js +0 -150
- package/node_modules/fstream/lib/file-writer.js +0 -107
- package/node_modules/fstream/lib/get-type.js +0 -33
- package/node_modules/fstream/lib/link-reader.js +0 -53
- package/node_modules/fstream/lib/link-writer.js +0 -95
- package/node_modules/fstream/lib/proxy-reader.js +0 -95
- package/node_modules/fstream/lib/proxy-writer.js +0 -111
- package/node_modules/fstream/lib/reader.js +0 -255
- package/node_modules/fstream/lib/socket-reader.js +0 -36
- package/node_modules/fstream/lib/writer.js +0 -390
- package/node_modules/fstream/package.json +0 -28
- package/node_modules/glob/LICENSE +0 -21
- package/node_modules/glob/README.md +0 -378
- package/node_modules/glob/common.js +0 -238
- package/node_modules/glob/glob.js +0 -790
- package/node_modules/glob/node_modules/balanced-match/.github/FUNDING.yml +0 -2
- package/node_modules/glob/node_modules/balanced-match/LICENSE.md +0 -21
- package/node_modules/glob/node_modules/balanced-match/README.md +0 -97
- package/node_modules/glob/node_modules/balanced-match/index.js +0 -62
- package/node_modules/glob/node_modules/balanced-match/package.json +0 -48
- package/node_modules/glob/node_modules/brace-expansion/LICENSE +0 -21
- package/node_modules/glob/node_modules/brace-expansion/README.md +0 -151
- package/node_modules/glob/node_modules/brace-expansion/index.js +0 -438
- package/node_modules/glob/node_modules/brace-expansion/package.json +0 -50
- package/node_modules/glob/node_modules/minimatch/LICENSE +0 -15
- package/node_modules/glob/node_modules/minimatch/README.md +0 -267
- package/node_modules/glob/node_modules/minimatch/minimatch.js +0 -1005
- package/node_modules/glob/node_modules/minimatch/package.json +0 -33
- package/node_modules/glob/package.json +0 -55
- package/node_modules/glob/sync.js +0 -486
- package/node_modules/inflight/LICENSE +0 -15
- package/node_modules/inflight/README.md +0 -37
- package/node_modules/inflight/inflight.js +0 -54
- package/node_modules/inflight/package.json +0 -29
- package/node_modules/lazystream/LICENSE +0 -23
- package/node_modules/lazystream/README.md +0 -114
- package/node_modules/lazystream/lib/lazystream.js +0 -54
- package/node_modules/lazystream/node_modules/readable-stream/.travis.yml +0 -34
- package/node_modules/lazystream/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/lazystream/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/lazystream/node_modules/readable-stream/README.md +0 -58
- package/node_modules/lazystream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
- package/node_modules/lazystream/node_modules/readable-stream/duplex-browser.js +0 -1
- package/node_modules/lazystream/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/lazystream/node_modules/readable-stream/lib/_stream_duplex.js +0 -131
- package/node_modules/lazystream/node_modules/readable-stream/lib/_stream_passthrough.js +0 -47
- package/node_modules/lazystream/node_modules/readable-stream/lib/_stream_readable.js +0 -1019
- package/node_modules/lazystream/node_modules/readable-stream/lib/_stream_transform.js +0 -214
- package/node_modules/lazystream/node_modules/readable-stream/lib/_stream_writable.js +0 -685
- package/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -78
- package/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -84
- package/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/lazystream/node_modules/readable-stream/package.json +0 -52
- package/node_modules/lazystream/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/lazystream/node_modules/readable-stream/readable-browser.js +0 -7
- package/node_modules/lazystream/node_modules/readable-stream/readable.js +0 -19
- package/node_modules/lazystream/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/lazystream/node_modules/readable-stream/writable-browser.js +0 -1
- package/node_modules/lazystream/node_modules/readable-stream/writable.js +0 -8
- package/node_modules/lazystream/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/lazystream/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/lazystream/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/lazystream/node_modules/safe-buffer/index.js +0 -62
- package/node_modules/lazystream/node_modules/safe-buffer/package.json +0 -37
- package/node_modules/lazystream/node_modules/string_decoder/.travis.yml +0 -50
- package/node_modules/lazystream/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/lazystream/node_modules/string_decoder/README.md +0 -47
- package/node_modules/lazystream/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/lazystream/node_modules/string_decoder/package.json +0 -31
- package/node_modules/lazystream/package.json +0 -46
- package/node_modules/lazystream/test/data.md +0 -13
- package/node_modules/lazystream/test/fs_test.js +0 -69
- package/node_modules/lazystream/test/helper.js +0 -39
- package/node_modules/lazystream/test/pipe_test.js +0 -36
- package/node_modules/lazystream/test/readable_test.js +0 -90
- package/node_modules/lazystream/test/writable_test.js +0 -59
- package/node_modules/listenercount/.npmignore +0 -2
- package/node_modules/listenercount/LICENSE.md +0 -5
- package/node_modules/listenercount/README.md +0 -50
- package/node_modules/listenercount/circle.yml +0 -6
- package/node_modules/listenercount/index.js +0 -16
- package/node_modules/listenercount/package.json +0 -27
- package/node_modules/listenercount/test/test.js +0 -31
- package/node_modules/lodash.defaults/LICENSE +0 -47
- package/node_modules/lodash.defaults/README.md +0 -18
- package/node_modules/lodash.defaults/index.js +0 -668
- package/node_modules/lodash.defaults/package.json +0 -17
- package/node_modules/lodash.difference/LICENSE +0 -47
- package/node_modules/lodash.difference/README.md +0 -18
- package/node_modules/lodash.difference/index.js +0 -1170
- package/node_modules/lodash.difference/package.json +0 -17
- package/node_modules/lodash.flatten/LICENSE +0 -47
- package/node_modules/lodash.flatten/README.md +0 -18
- package/node_modules/lodash.flatten/index.js +0 -349
- package/node_modules/lodash.flatten/package.json +0 -17
- package/node_modules/lodash.isplainobject/LICENSE +0 -47
- package/node_modules/lodash.isplainobject/README.md +0 -18
- package/node_modules/lodash.isplainobject/index.js +0 -139
- package/node_modules/lodash.isplainobject/package.json +0 -17
- package/node_modules/lodash.union/LICENSE +0 -47
- package/node_modules/lodash.union/README.md +0 -18
- package/node_modules/lodash.union/index.js +0 -1181
- package/node_modules/lodash.union/package.json +0 -17
- package/node_modules/minimist/.eslintrc +0 -29
- package/node_modules/minimist/.github/FUNDING.yml +0 -12
- package/node_modules/minimist/.nycrc +0 -14
- package/node_modules/minimist/CHANGELOG.md +0 -298
- package/node_modules/minimist/LICENSE +0 -18
- package/node_modules/minimist/README.md +0 -121
- package/node_modules/minimist/example/parse.js +0 -4
- package/node_modules/minimist/index.js +0 -263
- package/node_modules/minimist/package.json +0 -75
- package/node_modules/minimist/test/all_bool.js +0 -34
- package/node_modules/minimist/test/bool.js +0 -177
- package/node_modules/minimist/test/dash.js +0 -43
- package/node_modules/minimist/test/default_bool.js +0 -37
- package/node_modules/minimist/test/dotted.js +0 -24
- package/node_modules/minimist/test/kv_short.js +0 -32
- package/node_modules/minimist/test/long.js +0 -33
- package/node_modules/minimist/test/num.js +0 -38
- package/node_modules/minimist/test/parse.js +0 -209
- package/node_modules/minimist/test/parse_modified.js +0 -11
- package/node_modules/minimist/test/proto.js +0 -64
- package/node_modules/minimist/test/short.js +0 -69
- package/node_modules/minimist/test/stop_early.js +0 -17
- package/node_modules/minimist/test/unknown.js +0 -104
- package/node_modules/minimist/test/whitespace.js +0 -10
- package/node_modules/mkdirp/LICENSE +0 -21
- package/node_modules/mkdirp/bin/cmd.js +0 -33
- package/node_modules/mkdirp/bin/usage.txt +0 -12
- package/node_modules/mkdirp/index.js +0 -102
- package/node_modules/mkdirp/package.json +0 -33
- package/node_modules/mkdirp/readme.markdown +0 -100
- package/node_modules/once/LICENSE +0 -15
- package/node_modules/once/README.md +0 -79
- package/node_modules/once/once.js +0 -42
- package/node_modules/once/package.json +0 -33
- package/node_modules/path-is-absolute/index.js +0 -20
- package/node_modules/path-is-absolute/license +0 -21
- package/node_modules/path-is-absolute/package.json +0 -43
- package/node_modules/path-is-absolute/readme.md +0 -59
- package/node_modules/readdir-glob/LICENSE +0 -201
- package/node_modules/readdir-glob/README.md +0 -85
- package/node_modules/readdir-glob/index.js +0 -243
- package/node_modules/readdir-glob/node_modules/balanced-match/.github/FUNDING.yml +0 -2
- package/node_modules/readdir-glob/node_modules/balanced-match/LICENSE.md +0 -21
- package/node_modules/readdir-glob/node_modules/balanced-match/README.md +0 -97
- package/node_modules/readdir-glob/node_modules/balanced-match/index.js +0 -62
- package/node_modules/readdir-glob/node_modules/balanced-match/package.json +0 -48
- package/node_modules/readdir-glob/node_modules/brace-expansion/.github/FUNDING.yml +0 -2
- package/node_modules/readdir-glob/node_modules/brace-expansion/LICENSE +0 -21
- package/node_modules/readdir-glob/node_modules/brace-expansion/README.md +0 -157
- package/node_modules/readdir-glob/node_modules/brace-expansion/index.js +0 -394
- package/node_modules/readdir-glob/node_modules/brace-expansion/package.json +0 -49
- package/node_modules/readdir-glob/node_modules/minimatch/LICENSE +0 -15
- package/node_modules/readdir-glob/node_modules/minimatch/README.md +0 -296
- package/node_modules/readdir-glob/node_modules/minimatch/lib/path.js +0 -4
- package/node_modules/readdir-glob/node_modules/minimatch/minimatch.js +0 -996
- package/node_modules/readdir-glob/node_modules/minimatch/package.json +0 -35
- package/node_modules/readdir-glob/package.json +0 -43
- package/node_modules/rimraf/LICENSE +0 -15
- package/node_modules/rimraf/README.md +0 -101
- package/node_modules/rimraf/bin.js +0 -50
- package/node_modules/rimraf/package.json +0 -29
- package/node_modules/rimraf/rimraf.js +0 -372
- package/node_modules/tar-stream/LICENSE +0 -21
- package/node_modules/tar-stream/README.md +0 -168
- package/node_modules/tar-stream/extract.js +0 -257
- package/node_modules/tar-stream/headers.js +0 -295
- package/node_modules/tar-stream/index.js +0 -2
- package/node_modules/tar-stream/pack.js +0 -255
- package/node_modules/tar-stream/package.json +0 -58
- package/node_modules/tar-stream/sandbox.js +0 -11
- package/node_modules/traverse/.npmignore +0 -1
- package/node_modules/traverse/LICENSE +0 -24
- package/node_modules/traverse/README.markdown +0 -247
- package/node_modules/traverse/examples/json.js +0 -16
- package/node_modules/traverse/examples/leaves.js +0 -15
- package/node_modules/traverse/examples/negative.js +0 -8
- package/node_modules/traverse/examples/stringify.js +0 -38
- package/node_modules/traverse/index.js +0 -322
- package/node_modules/traverse/package.json +0 -18
- package/node_modules/traverse/test/circular.js +0 -114
- package/node_modules/traverse/test/date.js +0 -35
- package/node_modules/traverse/test/equal.js +0 -219
- package/node_modules/traverse/test/instance.js +0 -17
- package/node_modules/traverse/test/interface.js +0 -42
- package/node_modules/traverse/test/json.js +0 -47
- package/node_modules/traverse/test/leaves.js +0 -21
- package/node_modules/traverse/test/mutability.js +0 -203
- package/node_modules/traverse/test/negative.js +0 -20
- package/node_modules/traverse/test/obj.js +0 -15
- package/node_modules/traverse/test/stop.js +0 -41
- package/node_modules/traverse/test/stringify.js +0 -36
- package/node_modules/traverse/test/super_deep.js +0 -54
- package/node_modules/unzipper/.circleci/config.yml +0 -13
- package/node_modules/unzipper/.travis.yml +0 -21
- package/node_modules/unzipper/lib/Buffer.js +0 -12
- package/node_modules/unzipper/node_modules/readable-stream/.travis.yml +0 -34
- package/node_modules/unzipper/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/unzipper/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/unzipper/node_modules/readable-stream/README.md +0 -58
- package/node_modules/unzipper/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
- package/node_modules/unzipper/node_modules/readable-stream/duplex-browser.js +0 -1
- package/node_modules/unzipper/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/unzipper/node_modules/readable-stream/lib/_stream_duplex.js +0 -131
- package/node_modules/unzipper/node_modules/readable-stream/lib/_stream_passthrough.js +0 -47
- package/node_modules/unzipper/node_modules/readable-stream/lib/_stream_readable.js +0 -1019
- package/node_modules/unzipper/node_modules/readable-stream/lib/_stream_transform.js +0 -214
- package/node_modules/unzipper/node_modules/readable-stream/lib/_stream_writable.js +0 -685
- package/node_modules/unzipper/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -78
- package/node_modules/unzipper/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -84
- package/node_modules/unzipper/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/unzipper/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/unzipper/node_modules/readable-stream/package.json +0 -52
- package/node_modules/unzipper/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/unzipper/node_modules/readable-stream/readable-browser.js +0 -7
- package/node_modules/unzipper/node_modules/readable-stream/readable.js +0 -19
- package/node_modules/unzipper/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/unzipper/node_modules/readable-stream/writable-browser.js +0 -1
- package/node_modules/unzipper/node_modules/readable-stream/writable.js +0 -8
- package/node_modules/unzipper/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/unzipper/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/unzipper/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/unzipper/node_modules/safe-buffer/index.js +0 -62
- package/node_modules/unzipper/node_modules/safe-buffer/package.json +0 -37
- package/node_modules/unzipper/node_modules/string_decoder/.travis.yml +0 -50
- package/node_modules/unzipper/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/unzipper/node_modules/string_decoder/README.md +0 -47
- package/node_modules/unzipper/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/unzipper/node_modules/string_decoder/package.json +0 -31
- package/node_modules/wrappy/LICENSE +0 -15
- package/node_modules/wrappy/README.md +0 -36
- package/node_modules/wrappy/package.json +0 -29
- package/node_modules/wrappy/wrappy.js +0 -33
- package/node_modules/zip-stream/node_modules/archiver-utils/LICENSE +0 -22
- package/node_modules/zip-stream/node_modules/archiver-utils/README.md +0 -6
- package/node_modules/zip-stream/node_modules/archiver-utils/file.js +0 -209
- package/node_modules/zip-stream/node_modules/archiver-utils/index.js +0 -149
- package/node_modules/zip-stream/node_modules/archiver-utils/package.json +0 -54
- /package/node_modules/{archiver-utils → compress-commons}/node_modules/readable-stream/LICENSE +0 -0
- /package/node_modules/{lazystream → crc32-stream}/node_modules/readable-stream/LICENSE +0 -0
- /package/node_modules/{unzipper → zip-stream}/node_modules/readable-stream/LICENSE +0 -0
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The reasoning page (user 2026-10-25): one page, like /config's, with the
|
|
3
|
+
* model's effort and thinking and, for an OpenRouter model, how OpenRouter
|
|
4
|
+
* routes it: the route (default, cheapest, fastest or one provider), the sort,
|
|
5
|
+
* the provider and its fallbacks, and the rules that narrow the providers
|
|
6
|
+
* (zero data retention, quantization, data collection). Each change applies at
|
|
7
|
+
* once, as /config does, and the price of the current choice shows under the
|
|
8
|
+
* title, from the model's provider list Router keeps.
|
|
9
|
+
*
|
|
10
|
+
* The Providers row opens OpenRouter's provider table (user 2026-10-26): each
|
|
11
|
+
* provider's price, cache read, latency, throughput and uptime side by side,
|
|
12
|
+
* sorted by the column ← → pick, at the percentile p steps through, and
|
|
13
|
+
* choosing a row pins that provider.
|
|
14
|
+
*
|
|
15
|
+
* Limits (user 2026-10-26) cap the price and set the least throughput and
|
|
16
|
+
* uptime and the most latency: each row offers the values that sort the
|
|
17
|
+
* providers now, saying how many meet each, and the table sets apart those
|
|
18
|
+
* outside them and marks the figure that misses.
|
|
19
|
+
*/
|
|
20
|
+
import { choicePrice, effectiveLimits, fetchOpenRouterRoutePrices, formatLatency, formatLimits, formatPriceRange, formatRate, formatThroughput, formatUsd, limitMisses, } from '../../utils/openrouter_prices.js';
|
|
21
|
+
import { applyModelEffort } from './reasoning_settings.js';
|
|
22
|
+
/** The option that means thinking off; the others are effort levels. */
|
|
23
|
+
const OFF = 'none';
|
|
24
|
+
function endpointLabel(endpoint) {
|
|
25
|
+
const quantization = endpoint.quantization === 'unknown' ? '' : ` (${endpoint.quantization})`;
|
|
26
|
+
return `${endpoint.provider}${quantization}${endpoint.tier === 'standard' ? '' : ` · ${endpoint.tier} tier`}`;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* What tells an endpoint apart from others under the same label: its tag
|
|
30
|
+
* without the provider and the quantization already shown (`us`, `spot`).
|
|
31
|
+
*/
|
|
32
|
+
function endpointQualifier(endpoint) {
|
|
33
|
+
return endpoint.tag.split('/').slice(1).filter(part => part !== endpoint.quantization).join('/');
|
|
34
|
+
}
|
|
35
|
+
/** The qualifier of each endpoint whose label another endpoint shares, by tag. */
|
|
36
|
+
function sharedQualifiers(endpoints) {
|
|
37
|
+
const labels = endpoints.map(endpointLabel);
|
|
38
|
+
return new Map(endpoints.flatMap((endpoint, index) => labels.filter(label => label === labels[index]).length > 1
|
|
39
|
+
? [[endpoint.tag, endpointQualifier(endpoint)]] : []));
|
|
40
|
+
}
|
|
41
|
+
/** A token count as 131K or 1M. */
|
|
42
|
+
function formatTokens(count) {
|
|
43
|
+
return count >= 1_000_000 ? `${Number((count / 1_000_000).toFixed(1))}M` : `${Math.round(count / 1000)}K`;
|
|
44
|
+
}
|
|
45
|
+
const formatPercent = (value) => `${Number(value.toFixed(1))}%`;
|
|
46
|
+
const uptimeTone = (value) => value === null ? 'muted' : value >= 99 ? 'good' : value >= 95 ? 'warn' : 'bad';
|
|
47
|
+
/**
|
|
48
|
+
* Everything the table has no column for, read under the highlighted row:
|
|
49
|
+
* the price before a discount, limits, each uptime window and the latency spread.
|
|
50
|
+
*/
|
|
51
|
+
function endpointDetail(endpoint, standing) {
|
|
52
|
+
const exact = formatPriceRange({ input_per_1m: { min: endpoint.input_per_1m, max: endpoint.input_per_1m },
|
|
53
|
+
output_per_1m: { min: endpoint.output_per_1m, max: endpoint.output_per_1m } });
|
|
54
|
+
const parts = [exact, ...(standing ? [standing] : []), endpoint.provider];
|
|
55
|
+
if (endpoint.quantization !== 'unknown')
|
|
56
|
+
parts.push(endpoint.quantization);
|
|
57
|
+
if (endpoint.tier === 'flex')
|
|
58
|
+
parts.push('flex tier: cheaper, may queue, used by Cheapest');
|
|
59
|
+
if (endpoint.tier === 'priority')
|
|
60
|
+
parts.push('priority tier: faster, costs more, used by Fastest');
|
|
61
|
+
if (endpoint.zdr)
|
|
62
|
+
parts.push('zero data retention');
|
|
63
|
+
const discount = endpoint.discount ?? 0;
|
|
64
|
+
if (discount > 0) {
|
|
65
|
+
parts.push(`${Math.round(discount * 100)}% off: was ${formatRate(endpoint.input_per_1m / (1 - discount))} in · `
|
|
66
|
+
+ `${formatRate(endpoint.output_per_1m / (1 - discount))} out`);
|
|
67
|
+
}
|
|
68
|
+
if (endpoint.cache_read_per_1m != null)
|
|
69
|
+
parts.push(`cache read ${formatRate(endpoint.cache_read_per_1m)}`);
|
|
70
|
+
if (endpoint.context_length)
|
|
71
|
+
parts.push(`context ${formatTokens(endpoint.context_length)}`);
|
|
72
|
+
if (endpoint.max_output)
|
|
73
|
+
parts.push(`max output ${formatTokens(endpoint.max_output)}`);
|
|
74
|
+
const uptime = endpoint.uptime;
|
|
75
|
+
const windows = uptime ? [[uptime.last_1d, 'last 24h'], [uptime.last_30m, 'last 30 min'], [uptime.last_5m, 'last 5 min']] : [];
|
|
76
|
+
const shown = windows.filter(([value]) => value !== null).map(([value, window]) => `${formatPercent(value)} ${window}`);
|
|
77
|
+
if (shown.length > 0)
|
|
78
|
+
parts.push(`uptime ${shown.join(' · ')}`);
|
|
79
|
+
if (endpoint.latency_ms)
|
|
80
|
+
parts.push(`latency P50 ${formatLatency(endpoint.latency_ms.p50)} · P90 ${formatLatency(endpoint.latency_ms.p90)}`);
|
|
81
|
+
if (endpoint.throughput_tps)
|
|
82
|
+
parts.push(`${formatThroughput(endpoint.throughput_tps.p50)} tok/s`);
|
|
83
|
+
parts.push(endpoint.tag);
|
|
84
|
+
return parts.join(' · ');
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Each provider with its input and output price, so the row reads at a glance;
|
|
88
|
+
* the table and detail say the rest, starting with any rule or limit it misses.
|
|
89
|
+
*/
|
|
90
|
+
function endpointOptions(endpoints, standing) {
|
|
91
|
+
const qualifiers = sharedQualifiers(endpoints);
|
|
92
|
+
return endpoints.map(endpoint => {
|
|
93
|
+
const qualifier = qualifiers.get(endpoint.tag) ?? '';
|
|
94
|
+
return { value: endpoint.tag,
|
|
95
|
+
label: `${endpointLabel(endpoint)}${qualifier ? ` · ${qualifier}` : ''} · ${formatUsd(endpoint.input_per_1m)} / ${formatUsd(endpoint.output_per_1m)}`,
|
|
96
|
+
description: endpointDetail(endpoint, standing(endpoint)) };
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/** The steps the speed and uptime limits offer, of those some provider meets now. */
|
|
100
|
+
const THROUGHPUT_STEPS = [10, 25, 50, 75, 100, 150, 200, 300, 500];
|
|
101
|
+
const LATENCY_STEPS = [0.25, 0.5, 0.75, 1, 1.5, 2, 3, 5, 10];
|
|
102
|
+
const UPTIME_STEPS = [90, 95, 98, 99, 99.5, 99.9];
|
|
103
|
+
/**
|
|
104
|
+
* How a limit reads and judges a provider: the figure it compares, whether
|
|
105
|
+
* more is better, and the words for its values and the providers meeting one.
|
|
106
|
+
*/
|
|
107
|
+
const LIMITS = {
|
|
108
|
+
maxInputPrice: { label: value => `≤ ${formatRate(value)}`, figure: endpoint => endpoint.input_per_1m, higher: false, steps: null, measured: '' },
|
|
109
|
+
maxOutputPrice: { label: value => `≤ ${formatRate(value)}`, figure: endpoint => endpoint.output_per_1m, higher: false, steps: null, measured: '' },
|
|
110
|
+
minThroughput: { label: value => `≥ ${value} tok/s`, figure: endpoint => endpoint.throughput_tps?.p50, higher: true, steps: THROUGHPUT_STEPS,
|
|
111
|
+
measured: ' at P50 now' },
|
|
112
|
+
maxLatency: { label: value => `≤ ${Number(value.toFixed(2))}s`, figure: endpoint => endpoint.latency_ms ? endpoint.latency_ms.p50 / 1000 : null, higher: false,
|
|
113
|
+
steps: LATENCY_STEPS, measured: ' at P50 now' },
|
|
114
|
+
minUptime: { label: value => `≥ ${value}%`, figure: endpoint => endpoint.uptime?.last_1d, higher: true, steps: UPTIME_STEPS,
|
|
115
|
+
measured: ' over the last day' },
|
|
116
|
+
};
|
|
117
|
+
/** The first three provider names in the order given, each once, then how many endpoints they leave out. */
|
|
118
|
+
function someNames(endpoints) {
|
|
119
|
+
const names = [...new Set(endpoints.map(endpoint => endpoint.provider))].slice(0, 3);
|
|
120
|
+
const rest = endpoints.filter(endpoint => !names.includes(endpoint.provider)).length;
|
|
121
|
+
return rest > 0 ? `${names.join(', ')} and ${rest} more` : names.join(', ');
|
|
122
|
+
}
|
|
123
|
+
/** How many providers meet a limit's value now, naming the best; undefined before the providers are known. */
|
|
124
|
+
function limitCount(key, value, serving) {
|
|
125
|
+
if (serving.length === 0)
|
|
126
|
+
return undefined;
|
|
127
|
+
const limit = LIMITS[key];
|
|
128
|
+
const measured = serving.flatMap(endpoint => {
|
|
129
|
+
const figure = limit.figure(endpoint);
|
|
130
|
+
return figure === null || figure === undefined ? [] : [{ endpoint, figure }];
|
|
131
|
+
}).sort((left, right) => limit.higher ? right.figure - left.figure : left.figure - right.figure);
|
|
132
|
+
const met = measured.filter(entry => limit.higher ? entry.figure >= value : entry.figure <= value).map(entry => entry.endpoint);
|
|
133
|
+
if (met.length === 0)
|
|
134
|
+
return 'No provider meets this now';
|
|
135
|
+
return limit.steps ? `${met.length} of ${measured.length} measured providers${limit.measured}: ${someNames(met)}`
|
|
136
|
+
: `${met.length} of ${serving.length} providers: ${someNames(met)}`;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* A limit's choices: Any, then the prices providers charge now or the steps
|
|
140
|
+
* some provider meets, each saying how many meet it and naming the best, and
|
|
141
|
+
* the saved value wherever it falls. Before the providers are known, the
|
|
142
|
+
* steps and the saved value without counts. Each says whom it applies to.
|
|
143
|
+
*/
|
|
144
|
+
function limitOptions(key, saved, serving, scope) {
|
|
145
|
+
const limit = LIMITS[key];
|
|
146
|
+
const figures = serving.flatMap(endpoint => {
|
|
147
|
+
const figure = limit.figure(endpoint);
|
|
148
|
+
return figure === null || figure === undefined ? [] : [figure];
|
|
149
|
+
});
|
|
150
|
+
const met = (value) => figures.some(figure => limit.higher ? figure >= value : figure <= value);
|
|
151
|
+
const candidates = limit.steps ? limit.steps.filter(step => serving.length === 0 || met(step)) : figures;
|
|
152
|
+
const values = [...new Set([...candidates, ...(Number.isFinite(Number(saved)) ? [Number(saved)] : [])])].sort((left, right) => left - right);
|
|
153
|
+
const described = (count) => [count, scope].filter(Boolean).join(' · ');
|
|
154
|
+
return [{ value: 'any', label: 'Any', description: `No limit · ${scope}` },
|
|
155
|
+
...values.map(value => ({ value: String(value), label: limit.label(value), description: described(limitCount(key, value, serving)) }))];
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* A speed limit's choices: Any; the shares of the model's providers to beat,
|
|
159
|
+
* with the figure each stands for now (Router's default share marked, and the
|
|
160
|
+
* one a row without a saved value shows); then fixed figures for this model.
|
|
161
|
+
*/
|
|
162
|
+
function speedOptions(key, saved, serving, speed) {
|
|
163
|
+
const [verb, field, kind] = key === 'minThroughput' ? ['Faster', 'min_throughput', 'throughput']
|
|
164
|
+
: ['Quicker', 'max_latency', 'latency'];
|
|
165
|
+
// A share standing for the figure an earlier one does would change nothing, unless it is the default or saved.
|
|
166
|
+
const offered = (speed?.ranks ?? []).filter((entry, index, ranks) => entry.rank === speed.default_rank || saved === `rank:${entry.rank}`
|
|
167
|
+
|| entry[field] === null || !ranks.slice(0, index).some(earlier => earlier[field] === entry[field]));
|
|
168
|
+
const shares = offered.map(entry => {
|
|
169
|
+
const figure = entry[field];
|
|
170
|
+
const isDefault = entry.rank === speed.default_rank;
|
|
171
|
+
return { value: isDefault ? 'default' : `rank:${entry.rank}`,
|
|
172
|
+
label: `${verb} than ${entry.rank}% of providers${figure === null ? '' : ` · ${LIMITS[key].label(figure)} now`}${isDefault ? ' · default' : ''}`,
|
|
173
|
+
description: [figure === null ? undefined : limitCount(key, figure, serving), 'for every model'].filter(Boolean).join(' · ') };
|
|
174
|
+
});
|
|
175
|
+
if (!shares.some(option => option.value === 'default')) {
|
|
176
|
+
shares.unshift({ value: 'default', label: 'Router default', description: `Router's share of providers to beat · for every model` });
|
|
177
|
+
}
|
|
178
|
+
// A share saved with /config that Router does not offer still shows.
|
|
179
|
+
if (saved.startsWith('rank:') && saved !== 'rank:0' && !shares.some(option => option.value === saved)) {
|
|
180
|
+
shares.push({ value: saved, label: `${verb} than ${saved.slice('rank:'.length)}% of providers`, description: 'for every model' });
|
|
181
|
+
}
|
|
182
|
+
const fixed = limitOptions(key, saved, serving, 'this model only').slice(1);
|
|
183
|
+
return [{ value: 'rank:0', label: 'Any', description: `No ${kind} preference · for every model` }, ...shares, ...fixed];
|
|
184
|
+
}
|
|
185
|
+
/** The table's columns, left to right: what each sorts by, which way first, and how soon a narrow pane drops it. */
|
|
186
|
+
const COLUMNS = [
|
|
187
|
+
{ key: 'provider', label: 'Provider', width: 0, descending: false },
|
|
188
|
+
{ key: 'input', label: 'Input', width: 8, descending: false },
|
|
189
|
+
{ key: 'output', label: 'Output', width: 8, descending: false, dropRank: 3 },
|
|
190
|
+
{ key: 'cache', label: 'Cache', width: 9, descending: false, dropRank: 4 },
|
|
191
|
+
{ key: 'latency', label: 'Latency', width: 9, descending: false, dropRank: 1 },
|
|
192
|
+
{ key: 'throughput', label: 'Tok/s', width: 7, descending: true },
|
|
193
|
+
{ key: 'uptime', label: 'Uptime', width: 9, descending: true, dropRank: 2 },
|
|
194
|
+
];
|
|
195
|
+
const PERCENTILES = ['p50', 'p75', 'p90', 'p99'];
|
|
196
|
+
const OUTSIDE_RULES = 'Outside your rules or limits';
|
|
197
|
+
const TRIED_LAST = 'Tried last: under your speed preference';
|
|
198
|
+
/** Latest uptime OpenRouter reports: the last day, else the shorter windows. */
|
|
199
|
+
const uptimeOf = (endpoint) => endpoint.uptime?.last_1d ?? endpoint.uptime?.last_30m ?? endpoint.uptime?.last_5m ?? null;
|
|
200
|
+
/** The value a column sorts by; null sorts last either way. */
|
|
201
|
+
function sortValue(endpoint, column, percentile) {
|
|
202
|
+
switch (column) {
|
|
203
|
+
case 'provider': return `${endpoint.provider} ${endpoint.tag}`.toLowerCase();
|
|
204
|
+
case 'input': return endpoint.input_per_1m;
|
|
205
|
+
case 'output': return endpoint.output_per_1m;
|
|
206
|
+
case 'cache': return endpoint.cache_read_per_1m ?? null;
|
|
207
|
+
case 'latency': return endpoint.latency_ms?.[percentile] ?? null;
|
|
208
|
+
case 'throughput': return endpoint.throughput_tps?.[percentile] ?? null;
|
|
209
|
+
case 'uptime': return uptimeOf(endpoint);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
export function openReasoningPage(ctx, input) {
|
|
213
|
+
const { provider, model, supported, current, resume, hints } = input;
|
|
214
|
+
const levels = supported.filter(level => level !== OFF);
|
|
215
|
+
const canTurnOff = supported.includes(OFF);
|
|
216
|
+
// A model without levels has only its routing here.
|
|
217
|
+
const reasons = levels.length > 0;
|
|
218
|
+
const startLevel = [current !== OFF ? current : undefined, resume, 'high', levels[Math.floor((levels.length - 1) / 2)]]
|
|
219
|
+
.find(level => level !== undefined && levels.includes(level)) ?? levels[0] ?? '';
|
|
220
|
+
const effort = {
|
|
221
|
+
name: 'effort', label: 'Effort', type: 'select', value: startLevel,
|
|
222
|
+
options: levels.map(level => ({ value: level, label: level, description: hints[level] })),
|
|
223
|
+
description: 'How much the model reasons before it answers. Choosing a level turns thinking on.',
|
|
224
|
+
};
|
|
225
|
+
const thinking = {
|
|
226
|
+
name: 'thinking', label: 'Thinking', type: 'select', value: current === OFF ? 'off' : 'on',
|
|
227
|
+
options: [{ value: 'on', label: 'On', description: 'Reason at the effort above' }, { value: 'off', label: 'Off', description: hints[OFF] }],
|
|
228
|
+
description: 'Whether the model reasons at all.',
|
|
229
|
+
};
|
|
230
|
+
// Thinking-only models refuse off, and say so where the switch would be.
|
|
231
|
+
if (!canTurnOff)
|
|
232
|
+
thinking.options = [{ value: 'on', label: 'Can\'t be turned off for this model', description: 'This model always reasons' }];
|
|
233
|
+
const rows = reasons ? [effort, thinking] : [];
|
|
234
|
+
const openRouter = provider === 'openrouter';
|
|
235
|
+
const free = model.endsWith(':free');
|
|
236
|
+
const saved = () => ctx.config.get().openRouter ?? {};
|
|
237
|
+
const pin = saved().providers?.[model];
|
|
238
|
+
let prices = null;
|
|
239
|
+
let repaint;
|
|
240
|
+
const routeOptions = [
|
|
241
|
+
{ value: 'default', label: 'Default', description: 'Router\'s routing, in the order the sort below gives' },
|
|
242
|
+
...(free ? [] : [
|
|
243
|
+
{ value: 'floor', label: 'Cheapest', description: 'OpenRouter :floor: the lowest price first, flex-tier providers too' },
|
|
244
|
+
{ value: 'nitro', label: 'Fastest', description: 'OpenRouter :nitro: the highest throughput first, priority-tier providers too' },
|
|
245
|
+
]),
|
|
246
|
+
];
|
|
247
|
+
const providerOption = { value: 'provider', label: 'One provider', description: 'Choose the provider below' };
|
|
248
|
+
if (pin)
|
|
249
|
+
routeOptions.push(providerOption);
|
|
250
|
+
const route = {
|
|
251
|
+
name: 'route', label: 'Routing', type: 'select', options: routeOptions,
|
|
252
|
+
value: pin ? 'provider' : !free && saved().variant ? saved().variant : 'default',
|
|
253
|
+
description: 'How OpenRouter picks the provider that serves each request.',
|
|
254
|
+
};
|
|
255
|
+
const sort = {
|
|
256
|
+
name: 'sort', label: 'Sort by', type: 'select', value: saved().sort ?? 'default',
|
|
257
|
+
options: [
|
|
258
|
+
{ value: 'default', label: 'Router default', description: 'The order Router sets for every account' },
|
|
259
|
+
{ value: 'price', label: 'Price', description: 'The cheapest provider first' },
|
|
260
|
+
{ value: 'throughput', label: 'Throughput', description: 'The provider producing tokens fastest first' },
|
|
261
|
+
{ value: 'latency', label: 'Latency', description: 'The provider answering soonest first' },
|
|
262
|
+
{ value: 'balanced', label: 'Balanced', description: 'OpenRouter\'s own load balancing, weighted toward lower prices' },
|
|
263
|
+
],
|
|
264
|
+
visibleWhen: value => value('route') === 'default',
|
|
265
|
+
description: 'The order OpenRouter tries the providers in.',
|
|
266
|
+
};
|
|
267
|
+
const providerRow = {
|
|
268
|
+
name: 'provider', label: 'Providers', type: 'select', value: pin?.tag ?? '',
|
|
269
|
+
options: pin ? [{ value: pin.tag, label: pin.tag }] : [],
|
|
270
|
+
visibleWhen: value => value('route') === 'provider' || (providerRow.options?.length ?? 0) > 0,
|
|
271
|
+
formatValue: value => {
|
|
272
|
+
if (value)
|
|
273
|
+
return value;
|
|
274
|
+
const within = serving.filter(endpoint => standing(endpoint) < 2).length;
|
|
275
|
+
return within < serving.length ? `${within} of ${serving.length} providers within your limits · compare ›`
|
|
276
|
+
: `${serving.length} provider${serving.length === 1 ? '' : 's'} · compare ›`;
|
|
277
|
+
},
|
|
278
|
+
description: 'Every provider serving this model side by side: price, cache read, latency, throughput and uptime. Choosing one pins it.',
|
|
279
|
+
};
|
|
280
|
+
const fallbacks = {
|
|
281
|
+
name: 'fallbacks', label: 'Fallbacks', type: 'select', value: pin?.fallbacks === false ? 'off' : 'on',
|
|
282
|
+
options: [
|
|
283
|
+
{ value: 'on', label: 'On', description: 'Try the other providers when this one fails' },
|
|
284
|
+
{ value: 'off', label: 'Off', description: 'This provider only: a request fails when it cannot serve it' },
|
|
285
|
+
],
|
|
286
|
+
visibleWhen: value => value('route') === 'provider',
|
|
287
|
+
description: 'Whether OpenRouter may use another provider when the chosen one fails.',
|
|
288
|
+
};
|
|
289
|
+
const zdr = {
|
|
290
|
+
name: 'zdr', label: 'Zero data retention', type: 'select', value: saved().zdr ? 'on' : 'off',
|
|
291
|
+
options: [{ value: 'off', label: 'Off', description: 'Any provider' }, { value: 'on', label: 'On', description: 'Only providers that keep no prompt data' }],
|
|
292
|
+
description: 'Only providers that retain nothing of the request.',
|
|
293
|
+
};
|
|
294
|
+
const savedQuantizations = saved().quantizations;
|
|
295
|
+
const quantization = {
|
|
296
|
+
name: 'quantization', label: 'Quantization', type: 'select', value: savedQuantizations?.length ? savedQuantizations.join(',') : 'any',
|
|
297
|
+
options: [],
|
|
298
|
+
description: 'Only providers serving the model at this precision.',
|
|
299
|
+
};
|
|
300
|
+
const quantizationOptions = (endpoints) => {
|
|
301
|
+
const found = [...new Set(endpoints.map(endpoint => endpoint.quantization))].sort();
|
|
302
|
+
const options = [{ value: 'any', label: 'Any', description: 'Every precision' },
|
|
303
|
+
...found.map(value => ({ value, label: value, description: `${value} only` }))];
|
|
304
|
+
if (quantization.value !== 'any' && !options.some(option => option.value === quantization.value)) {
|
|
305
|
+
options.push({ value: quantization.value, label: quantization.value.split(',').join(', '), description: 'Saved with /config openrouter' });
|
|
306
|
+
}
|
|
307
|
+
return options;
|
|
308
|
+
};
|
|
309
|
+
quantization.options = quantizationOptions([]);
|
|
310
|
+
const dataCollection = {
|
|
311
|
+
name: 'dataCollection', label: 'Data collection', type: 'select', value: saved().dataCollection ?? 'allow',
|
|
312
|
+
options: [
|
|
313
|
+
{ value: 'allow', label: 'As Router allows', description: 'Router\'s setting decides' },
|
|
314
|
+
{ value: 'deny', label: 'Deny', description: 'Only providers that do not store prompts' },
|
|
315
|
+
],
|
|
316
|
+
description: 'Whether providers that store prompts may serve.',
|
|
317
|
+
};
|
|
318
|
+
const savedProfile = saved().limits ?? {};
|
|
319
|
+
const savedOwn = saved().modelLimits?.[model] ?? {};
|
|
320
|
+
/** The speed Router gives each share of this model's providers, once the prices have come. */
|
|
321
|
+
const speedRanks = () => prices !== null && prices !== 'loading' ? prices.speed : undefined;
|
|
322
|
+
const limitRow = (name, label, value, description) => ({
|
|
323
|
+
name, label, type: 'select', value, description,
|
|
324
|
+
options: name === 'minThroughput' || name === 'maxLatency' ? speedOptions(name, value, [], undefined)
|
|
325
|
+
: limitOptions(name, value, [], name === 'minUptime' ? 'for every model' : 'this model only'),
|
|
326
|
+
});
|
|
327
|
+
const fixed = (value) => value === undefined ? 'any' : String(value);
|
|
328
|
+
const speedValue = (own, share) => own !== undefined ? String(own)
|
|
329
|
+
: share === undefined ? 'default' : `rank:${share}`;
|
|
330
|
+
const limitRows = {
|
|
331
|
+
maxInputPrice: limitRow('maxInputPrice', 'Max input price', fixed(savedOwn.maxInputPrice), 'The most a provider may charge per 1M input tokens for this model; dearer ones are left out. Any value: /config openrouter limit max-input <usd>'),
|
|
332
|
+
maxOutputPrice: limitRow('maxOutputPrice', 'Max output price', fixed(savedOwn.maxOutputPrice), 'The most a provider may charge per 1M output tokens for this model; dearer ones are left out. Any value: /config openrouter limit max-output <usd>'),
|
|
333
|
+
minThroughput: limitRow('minThroughput', 'Min throughput', speedValue(savedOwn.minThroughput, savedProfile.fasterThan), 'Tokens per second at P50: faster than a share of each model\'s providers (every model), or a fixed figure (this model only). '
|
|
334
|
+
+ 'Slower providers go last, or are left out when speed is required. /config openrouter limit faster-than <share> | min-throughput <tok/s>'),
|
|
335
|
+
maxLatency: limitRow('maxLatency', 'Max latency', speedValue(savedOwn.maxLatency, savedProfile.quickerThan), 'Seconds to the first token at P50: quicker than a share of each model\'s providers (every model), or a fixed figure (this model only). '
|
|
336
|
+
+ 'Slower providers go last, or are left out when speed is required. /config openrouter limit quicker-than <share> | max-latency <seconds>'),
|
|
337
|
+
minUptime: limitRow('minUptime', 'Min uptime', fixed(savedProfile.minUptime), 'Providers up less than this over the last day are left out, for every model; one without figures stays. Any value: /config openrouter limit min-uptime <percent>'),
|
|
338
|
+
};
|
|
339
|
+
const speedLimits = {
|
|
340
|
+
name: 'speedLimits', label: 'Speed limits', type: 'select', value: savedProfile.requireSpeed ? 'require' : 'prefer',
|
|
341
|
+
options: [
|
|
342
|
+
{ value: 'prefer', label: 'Preferred', description: 'Slower providers go last, so a request still runs when none is fast enough' },
|
|
343
|
+
{ value: 'require', label: 'Required', description: 'Slower providers, by their last half hour, are left out; a request fails when none is left' },
|
|
344
|
+
],
|
|
345
|
+
visibleWhen: value => value('minThroughput') !== 'rank:0' || value('maxLatency') !== 'rank:0',
|
|
346
|
+
description: 'Whether the throughput and latency limits only send slower providers last, or leave them out. For every model.',
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* The limits the rows set: price caps and fixed speed for this model; the
|
|
350
|
+
* shares of providers to beat, uptime and required speed for every model.
|
|
351
|
+
* A row on a fixed figure keeps the share every model already has.
|
|
352
|
+
*/
|
|
353
|
+
const configured = () => {
|
|
354
|
+
const profile = {};
|
|
355
|
+
const own = {};
|
|
356
|
+
for (const key of ['maxInputPrice', 'maxOutputPrice']) {
|
|
357
|
+
if (limitRows[key].value !== 'any')
|
|
358
|
+
own[key] = Number(limitRows[key].value);
|
|
359
|
+
}
|
|
360
|
+
for (const [key, share] of [['minThroughput', 'fasterThan'], ['maxLatency', 'quickerThan']]) {
|
|
361
|
+
const value = limitRows[key].value;
|
|
362
|
+
if (value.startsWith('rank:')) {
|
|
363
|
+
profile[share] = Number(value.slice('rank:'.length));
|
|
364
|
+
}
|
|
365
|
+
else if (value !== 'default') {
|
|
366
|
+
own[key] = Number(value);
|
|
367
|
+
const kept = saved().limits?.[share];
|
|
368
|
+
if (kept !== undefined)
|
|
369
|
+
profile[share] = kept;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
if (limitRows.minUptime.value !== 'any')
|
|
373
|
+
profile.minUptime = Number(limitRows.minUptime.value);
|
|
374
|
+
if (speedLimits.value === 'require')
|
|
375
|
+
profile.requireSpeed = true;
|
|
376
|
+
return { profile, own };
|
|
377
|
+
};
|
|
378
|
+
/** The limits in effect for this model, as figures. */
|
|
379
|
+
const currentLimits = () => {
|
|
380
|
+
const { profile, own } = configured();
|
|
381
|
+
return effectiveLimits(profile, own, speedRanks());
|
|
382
|
+
};
|
|
383
|
+
if (openRouter)
|
|
384
|
+
rows.push(route, sort, providerRow, fallbacks, zdr, quantization, dataCollection, ...Object.values(limitRows), speedLimits);
|
|
385
|
+
// The provider table: every endpoint that can serve a tool call, those
|
|
386
|
+
// outside the rules after the rest, sorted by the chosen column.
|
|
387
|
+
let serving = [];
|
|
388
|
+
let unlisted = [];
|
|
389
|
+
let qualifiers = new Map();
|
|
390
|
+
const savedSort = saved().sort;
|
|
391
|
+
let sortColumn = COLUMNS.findIndex(column => column.key === (savedSort === 'latency' ? 'latency' : savedSort === 'throughput' ? 'throughput' : 'input'));
|
|
392
|
+
let descending = COLUMNS[sortColumn].descending;
|
|
393
|
+
let percentile = 'p50';
|
|
394
|
+
const outsideRules = (endpoint) => (zdr.value === 'on' && !endpoint.zdr)
|
|
395
|
+
|| (quantization.value !== 'any' && !quantization.value.split(',').includes(endpoint.quantization));
|
|
396
|
+
/** 0 within the rules and limits, 1 sent last by a speed preference, 2 left out. */
|
|
397
|
+
const standing = (endpoint) => {
|
|
398
|
+
const misses = limitMisses(endpoint, currentLimits());
|
|
399
|
+
return outsideRules(endpoint) || misses.outside.length > 0 ? 2 : misses.last.length > 0 ? 1 : 0;
|
|
400
|
+
};
|
|
401
|
+
const standingWords = (endpoint) => {
|
|
402
|
+
const misses = limitMisses(endpoint, currentLimits());
|
|
403
|
+
return [outsideRules(endpoint) ? 'outside your rules: zero data retention or quantization' : '',
|
|
404
|
+
misses.outside.length ? `outside your limits: ${misses.outside.join(', ')}` : '',
|
|
405
|
+
misses.last.length ? `tried last: ${misses.last.join(', ')}` : ''].filter(Boolean).join(' · ');
|
|
406
|
+
};
|
|
407
|
+
const arrangeProviders = () => {
|
|
408
|
+
const key = COLUMNS[sortColumn].key;
|
|
409
|
+
const ordered = [...serving].sort((left, right) => {
|
|
410
|
+
const outside = standing(left) - standing(right);
|
|
411
|
+
if (outside !== 0)
|
|
412
|
+
return outside;
|
|
413
|
+
const [a, b] = [sortValue(left, key, percentile), sortValue(right, key, percentile)];
|
|
414
|
+
if (a === null || b === null)
|
|
415
|
+
return a === b ? left.input_per_1m - right.input_per_1m : a === null ? 1 : -1;
|
|
416
|
+
const order = typeof a === 'string' ? a.localeCompare(b) : a - b;
|
|
417
|
+
return (descending ? -order : order) || left.input_per_1m - right.input_per_1m || left.tag.localeCompare(right.tag);
|
|
418
|
+
});
|
|
419
|
+
const options = endpointOptions(ordered, standingWords).map((option, index) => {
|
|
420
|
+
const place = standing(ordered[index]);
|
|
421
|
+
return place === 0 ? option : { ...option, group: place === 2 ? OUTSIDE_RULES : TRIED_LAST };
|
|
422
|
+
});
|
|
423
|
+
// A pinned provider that stopped serving stays listed, so the row still names it.
|
|
424
|
+
const pinned = providerRow.value;
|
|
425
|
+
if (pinned && !options.some(option => option.value === pinned))
|
|
426
|
+
options.push({ value: pinned, label: pinned, description: 'Not serving now' });
|
|
427
|
+
providerRow.options = options;
|
|
428
|
+
};
|
|
429
|
+
const endpointOf = (tag) => serving.find(endpoint => endpoint.tag === tag);
|
|
430
|
+
const dash = [{ text: '—', tone: 'muted' }];
|
|
431
|
+
const table = {
|
|
432
|
+
columns: () => COLUMNS.map((column, index) => ({ label: index === sortColumn ? `${column.label} ${descending ? '↓' : '↑'}` : column.label,
|
|
433
|
+
width: column.width, ...('dropRank' in column ? { dropRank: column.dropRank } : {}) })),
|
|
434
|
+
cells: option => {
|
|
435
|
+
const endpoint = endpointOf(option.value);
|
|
436
|
+
if (!endpoint)
|
|
437
|
+
return [[{ text: option.label, tone: 'muted' }]];
|
|
438
|
+
const discounted = (endpoint.discount ?? 0) > 0;
|
|
439
|
+
const limits = currentLimits();
|
|
440
|
+
// A figure that misses a limit reads in the error colour; speed is judged at P50, whichever percentile shows.
|
|
441
|
+
const misses = (cap, value, higher) => cap !== undefined
|
|
442
|
+
&& value !== null && value !== undefined && (higher ? value < cap : value > cap);
|
|
443
|
+
const price = (value, cap) => [{ text: formatRate(value),
|
|
444
|
+
...(misses(cap, value, false) ? { tone: 'bad' } : discounted ? { tone: 'good' } : {}) }];
|
|
445
|
+
const qualifier = qualifiers.get(endpoint.tag);
|
|
446
|
+
const name = [{ text: endpoint.provider },
|
|
447
|
+
...(endpoint.quantization === 'unknown' ? [] : [{ text: ` ${endpoint.quantization}`, tone: 'muted' }]),
|
|
448
|
+
...(qualifier ? [{ text: ` ${qualifier}`, tone: 'muted' }] : []),
|
|
449
|
+
...(endpoint.tier === 'standard' ? [] : [{ text: ` ${endpoint.tier}`, tone: 'warn' }]),
|
|
450
|
+
// The discount outranks zdr, which most providers share, when a narrow column clips the end.
|
|
451
|
+
...(discounted ? [{ text: ` −${Math.round(endpoint.discount * 100)}%`, tone: 'good' }] : []),
|
|
452
|
+
...(endpoint.zdr ? [{ text: ' zdr', tone: 'muted' }] : [])];
|
|
453
|
+
const latency = endpoint.latency_ms?.[percentile];
|
|
454
|
+
const throughput = endpoint.throughput_tps?.[percentile];
|
|
455
|
+
const uptime = uptimeOf(endpoint);
|
|
456
|
+
const windows = endpoint.uptime ? [endpoint.uptime.last_1d, endpoint.uptime.last_30m, endpoint.uptime.last_5m] : [];
|
|
457
|
+
const slow = misses(limits.maxLatency, endpoint.latency_ms ? endpoint.latency_ms.p50 / 1000 : null, false);
|
|
458
|
+
const few = misses(limits.minThroughput, endpoint.throughput_tps?.p50, true);
|
|
459
|
+
const down = misses(limits.minUptime, endpoint.uptime?.last_1d, true);
|
|
460
|
+
return [name, price(endpoint.input_per_1m, limits.maxInputPrice), price(endpoint.output_per_1m, limits.maxOutputPrice),
|
|
461
|
+
endpoint.cache_read_per_1m == null ? dash : price(endpoint.cache_read_per_1m),
|
|
462
|
+
latency === undefined ? dash : [{ text: formatLatency(latency), ...(slow ? { tone: 'bad' } : {}) }],
|
|
463
|
+
throughput === undefined ? dash : [{ text: formatThroughput(throughput), ...(few ? { tone: 'bad' } : {}) }],
|
|
464
|
+
uptime === null ? dash : [...windows.map(value => ({ text: '▮', tone: uptimeTone(value) })),
|
|
465
|
+
{ text: ` ${formatPercent(uptime)}`, tone: down ? 'bad' : uptimeTone(uptime) }]];
|
|
466
|
+
},
|
|
467
|
+
caption: () => {
|
|
468
|
+
const checked = prices !== null && prices !== 'loading' && prices.checked_at
|
|
469
|
+
? ` · as of ${new Date(prices.checked_at).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}` : '';
|
|
470
|
+
const speedLimit = currentLimits().minThroughput !== undefined || currentLimits().maxLatency !== undefined;
|
|
471
|
+
return `Prices per 1M tokens · Latency (to first token) and Tok/s at ${percentile.toUpperCase()}, last 30 min`
|
|
472
|
+
+ `${speedLimit && percentile !== 'p50' ? ' · limits at P50' : ''}${checked}`;
|
|
473
|
+
},
|
|
474
|
+
notes: () => {
|
|
475
|
+
const limits = formatLimits(currentLimits());
|
|
476
|
+
return [...(limits ? [`Your limits: ${limits}`] : []), ...(unlisted.length === 0 ? [] : [`Not listed: ${unlisted.map(endpoint => `${endpoint.provider} (${endpoint.tools ? 'down now' : 'no tool calls'})`).join(', ')}`])];
|
|
477
|
+
},
|
|
478
|
+
hints: '←→ sort · r reverse · p percentile',
|
|
479
|
+
// A new sort starts at the top, where its leaders are; a new percentile keeps the row.
|
|
480
|
+
onKey: (input, key) => {
|
|
481
|
+
if (key.leftArrow || key.rightArrow) {
|
|
482
|
+
sortColumn = (sortColumn + (key.rightArrow ? 1 : COLUMNS.length - 1)) % COLUMNS.length;
|
|
483
|
+
descending = COLUMNS[sortColumn].descending;
|
|
484
|
+
}
|
|
485
|
+
else if (input === 'r') {
|
|
486
|
+
descending = !descending;
|
|
487
|
+
}
|
|
488
|
+
else if (input === 'p') {
|
|
489
|
+
percentile = PERCENTILES[(PERCENTILES.indexOf(percentile) + 1) % PERCENTILES.length];
|
|
490
|
+
arrangeProviders();
|
|
491
|
+
return true;
|
|
492
|
+
}
|
|
493
|
+
else {
|
|
494
|
+
return false;
|
|
495
|
+
}
|
|
496
|
+
arrangeProviders();
|
|
497
|
+
return 'top';
|
|
498
|
+
},
|
|
499
|
+
};
|
|
500
|
+
providerRow.table = table;
|
|
501
|
+
const filters = () => ({ zdr: zdr.value === 'on', ...(quantization.value === 'any' ? {} : { quantizations: quantization.value.split(',') }),
|
|
502
|
+
limits: currentLimits() });
|
|
503
|
+
const choice = () => route.value === 'provider'
|
|
504
|
+
? (providerRow.value ? { route: 'provider', tag: providerRow.value, fallbacks: fallbacks.value !== 'off' } : null)
|
|
505
|
+
: { route: route.value, ...(route.value === 'default' && sort.value !== 'default'
|
|
506
|
+
? { sort: sort.value } : {}) };
|
|
507
|
+
const summary = () => {
|
|
508
|
+
const chosen = choice();
|
|
509
|
+
return `Price ${chosen ? choicePrice(prices, chosen, filters()) : 'Choose a provider'}`;
|
|
510
|
+
};
|
|
511
|
+
/** The OpenRouter preferences the rows describe, keeping anything else saved. */
|
|
512
|
+
const saveRouting = async () => {
|
|
513
|
+
const { variant: _variant, sort: _sort, zdr: _zdr, quantizations: _quantizations, dataCollection: _data, limits: _limits, modelLimits, providers, ...others } = saved();
|
|
514
|
+
const { profile, own } = configured();
|
|
515
|
+
const { [model]: _own, ...otherModels } = modelLimits ?? {};
|
|
516
|
+
const models = Object.keys(own).length ? { ...otherModels, [model]: own } : otherModels;
|
|
517
|
+
const { [model]: _pin, ...otherPins } = providers ?? {};
|
|
518
|
+
const pins = route.value === 'provider' && providerRow.value
|
|
519
|
+
? { ...otherPins, [model]: { tag: providerRow.value, fallbacks: fallbacks.value !== 'off' } } : otherPins;
|
|
520
|
+
const next = {
|
|
521
|
+
...others,
|
|
522
|
+
...(route.value === 'floor' || route.value === 'nitro' ? { variant: route.value } : {}),
|
|
523
|
+
...(sort.value === 'default' ? {} : { sort: sort.value }),
|
|
524
|
+
...(zdr.value === 'on' ? { zdr: true } : {}),
|
|
525
|
+
...(quantization.value === 'any' ? {} : { quantizations: quantization.value.split(',') }),
|
|
526
|
+
...(dataCollection.value === 'deny' ? { dataCollection: 'deny' } : {}),
|
|
527
|
+
...(Object.keys(pins).length ? { providers: pins } : {}),
|
|
528
|
+
...(Object.keys(profile).length ? { limits: profile } : {}),
|
|
529
|
+
...(Object.keys(models).length ? { modelLimits: models } : {}),
|
|
530
|
+
};
|
|
531
|
+
ctx.config.set('openRouter', next);
|
|
532
|
+
await ctx.config.save();
|
|
533
|
+
};
|
|
534
|
+
const connection = openRouter ? ctx.config.getRouterCatalogConnection?.() : undefined;
|
|
535
|
+
if (connection) {
|
|
536
|
+
prices = 'loading';
|
|
537
|
+
void fetchOpenRouterRoutePrices(connection, model, saved()).then(answer => answer, () => null).then(answer => {
|
|
538
|
+
prices = answer;
|
|
539
|
+
const endpoints = answer?.endpoints ?? [];
|
|
540
|
+
serving = endpoints.filter(endpoint => endpoint.tools && endpoint.up);
|
|
541
|
+
unlisted = endpoints.filter(endpoint => !endpoint.tools || !endpoint.up);
|
|
542
|
+
qualifiers = sharedQualifiers(serving);
|
|
543
|
+
if (serving.length > 0) {
|
|
544
|
+
if (!routeOptions.includes(providerOption))
|
|
545
|
+
routeOptions.push(providerOption);
|
|
546
|
+
arrangeProviders();
|
|
547
|
+
quantization.options = quantizationOptions(serving);
|
|
548
|
+
for (const [key, item] of Object.entries(limitRows)) {
|
|
549
|
+
if (key === 'minThroughput' || key === 'maxLatency') {
|
|
550
|
+
// A share saved as Router's default reads as the default.
|
|
551
|
+
if (answer?.speed && item.value === `rank:${answer.speed.default_rank}`)
|
|
552
|
+
item.value = 'default';
|
|
553
|
+
item.options = speedOptions(key, item.value, serving, answer?.speed);
|
|
554
|
+
}
|
|
555
|
+
else {
|
|
556
|
+
item.options = limitOptions(key, item.value, serving, key === 'minUptime' ? 'for every model' : 'this model only');
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
repaint?.();
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
ctx.settingsPanel.showSettingsPanel({
|
|
564
|
+
title: `${reasons ? 'Reasoning' : 'Routing'} · ${model} · ${provider}`,
|
|
565
|
+
layout: 'page',
|
|
566
|
+
typingCloses: true,
|
|
567
|
+
categories: [{ name: 'Reasoning', settings: rows }],
|
|
568
|
+
...(openRouter ? { summary, connectRepaint: (next) => { repaint = next; } } : {}),
|
|
569
|
+
onSettingChange: async (name, value) => {
|
|
570
|
+
if (name === 'effort') {
|
|
571
|
+
thinking.value = 'on';
|
|
572
|
+
await applyModelEffort(ctx, value);
|
|
573
|
+
}
|
|
574
|
+
else if (name === 'thinking') {
|
|
575
|
+
if (!canTurnOff)
|
|
576
|
+
return;
|
|
577
|
+
await applyModelEffort(ctx, (value === 'off' ? OFF : effort.value));
|
|
578
|
+
}
|
|
579
|
+
else {
|
|
580
|
+
// Choosing a provider from the table pins it; another route unpins it.
|
|
581
|
+
if (name === 'provider') {
|
|
582
|
+
if (!routeOptions.includes(providerOption))
|
|
583
|
+
routeOptions.push(providerOption);
|
|
584
|
+
route.value = 'provider';
|
|
585
|
+
}
|
|
586
|
+
else if (name === 'route' && value !== 'provider') {
|
|
587
|
+
providerRow.value = '';
|
|
588
|
+
}
|
|
589
|
+
if (name === 'zdr' || name === 'quantization' || name === 'speedLimits' || name in limitRows)
|
|
590
|
+
arrangeProviders();
|
|
591
|
+
await saveRouting();
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
});
|
|
595
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* After /model switches models, and for /effort, /thinking and /reasoning
|
|
3
|
+
* without an argument, offer the model's reasoning in one step, as Claude Code does: effort on a horizontal track moved with ← →, thinking
|
|
4
|
+
* switched with Tab. The levels are the model's own (Router's catalog for a
|
|
5
|
+
* Router model, else its reviewed contract), so the picker never offers one
|
|
6
|
+
* the provider would refuse. Enter saves the choice as /effort does; Escape
|
|
7
|
+
* keeps what the model already runs with.
|
|
8
|
+
*/
|
|
9
|
+
import type { CommandContext } from './types.js';
|
|
10
|
+
/**
|
|
11
|
+
* Offer the active model's reasoning settings. False, with nothing shown, when
|
|
12
|
+
* no one can answer or the model has no levels.
|
|
13
|
+
*/
|
|
14
|
+
export declare function offerReasoningPicker(ctx: CommandContext): boolean;
|