@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
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* the user the exact command to run themselves.
|
|
12
12
|
*/
|
|
13
13
|
import { spawn } from 'node:child_process';
|
|
14
|
+
import { browserLaunchAllowed } from '../../utils/session_interactivity.js';
|
|
14
15
|
const DEFAULT_TIMEOUT_MS = 150_000;
|
|
15
16
|
/**
|
|
16
17
|
* Whether to auto-run the login on the host. Off when the host is headless or
|
|
@@ -22,7 +23,8 @@ export function loginAutoRunEnabled(env = process.env) {
|
|
|
22
23
|
return false;
|
|
23
24
|
if (env.ZTC_HEADLESS === '1' || env.ZTC_HEADLESS === 'true')
|
|
24
25
|
return false;
|
|
25
|
-
|
|
26
|
+
// A login CLI opens a browser; automated runs never start one.
|
|
27
|
+
return browserLaunchAllowed(env);
|
|
26
28
|
}
|
|
27
29
|
/** A short human phrase for why an auto-login failed, for the fallback message. */
|
|
28
30
|
export function loginFailureReasonText(attempt) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IncompleteStreamError } from './transport_errors.js';
|
|
1
2
|
import { modelContract } from '@zerg/model-contracts';
|
|
2
3
|
import { parseSSEStream } from './sse.js';
|
|
3
4
|
import { readBoundedProviderError } from './openai_responses.js';
|
|
@@ -110,7 +111,7 @@ export class AnthropicBackend {
|
|
|
110
111
|
role: message.role,
|
|
111
112
|
content: typeof message.content === 'string'
|
|
112
113
|
? message.content
|
|
113
|
-
: message.content.map(block => {
|
|
114
|
+
: message.content.filter(block => block.type !== 'responses_reasoning').map(block => {
|
|
114
115
|
if (block.type === 'text') {
|
|
115
116
|
return { type: 'text', text: block.text };
|
|
116
117
|
}
|
|
@@ -370,9 +371,9 @@ export class AnthropicBackend {
|
|
|
370
371
|
}
|
|
371
372
|
}
|
|
372
373
|
if (blocks.size > 0)
|
|
373
|
-
throw new
|
|
374
|
+
throw new IncompleteStreamError('Anthropic stream ended before a native content block completed');
|
|
374
375
|
if (!messageCompleted)
|
|
375
|
-
throw new
|
|
376
|
+
throw new IncompleteStreamError('Anthropic stream ended before message completion');
|
|
376
377
|
yield { type: 'done', stopReason, ...(stopDetails ? { stopDetails } : {}) };
|
|
377
378
|
}
|
|
378
379
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ConverseCommand, ConverseCommandOutput, ConverseStreamCommand, ConverseStreamCommandOutput } from '@aws-sdk/client-bedrock-runtime';
|
|
2
|
+
import type { AgentBackend, BackendRequest, BackendResponse, StreamEvent } from './types.js';
|
|
3
|
+
export interface BedrockClientLike {
|
|
4
|
+
send(command: ConverseCommand | ConverseStreamCommand, options?: {
|
|
5
|
+
abortSignal?: AbortSignal;
|
|
6
|
+
}): Promise<ConverseCommandOutput | ConverseStreamCommandOutput>;
|
|
7
|
+
}
|
|
8
|
+
export interface BedrockBackendConfig {
|
|
9
|
+
region?: string;
|
|
10
|
+
client?: BedrockClientLike;
|
|
11
|
+
}
|
|
12
|
+
export declare class BedrockBackend implements AgentBackend {
|
|
13
|
+
private client;
|
|
14
|
+
private readonly region;
|
|
15
|
+
constructor(config?: BedrockBackendConfig);
|
|
16
|
+
private send;
|
|
17
|
+
isAuthenticationConfigured(): boolean;
|
|
18
|
+
generate(request: BackendRequest): Promise<BackendResponse>;
|
|
19
|
+
generateStream(request: BackendRequest): AsyncIterable<StreamEvent>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { IncompleteStreamError } from './transport_errors.js';
|
|
2
|
+
let bedrockSdk;
|
|
3
|
+
// Loaded on first use: the backend registry is in every runtime's module
|
|
4
|
+
// closure, including the headless package, which does not ship the AWS SDK.
|
|
5
|
+
function loadBedrockSdk() {
|
|
6
|
+
bedrockSdk ??= import('@aws-sdk/client-bedrock-runtime').catch(() => {
|
|
7
|
+
bedrockSdk = undefined;
|
|
8
|
+
throw new Error('Bedrock support requires the @aws-sdk/client-bedrock-runtime package');
|
|
9
|
+
});
|
|
10
|
+
return bedrockSdk;
|
|
11
|
+
}
|
|
12
|
+
function imageBlock(mediaType, data) {
|
|
13
|
+
const formats = {
|
|
14
|
+
'image/png': 'png', 'image/jpeg': 'jpeg', 'image/jpg': 'jpeg', 'image/gif': 'gif', 'image/webp': 'webp',
|
|
15
|
+
};
|
|
16
|
+
const format = formats[mediaType.toLowerCase()];
|
|
17
|
+
if (!format)
|
|
18
|
+
throw new Error(`Unsupported Bedrock image media type: ${mediaType || '(missing)'}`);
|
|
19
|
+
return { image: { format, source: { bytes: Buffer.from(data, 'base64') } } };
|
|
20
|
+
}
|
|
21
|
+
function toolResultContent(content) {
|
|
22
|
+
if (typeof content === 'string')
|
|
23
|
+
return [{ text: content || ' ' }];
|
|
24
|
+
return content.length ? content.map(block => block.type === 'text' ? { text: block.text || ' ' }
|
|
25
|
+
: imageBlock(block.source.media_type, block.source.data)) : [{ text: ' ' }];
|
|
26
|
+
}
|
|
27
|
+
function requestContent(content) {
|
|
28
|
+
if (typeof content === 'string')
|
|
29
|
+
return [{ text: content || ' ' }];
|
|
30
|
+
return content.map(block => {
|
|
31
|
+
switch (block.type) {
|
|
32
|
+
case 'text': return { text: block.text || ' ' };
|
|
33
|
+
case 'image': return imageBlock(block.mediaType, block.data);
|
|
34
|
+
case 'tool_use': return { toolUse: { toolUseId: block.id, name: block.name,
|
|
35
|
+
input: block.input } };
|
|
36
|
+
case 'tool_result': return { toolResult: { toolUseId: block.tool_use_id,
|
|
37
|
+
content: toolResultContent(block.content), status: block.is_error ? 'error' : 'success' } };
|
|
38
|
+
default: throw new Error(`Unsupported Bedrock request block: ${block.type}`);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function responseContent(output) {
|
|
43
|
+
return (output?.message?.content ?? []).flatMap((block) => {
|
|
44
|
+
if (typeof block.text === 'string')
|
|
45
|
+
return [{ type: 'text', text: block.text }];
|
|
46
|
+
if (block.toolUse)
|
|
47
|
+
return [{ type: 'tool_use', id: block.toolUse.toolUseId ?? '',
|
|
48
|
+
name: block.toolUse.name ?? '', input: (block.toolUse.input ?? {}) }];
|
|
49
|
+
return [];
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function bedrockError(error) {
|
|
53
|
+
const value = error;
|
|
54
|
+
const status = value?.$metadata?.httpStatusCode ?? 0;
|
|
55
|
+
const name = value?.name ?? 'BedrockError';
|
|
56
|
+
if (status === 401 || status === 403 || /AccessDenied|Unauthorized|Credentials|UnrecognizedClient/i.test(name)) {
|
|
57
|
+
return new Error('Bedrock model access is not configured for this workload');
|
|
58
|
+
}
|
|
59
|
+
if (status === 400 || /ValidationException/i.test(name))
|
|
60
|
+
return new Error('Bedrock model configuration is invalid');
|
|
61
|
+
if (status === 429 || /Throttl/i.test(name))
|
|
62
|
+
return new Error('API error (429): Bedrock request was throttled');
|
|
63
|
+
if (status >= 500)
|
|
64
|
+
return new Error(`API error (${status}): Bedrock service is temporarily unavailable`);
|
|
65
|
+
return new Error('Bedrock request failed');
|
|
66
|
+
}
|
|
67
|
+
function buildInput(request) {
|
|
68
|
+
if (!request.model.trim())
|
|
69
|
+
throw new Error('Bedrock model is not configured');
|
|
70
|
+
return {
|
|
71
|
+
modelId: request.model,
|
|
72
|
+
messages: request.messages.map(message => ({ role: message.role, content: requestContent(message.content) })),
|
|
73
|
+
inferenceConfig: { maxTokens: request.maxTokens },
|
|
74
|
+
...(request.system ? { system: [{ text: request.system }] } : {}),
|
|
75
|
+
...(request.tools.length ? { toolConfig: { tools: request.tools.map(tool => ({ toolSpec: {
|
|
76
|
+
name: tool.name, ...(tool.description ? { description: tool.description } : {}),
|
|
77
|
+
inputSchema: { json: tool.parameters },
|
|
78
|
+
} })) } } : {}),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function tokenUsage(usage) {
|
|
82
|
+
const inputTokens = usage.inputTokens ?? 0;
|
|
83
|
+
const outputTokens = usage.outputTokens ?? 0;
|
|
84
|
+
return { inputTokens, outputTokens, totalTokens: usage.totalTokens ?? inputTokens + outputTokens };
|
|
85
|
+
}
|
|
86
|
+
export class BedrockBackend {
|
|
87
|
+
client;
|
|
88
|
+
region;
|
|
89
|
+
constructor(config = {}) {
|
|
90
|
+
if (config.client) {
|
|
91
|
+
this.client = config.client;
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
this.region = config.region || process.env.AWS_BEDROCK_REGION || process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION;
|
|
95
|
+
if (!this.region)
|
|
96
|
+
throw new Error('Bedrock region is not configured');
|
|
97
|
+
}
|
|
98
|
+
async send(sdk, command, signal) {
|
|
99
|
+
this.client ??= new sdk.BedrockRuntimeClient({ region: this.region });
|
|
100
|
+
return this.client.send(command, signal ? { abortSignal: signal } : undefined);
|
|
101
|
+
}
|
|
102
|
+
isAuthenticationConfigured() { return true; }
|
|
103
|
+
async generate(request) {
|
|
104
|
+
const input = buildInput(request);
|
|
105
|
+
const sdk = await loadBedrockSdk();
|
|
106
|
+
let output;
|
|
107
|
+
try {
|
|
108
|
+
output = await this.send(sdk, new sdk.ConverseCommand(input), request.signal);
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
throw bedrockError(error);
|
|
112
|
+
}
|
|
113
|
+
return { content: responseContent(output.output), stopReason: output.stopReason ?? 'end_turn',
|
|
114
|
+
...(output.usage ? { usage: tokenUsage(output.usage) } : {}) };
|
|
115
|
+
}
|
|
116
|
+
async *generateStream(request) {
|
|
117
|
+
const input = buildInput(request);
|
|
118
|
+
const sdk = await loadBedrockSdk();
|
|
119
|
+
let output;
|
|
120
|
+
try {
|
|
121
|
+
output = await this.send(sdk, new sdk.ConverseStreamCommand(input), request.signal);
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
throw bedrockError(error);
|
|
125
|
+
}
|
|
126
|
+
if (!output.stream)
|
|
127
|
+
throw new Error('Bedrock response stream is unavailable');
|
|
128
|
+
const toolIds = new Map();
|
|
129
|
+
let stopReason;
|
|
130
|
+
try {
|
|
131
|
+
for await (const event of output.stream) {
|
|
132
|
+
const error = event.internalServerException || event.modelStreamErrorException || event.serviceUnavailableException
|
|
133
|
+
|| event.throttlingException || event.validationException;
|
|
134
|
+
if (error)
|
|
135
|
+
throw bedrockError(error);
|
|
136
|
+
if (event.contentBlockStart?.start?.toolUse) {
|
|
137
|
+
const index = event.contentBlockStart.contentBlockIndex ?? 0;
|
|
138
|
+
const tool = event.contentBlockStart.start.toolUse;
|
|
139
|
+
const id = tool.toolUseId ?? `_idx_${index}`;
|
|
140
|
+
toolIds.set(index, id);
|
|
141
|
+
yield { type: 'tool_use_start', id, name: tool.name ?? '' };
|
|
142
|
+
}
|
|
143
|
+
else if (event.contentBlockDelta?.delta?.text !== undefined) {
|
|
144
|
+
yield { type: 'text_delta', text: event.contentBlockDelta.delta.text };
|
|
145
|
+
}
|
|
146
|
+
else if (event.contentBlockDelta?.delta?.toolUse) {
|
|
147
|
+
const index = event.contentBlockDelta.contentBlockIndex ?? 0;
|
|
148
|
+
yield { type: 'tool_use_delta', id: toolIds.get(index) ?? `_idx_${index}`,
|
|
149
|
+
input_json: event.contentBlockDelta.delta.toolUse.input ?? '' };
|
|
150
|
+
}
|
|
151
|
+
else if (event.contentBlockStop) {
|
|
152
|
+
const index = event.contentBlockStop.contentBlockIndex ?? 0;
|
|
153
|
+
const id = toolIds.get(index);
|
|
154
|
+
if (id) {
|
|
155
|
+
yield { type: 'tool_use_end', id };
|
|
156
|
+
toolIds.delete(index);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
else if (event.metadata?.usage) {
|
|
160
|
+
yield { type: 'usage', usage: tokenUsage(event.metadata.usage) };
|
|
161
|
+
}
|
|
162
|
+
else if (event.messageStop?.stopReason)
|
|
163
|
+
stopReason = event.messageStop.stopReason;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
if (error instanceof Error && /^(Bedrock|API error)/.test(error.message))
|
|
168
|
+
throw error;
|
|
169
|
+
throw bedrockError(error);
|
|
170
|
+
}
|
|
171
|
+
if (!stopReason)
|
|
172
|
+
throw new IncompleteStreamError();
|
|
173
|
+
yield { type: 'done', stopReason };
|
|
174
|
+
}
|
|
175
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IncompleteStreamError } from './transport_errors.js';
|
|
1
2
|
import { spawn, spawnSync } from 'child_process';
|
|
2
3
|
import { randomUUID } from 'node:crypto';
|
|
3
4
|
import { writeBackendTrace } from './trace.js';
|
|
@@ -216,6 +217,7 @@ function blockToText(block) {
|
|
|
216
217
|
return `[assistant tool use ${block.name}] ${JSON.stringify(block.input)}`;
|
|
217
218
|
case 'thinking':
|
|
218
219
|
case 'redacted_thinking':
|
|
220
|
+
case 'responses_reasoning':
|
|
219
221
|
return ''; // Native signed reasoning belongs only to its originating API.
|
|
220
222
|
default: {
|
|
221
223
|
const neverBlock = block;
|
|
@@ -505,6 +507,7 @@ export class ClaudeCliBackend {
|
|
|
505
507
|
let resultCostUsd;
|
|
506
508
|
let stopReason = 'end_turn';
|
|
507
509
|
let resultText = '';
|
|
510
|
+
let sawResult = false;
|
|
508
511
|
// Tool-marker guard. `fullText` is everything the model produced; `emittedLen`
|
|
509
512
|
// is how much we've streamed as text_delta; once `toolMode` is set (the
|
|
510
513
|
// `<ztc_tool_call>` marker appeared) we stop streaming text and buffer the rest.
|
|
@@ -556,6 +559,7 @@ export class ClaudeCliBackend {
|
|
|
556
559
|
push({ type: 'reasoning_delta', text: d.thinking });
|
|
557
560
|
}
|
|
558
561
|
else if (evt.type === 'result') {
|
|
562
|
+
sawResult = true;
|
|
559
563
|
if (evt.is_error) {
|
|
560
564
|
// Mirror the buffered generate() path: a usage/rate limit must surface as
|
|
561
565
|
// a typed RateLimitError so RotatingBackend cools + fails over. Only the
|
|
@@ -597,6 +601,10 @@ export class ClaudeCliBackend {
|
|
|
597
601
|
finish(new ClaudeCliError(`Claude Code CLI exited with code ${code}.${detail ? `\n${detail}` : ''}`, 'claude_cli_exit', { exitCode: code ?? undefined, stderr: detail }));
|
|
598
602
|
return;
|
|
599
603
|
}
|
|
604
|
+
if (!sawResult) {
|
|
605
|
+
finish(new IncompleteStreamError());
|
|
606
|
+
return;
|
|
607
|
+
}
|
|
600
608
|
// Provider didn't stream deltas (rare) — fold the final result text into the
|
|
601
609
|
// guarded buffer so tool extraction + text emission below still apply.
|
|
602
610
|
if (!streamedText && resultText)
|
|
@@ -1296,6 +1296,8 @@ export class CodexAppServerClient {
|
|
|
1296
1296
|
trust: 'assistant_context',
|
|
1297
1297
|
};
|
|
1298
1298
|
}
|
|
1299
|
+
if (block.type === 'responses_reasoning')
|
|
1300
|
+
return { type: 'provider_context_omitted' };
|
|
1299
1301
|
return {
|
|
1300
1302
|
type: block.type,
|
|
1301
1303
|
mediaType: block.mediaType,
|
|
@@ -47,6 +47,7 @@ export declare class CodexAuthManager {
|
|
|
47
47
|
private openaiApiKey;
|
|
48
48
|
/** Full parsed file so fields introduced by newer Codex CLIs survive refresh. */
|
|
49
49
|
private source;
|
|
50
|
+
private refreshInFlight;
|
|
50
51
|
constructor(authFilePath?: string);
|
|
51
52
|
/** Synchronously load and validate credentials from ~/.codex/auth.json */
|
|
52
53
|
loadCredentialsSync(): void;
|
|
@@ -54,8 +55,10 @@ export declare class CodexAuthManager {
|
|
|
54
55
|
getAccountId(): string | undefined;
|
|
55
56
|
/** Get a valid access token, refreshing if needed */
|
|
56
57
|
getAccessToken(signal?: AbortSignal): Promise<string>;
|
|
57
|
-
/**
|
|
58
|
-
refreshToken(signal?: AbortSignal): Promise<void>;
|
|
58
|
+
/** Serialize rotating-token updates within this process and across file-sharing processes. */
|
|
59
|
+
refreshToken(signal?: AbortSignal | boolean, force?: boolean): Promise<void>;
|
|
60
|
+
private refreshTokenWithLock;
|
|
61
|
+
private performOAuthRefresh;
|
|
59
62
|
/** Decode JWT payload without a library (local trust boundary) */
|
|
60
63
|
private decodeJwtPayload;
|
|
61
64
|
/** Check if token expires within bufferSec seconds (caches exp to avoid per-request JWT decode) */
|
|
@@ -8,19 +8,30 @@
|
|
|
8
8
|
* refresh as fallback.
|
|
9
9
|
*/
|
|
10
10
|
import { randomBytes } from 'crypto';
|
|
11
|
-
import { chmodSync, readFileSync, renameSync, unlinkSync, writeFileSync } from 'fs';
|
|
11
|
+
import { chmodSync, closeSync, fchownSync, fstatSync, fsyncSync, lstatSync, openSync, readFileSync, renameSync, unlinkSync, writeFileSync } from 'fs';
|
|
12
12
|
import { homedir } from 'os';
|
|
13
13
|
import { join } from 'path';
|
|
14
|
-
import { buildResponsesInput, isValidResponsesTerminal, parseResponsesOutput,
|
|
14
|
+
import { buildResponsesInput, isValidResponsesTerminal, parseResponsesOutput, readBoundedProviderError, readBoundedResponsesText, requireValidResponsesOutputItem, streamResponsesSSE, } from './openai_responses.js';
|
|
15
|
+
import { responsesReasoning } from './responses_reasoning.js';
|
|
15
16
|
import { RateLimitError, parseResetAt } from './rate_limit.js';
|
|
16
17
|
import { CODEX_LEGACY_PROVIDER } from './provider_ids.js';
|
|
17
18
|
import { CodexBufferedRecovery } from './codex_buffered_recovery.js';
|
|
19
|
+
let fileLock;
|
|
20
|
+
// Loaded on first refresh: the headless package shares this module but does
|
|
21
|
+
// not ship proper-lockfile. Without it, refreshes are still serialized within
|
|
22
|
+
// the process, which is what every runtime did before the shared lock.
|
|
23
|
+
function loadFileLock() {
|
|
24
|
+
fileLock ??= import('proper-lockfile').then(module => module.default ?? module, () => null);
|
|
25
|
+
return fileLock;
|
|
26
|
+
}
|
|
18
27
|
/**
|
|
19
28
|
* Shared auth file with Codex CLI (~/.codex/auth.json). Both ZTC and Codex CLI
|
|
20
29
|
* read and write this file. ZTC replaces it atomically, so concurrent readers
|
|
21
30
|
* see the old or new credentials and never a truncated JSON document.
|
|
22
31
|
*/
|
|
23
|
-
export const CODEX_AUTH_FILE_PATH =
|
|
32
|
+
export const CODEX_AUTH_FILE_PATH = process.env.CODEX_AUTH_FILE_PATH
|
|
33
|
+
|| process.env.ZTC_CODEX_AUTH_FILE || process.env.CODEX_AUTH_FILE
|
|
34
|
+
|| join(process.env.CODEX_HOME || join(homedir(), '.codex'), 'auth.json');
|
|
24
35
|
export const CODEX_AUTH_SENTINEL = 'codex-subscription-auth';
|
|
25
36
|
const OAUTH_TOKEN_URL = 'https://auth.openai.com/oauth/token';
|
|
26
37
|
const DEFAULT_CODEX_CLIENT_ID = 'app_EMoamEEZ73f0CkXaXp7hrann';
|
|
@@ -53,23 +64,32 @@ function optionalTokenField(data, name) {
|
|
|
53
64
|
}
|
|
54
65
|
function writeCodexAuthFileAtomic(path, data) {
|
|
55
66
|
const temporaryPath = `${path}.tmp.${process.pid}.${randomBytes(8).toString('hex')}`;
|
|
67
|
+
let descriptor;
|
|
56
68
|
try {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
69
|
+
const existing = lstatSync(path);
|
|
70
|
+
if (!existing.isFile() || existing.isSymbolicLink())
|
|
71
|
+
throw new Error('Codex auth path must remain a regular file during refresh.');
|
|
72
|
+
descriptor = openSync(temporaryPath, 'wx', 0o600);
|
|
73
|
+
writeFileSync(descriptor, JSON.stringify(data, null, 2), 'utf8');
|
|
74
|
+
const temporary = fstatSync(descriptor);
|
|
75
|
+
if (temporary.uid !== existing.uid || temporary.gid !== existing.gid)
|
|
76
|
+
fchownSync(descriptor, existing.uid, existing.gid);
|
|
77
|
+
fsyncSync(descriptor);
|
|
78
|
+
closeSync(descriptor);
|
|
79
|
+
descriptor = undefined;
|
|
62
80
|
chmodSync(temporaryPath, 0o600);
|
|
63
81
|
renameSync(temporaryPath, path);
|
|
64
82
|
}
|
|
65
|
-
|
|
83
|
+
finally {
|
|
84
|
+
if (descriptor !== undefined)
|
|
85
|
+
closeSync(descriptor);
|
|
66
86
|
try {
|
|
67
87
|
unlinkSync(temporaryPath);
|
|
68
88
|
}
|
|
69
|
-
catch {
|
|
70
|
-
|
|
89
|
+
catch (error) {
|
|
90
|
+
if (error.code !== 'ENOENT')
|
|
91
|
+
throw error;
|
|
71
92
|
}
|
|
72
|
-
throw error;
|
|
73
93
|
}
|
|
74
94
|
}
|
|
75
95
|
function throwIfRefreshAborted(signal) {
|
|
@@ -92,6 +112,29 @@ function parseCodexAuthData(data) {
|
|
|
92
112
|
if (!accessToken || !refreshToken) {
|
|
93
113
|
throw new Error("Codex auth file is incomplete (missing tokens). Run 'codex' to re-authenticate.");
|
|
94
114
|
}
|
|
115
|
+
const expectedEmail = process.env.CODEX_EXPECTED_EMAIL?.trim().toLowerCase();
|
|
116
|
+
if (expectedEmail) {
|
|
117
|
+
let claims;
|
|
118
|
+
try {
|
|
119
|
+
const parts = (idToken ?? '').split('.');
|
|
120
|
+
if (parts.length !== 3)
|
|
121
|
+
throw new Error('Invalid identity token');
|
|
122
|
+
const parsed = JSON.parse(Buffer.from(parts[1], 'base64url').toString('utf8'));
|
|
123
|
+
if (!isRecord(parsed))
|
|
124
|
+
throw new Error('Invalid identity claims');
|
|
125
|
+
claims = parsed;
|
|
126
|
+
}
|
|
127
|
+
catch {
|
|
128
|
+
throw new Error('Codex auth account identity is invalid. Re-authenticate the dedicated credential stream.');
|
|
129
|
+
}
|
|
130
|
+
const identity = claims['https://api.openai.com/auth'];
|
|
131
|
+
if (typeof accountId !== 'string' || !accountId.trim() || !isRecord(identity) || identity.chatgpt_account_id !== accountId) {
|
|
132
|
+
throw new Error('Codex auth account identity is invalid. Re-authenticate the dedicated credential stream.');
|
|
133
|
+
}
|
|
134
|
+
if (typeof claims.email !== 'string' || claims.email.trim().toLowerCase() !== expectedEmail || claims.email_verified !== true) {
|
|
135
|
+
throw new Error('Codex auth does not match the expected verified account. Re-authenticate the dedicated credential stream.');
|
|
136
|
+
}
|
|
137
|
+
}
|
|
95
138
|
return {
|
|
96
139
|
credentials: {
|
|
97
140
|
auth_mode: data.auth_mode ?? 'chatgpt',
|
|
@@ -133,6 +176,7 @@ export class CodexAuthManager {
|
|
|
133
176
|
openaiApiKey = undefined;
|
|
134
177
|
/** Full parsed file so fields introduced by newer Codex CLIs survive refresh. */
|
|
135
178
|
source = null;
|
|
179
|
+
refreshInFlight = null;
|
|
136
180
|
constructor(authFilePath = CODEX_AUTH_FILE_PATH) {
|
|
137
181
|
this.authFilePath = authFilePath;
|
|
138
182
|
}
|
|
@@ -175,12 +219,52 @@ export class CodexAuthManager {
|
|
|
175
219
|
await this.refreshToken(signal);
|
|
176
220
|
return this.credentials.access_token;
|
|
177
221
|
}
|
|
178
|
-
/**
|
|
179
|
-
async refreshToken(signal) {
|
|
222
|
+
/** Serialize rotating-token updates within this process and across file-sharing processes. */
|
|
223
|
+
async refreshToken(signal, force = false) {
|
|
224
|
+
if (signal === true) {
|
|
225
|
+
force = true;
|
|
226
|
+
signal = undefined;
|
|
227
|
+
}
|
|
228
|
+
if (signal === false)
|
|
229
|
+
signal = undefined;
|
|
180
230
|
throwIfRefreshAborted(signal);
|
|
181
|
-
if (!this.credentials)
|
|
231
|
+
if (!this.credentials)
|
|
182
232
|
throw new Error('No credentials loaded');
|
|
233
|
+
if (this.refreshInFlight)
|
|
234
|
+
return this.refreshInFlight;
|
|
235
|
+
const refresh = this.refreshTokenWithLock(signal, force);
|
|
236
|
+
this.refreshInFlight = refresh;
|
|
237
|
+
try {
|
|
238
|
+
await refresh;
|
|
239
|
+
}
|
|
240
|
+
finally {
|
|
241
|
+
if (this.refreshInFlight === refresh)
|
|
242
|
+
this.refreshInFlight = null;
|
|
183
243
|
}
|
|
244
|
+
}
|
|
245
|
+
async refreshTokenWithLock(signal, force) {
|
|
246
|
+
const observed = { ...this.credentials };
|
|
247
|
+
const lockfile = await loadFileLock();
|
|
248
|
+
const release = lockfile ? await lockfile.lock(this.authFilePath, {
|
|
249
|
+
realpath: false, stale: 120_000, update: 10_000,
|
|
250
|
+
retries: { retries: 20, factor: 1.25, minTimeout: 100, maxTimeout: 2000, randomize: true },
|
|
251
|
+
}) : async () => { };
|
|
252
|
+
try {
|
|
253
|
+
throwIfRefreshAborted(signal);
|
|
254
|
+
this.loadCredentialsSync();
|
|
255
|
+
const current = this.credentials;
|
|
256
|
+
const peerRefreshed = current.access_token !== observed.access_token || current.refresh_token !== observed.refresh_token;
|
|
257
|
+
if ((peerRefreshed || !force) && !this.isExpiringSoon(current.access_token))
|
|
258
|
+
return;
|
|
259
|
+
await this.performOAuthRefresh(signal);
|
|
260
|
+
}
|
|
261
|
+
finally {
|
|
262
|
+
await release();
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
async performOAuthRefresh(signal) {
|
|
266
|
+
if (!this.credentials)
|
|
267
|
+
throw new Error('No credentials loaded');
|
|
184
268
|
const timeoutSignal = AbortSignal.timeout(CODEX_OAUTH_TIMEOUT_MS);
|
|
185
269
|
const requestSignal = signal
|
|
186
270
|
? AbortSignal.any([signal, timeoutSignal])
|
|
@@ -205,9 +289,10 @@ export class CodexAuthManager {
|
|
|
205
289
|
if (timeoutSignal.aborted) {
|
|
206
290
|
throw new Error('Codex token refresh timed out. Run \'codex\' to re-authenticate.');
|
|
207
291
|
}
|
|
208
|
-
throw new Error(
|
|
292
|
+
throw new Error("Failed to refresh Codex token. Run 'codex' to re-authenticate.");
|
|
209
293
|
}
|
|
210
294
|
if (!res.ok) {
|
|
295
|
+
await res.body?.cancel();
|
|
211
296
|
throw new Error(`Failed to refresh Codex token (HTTP ${res.status}). Run 'codex' to re-authenticate.`);
|
|
212
297
|
}
|
|
213
298
|
let rawData;
|
|
@@ -222,6 +307,8 @@ export class CodexAuthManager {
|
|
|
222
307
|
if (timeoutSignal.aborted) {
|
|
223
308
|
throw new Error('Codex token refresh timed out. Run \'codex\' to re-authenticate.');
|
|
224
309
|
}
|
|
310
|
+
if (error instanceof SyntaxError)
|
|
311
|
+
throw new Error("Failed to refresh Codex token. Run 'codex' to re-authenticate.");
|
|
225
312
|
throw error;
|
|
226
313
|
}
|
|
227
314
|
if (!isRecord(rawData)) {
|
|
@@ -271,6 +358,9 @@ export class CodexAuthManager {
|
|
|
271
358
|
if (nextCredentials.client_id)
|
|
272
359
|
onDisk.client_id = nextCredentials.client_id;
|
|
273
360
|
onDisk.last_refresh = nextCredentials.last_refresh;
|
|
361
|
+
const validated = parseCodexAuthData(onDisk);
|
|
362
|
+
if (validated.credentials.account_id !== this.credentials.account_id)
|
|
363
|
+
throw new Error('Refreshed Codex auth changed account identity');
|
|
274
364
|
writeCodexAuthFileAtomic(this.authFilePath, onDisk);
|
|
275
365
|
this.credentials = nextCredentials;
|
|
276
366
|
this.source = onDisk;
|
|
@@ -325,6 +415,10 @@ export class CodexAuthBackend {
|
|
|
325
415
|
}
|
|
326
416
|
/** POST the streaming Responses request, refreshing the token once on 401. */
|
|
327
417
|
async fetchResponses(request, _retried = false, recovery) {
|
|
418
|
+
const serviceTier = process.env.ZTC_CODEX_SERVICE_TIER;
|
|
419
|
+
if (serviceTier !== undefined && !['default', 'priority', 'ultrafast'].includes(serviceTier)) {
|
|
420
|
+
throw new Error('Unsupported Codex service tier; use default, priority, or ultrafast');
|
|
421
|
+
}
|
|
328
422
|
const headers = await this.buildHeaders(request.signal);
|
|
329
423
|
const input = buildResponsesInput(request.messages);
|
|
330
424
|
const tools = request.tools.map(t => ({
|
|
@@ -332,6 +426,7 @@ export class CodexAuthBackend {
|
|
|
332
426
|
name: t.name,
|
|
333
427
|
description: t.description,
|
|
334
428
|
parameters: t.parameters,
|
|
429
|
+
strict: false,
|
|
335
430
|
}));
|
|
336
431
|
const system = request.system || 'You are a helpful assistant.';
|
|
337
432
|
const body = {
|
|
@@ -356,10 +451,12 @@ export class CodexAuthBackend {
|
|
|
356
451
|
// Codex/GPT reasoning effort + fast mode (Responses API shape). Always
|
|
357
452
|
// request a reasoning summary so the agent's thinking streams to the UI as a
|
|
358
453
|
// collapsed thinking block (gpt-5.x are reasoning models).
|
|
359
|
-
body.reasoning = request.codexEffort
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
if (
|
|
454
|
+
body.reasoning = responsesReasoning(request.model, request.codexEffort, 'codex');
|
|
455
|
+
if (/^gpt-(?:6-astra|6\.1-sol)(?:-|$)/i.test(request.model))
|
|
456
|
+
body.include = ['reasoning.encrypted_content'];
|
|
457
|
+
if (serviceTier !== undefined)
|
|
458
|
+
body.service_tier = serviceTier;
|
|
459
|
+
else if (request.codexFastMode) {
|
|
363
460
|
body.service_tier = 'priority';
|
|
364
461
|
}
|
|
365
462
|
const response = await (recovery?.fetch ?? fetch)(`${CODEX_API_BASE}/responses`, {
|
|
@@ -370,12 +467,17 @@ export class CodexAuthBackend {
|
|
|
370
467
|
});
|
|
371
468
|
if (!response.ok) {
|
|
372
469
|
if (response.status === 401 && !_retried && (!recovery || recovery.canPost())) {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
await this.authManager.refreshToken(request.signal);
|
|
470
|
+
await response.body?.cancel();
|
|
471
|
+
await this.authManager.refreshToken(request.signal, true);
|
|
376
472
|
return this.fetchResponses(request, true, recovery);
|
|
377
473
|
}
|
|
378
|
-
|
|
474
|
+
// A 429 body only classifies the limit window; provider text is never surfaced.
|
|
475
|
+
const limitText = response.status === 429 ? await readBoundedProviderError(response).catch(() => '') : '';
|
|
476
|
+
if (response.status !== 429)
|
|
477
|
+
await response.body?.cancel();
|
|
478
|
+
const rawRequestId = response.headers.get('x-request-id') || '';
|
|
479
|
+
const requestId = /^[A-Za-z0-9._:-]{1,128}$/.test(rawRequestId) ? rawRequestId : '';
|
|
480
|
+
const errorText = `Codex API error (${response.status})${requestId ? ` request_id=${requestId}` : ''}`;
|
|
379
481
|
if (response.status === 429) {
|
|
380
482
|
// Typed so the rotation engine can cool this account and fail over.
|
|
381
483
|
const now = Date.now();
|
|
@@ -389,11 +491,11 @@ export class CodexAuthBackend {
|
|
|
389
491
|
throw new RateLimitError({
|
|
390
492
|
provider: CODEX_LEGACY_PROVIDER,
|
|
391
493
|
resetAt,
|
|
392
|
-
weekly: /week/i.test(
|
|
494
|
+
weekly: /week/i.test(limitText),
|
|
393
495
|
detail: errorText,
|
|
394
496
|
});
|
|
395
497
|
}
|
|
396
|
-
throw new Error(
|
|
498
|
+
throw new Error(errorText);
|
|
397
499
|
}
|
|
398
500
|
return request.maxResponseBytes === undefined ? response : this.boundResponse(response, request.maxResponseBytes);
|
|
399
501
|
}
|
|
@@ -452,7 +554,7 @@ export class CodexAuthBackend {
|
|
|
452
554
|
* tool_use + usage + stopReason assembled from the completed output items.
|
|
453
555
|
*/
|
|
454
556
|
async *generateStream(request) {
|
|
455
|
-
yield* streamResponsesSSE(await this.fetchResponses(request), request.maxResponseBytes);
|
|
557
|
+
yield* streamResponsesSSE(await this.fetchResponses(request), request.maxResponseBytes, { failureError: 'Codex response stream failed' });
|
|
456
558
|
}
|
|
457
559
|
/**
|
|
458
560
|
* Parse SSE stream and build a BackendResponse.
|
|
@@ -525,13 +627,11 @@ export class CodexAuthBackend {
|
|
|
525
627
|
}
|
|
526
628
|
}
|
|
527
629
|
else if (event.type === 'response.failed' || event.type === 'error') {
|
|
528
|
-
|
|
529
|
-
const errObj = (resp?.error ?? event.error);
|
|
530
|
-
failure = errObj?.message || 'the provider reported a stream failure';
|
|
630
|
+
failure = 'Codex response stream failed';
|
|
531
631
|
}
|
|
532
632
|
}
|
|
533
633
|
if (failure)
|
|
534
|
-
throw new Error(
|
|
634
|
+
throw new Error(failure);
|
|
535
635
|
if (!terminalEventSeen) {
|
|
536
636
|
throw new Error('Responses API stream ended without a valid terminal response event');
|
|
537
637
|
}
|
|
@@ -14,7 +14,7 @@ export class GeminiBackend extends BaseBackend {
|
|
|
14
14
|
if (typeof content === 'string') {
|
|
15
15
|
return [{ text: content }];
|
|
16
16
|
}
|
|
17
|
-
return content.filter(block => block.type !== 'thinking' && block.type !== 'redacted_thinking').map(block => {
|
|
17
|
+
return content.filter(block => block.type !== 'thinking' && block.type !== 'redacted_thinking' && block.type !== 'responses_reasoning').map(block => {
|
|
18
18
|
if (block.type === 'text') {
|
|
19
19
|
return { text: block.text };
|
|
20
20
|
}
|
|
@@ -23,4 +23,6 @@ export declare function readHttpErrorBody(response: Response, signal?: AbortSign
|
|
|
23
23
|
body: string;
|
|
24
24
|
bodyReadState: BodyReadState;
|
|
25
25
|
}>;
|
|
26
|
+
/** Credentials in error text a person will read: bearer tokens, `key: value` credential pairs and sk- keys. */
|
|
27
|
+
export declare function redactErrorText(text: string): string;
|
|
26
28
|
export {};
|
|
@@ -189,6 +189,10 @@ function redact(text, headers, incomplete) {
|
|
|
189
189
|
return redactText(text.replace(/\\+(["'])/g, '$1'), secrets, incomplete);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
+
/** Credentials in error text a person will read: bearer tokens, `key: value` credential pairs and sk- keys. */
|
|
193
|
+
export function redactErrorText(text) {
|
|
194
|
+
return redactText(text, new Set(), false);
|
|
195
|
+
}
|
|
192
196
|
function redactText(text, secrets, incomplete) {
|
|
193
197
|
if (incomplete) {
|
|
194
198
|
// An unfinished quoted credential can contain whitespace. None of the
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { BedrockBackend } from './bedrock.js';
|
|
2
|
+
import { type BedrockBackendConfig } from './bedrock.js';
|
|
1
3
|
export { AnthropicBackend, AnthropicApiError, createNativeAnthropicMessagesRouterBackend } from './anthropic.js';
|
|
2
4
|
export type { NativeAnthropicMessagesRouterConfig } from './anthropic.js';
|
|
3
5
|
export { OpenAIBackend } from './openai.js';
|
|
@@ -20,6 +22,7 @@ import type { AgentBackend, BackendRequest, BackendResponse, StreamEvent } from
|
|
|
20
22
|
import { AccountPool, type RotationMode } from './account_rotation.js';
|
|
21
23
|
import type { Message } from '../../types.js';
|
|
22
24
|
export interface CreateBackendOptions {
|
|
25
|
+
bedrock?: BedrockBackendConfig;
|
|
23
26
|
apiKey: string;
|
|
24
27
|
baseUrl?: string;
|
|
25
28
|
apiEndpoint?: string;
|