@zergai/ztc 0.5.0-beta.1 → 0.6.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -46
- package/THIRD_PARTY_NOTICES.md +7 -2
- package/bin/zmux-darwin-arm64 +0 -0
- package/bin/ztc-audio-darwin-arm64 +0 -0
- package/bin/ztc-capture-darwin-arm64 +0 -0
- package/bin/ztc-computer-darwin-arm64 +0 -0
- package/bin/ztc-llm-darwin-arm64 +0 -0
- package/bin/ztc-tts-darwin-arm64 +0 -0
- package/bin/ztc-tui-darwin-arm64 +0 -0
- package/bin/zterm-darwin-arm64 +0 -0
- package/dist/App.js +26 -9
- package/dist/agent/agent.d.ts +77 -0
- package/dist/agent/agent.js +618 -94
- package/dist/agent/backends/account_login.js +3 -1
- package/dist/agent/backends/anthropic.js +4 -3
- package/dist/agent/backends/bedrock.d.ts +20 -0
- package/dist/agent/backends/bedrock.js +175 -0
- package/dist/agent/backends/claude_cli.js +8 -0
- package/dist/agent/backends/codex_app_server.js +2 -0
- package/dist/agent/backends/codex_auth.d.ts +5 -2
- package/dist/agent/backends/codex_auth.js +131 -31
- package/dist/agent/backends/gemini.js +1 -1
- package/dist/agent/backends/http_error.d.ts +2 -0
- package/dist/agent/backends/http_error.js +4 -0
- package/dist/agent/backends/index.d.ts +3 -0
- package/dist/agent/backends/index.js +16 -0
- package/dist/agent/backends/model_pool.d.ts +20 -0
- package/dist/agent/backends/model_pool.js +98 -0
- package/dist/agent/backends/openai.js +2 -0
- package/dist/agent/backends/openai_compatible.js +8 -3
- package/dist/agent/backends/openai_responses.d.ts +14 -3
- package/dist/agent/backends/openai_responses.js +91 -26
- package/dist/agent/backends/responses_reasoning.d.ts +5 -0
- package/dist/agent/backends/responses_reasoning.js +23 -0
- package/dist/agent/backends/transport_errors.d.ts +6 -0
- package/dist/agent/backends/transport_errors.js +11 -0
- package/dist/agent/backends/types.d.ts +25 -2
- package/dist/agent/backends/types.js +4 -0
- package/dist/agent/backends/zrouter_stream.d.ts +16 -0
- package/dist/agent/backends/zrouter_stream.js +162 -17
- package/dist/agent/background_workers.d.ts +68 -0
- package/dist/agent/background_workers.js +139 -0
- package/dist/agent/commands/accounts.d.ts +9 -1
- package/dist/agent/commands/accounts.js +13 -5
- package/dist/agent/commands/auth.d.ts +30 -1
- package/dist/agent/commands/auth.js +166 -35
- package/dist/agent/commands/command_refusal.d.ts +8 -0
- package/dist/agent/commands/command_refusal.js +8 -0
- package/dist/agent/commands/compact.js +16 -10
- package/dist/agent/commands/config.js +386 -80
- package/dist/agent/commands/connect.d.ts +20 -0
- package/dist/agent/commands/connect.js +150 -0
- package/dist/agent/commands/credential_redaction.d.ts +12 -0
- package/dist/agent/commands/credential_redaction.js +46 -0
- package/dist/agent/commands/credential_status.d.ts +72 -0
- package/dist/agent/commands/credential_status.js +181 -0
- package/dist/agent/commands/direct_credential_prompt.d.ts +71 -0
- package/dist/agent/commands/direct_credential_prompt.js +422 -0
- package/dist/agent/commands/effort.d.ts +1 -0
- package/dist/agent/commands/effort.js +16 -34
- package/dist/agent/commands/goal.d.ts +0 -4
- package/dist/agent/commands/goal.js +48 -10
- package/dist/agent/commands/handoff.d.ts +6 -0
- package/dist/agent/commands/handoff.js +17 -0
- package/dist/agent/commands/help.js +1 -1
- package/dist/agent/commands/inbox.js +3 -0
- package/dist/agent/commands/index.js +5 -3
- package/dist/agent/commands/keybindings.js +4 -3
- package/dist/agent/commands/mirror.js +29 -16
- package/dist/agent/commands/model.js +83 -4
- package/dist/agent/commands/models.d.ts +1 -1
- package/dist/agent/commands/models.js +89 -67
- package/dist/agent/commands/openai_compat_wizard.d.ts +3 -2
- package/dist/agent/commands/openai_compat_wizard.js +53 -15
- package/dist/agent/commands/provider_choices.d.ts +56 -0
- package/dist/agent/commands/provider_choices.js +72 -3
- package/dist/agent/commands/provider_model_defaults.d.ts +7 -0
- package/dist/agent/commands/provider_model_defaults.js +11 -0
- package/dist/agent/commands/provider_selection.d.ts +27 -2
- package/dist/agent/commands/provider_selection.js +143 -8
- package/dist/agent/commands/reasoning_page.d.ts +33 -0
- package/dist/agent/commands/reasoning_page.js +595 -0
- package/dist/agent/commands/reasoning_picker.d.ts +14 -0
- package/dist/agent/commands/reasoning_picker.js +99 -0
- package/dist/agent/commands/reasoning_settings.d.ts +18 -0
- package/dist/agent/commands/reasoning_settings.js +46 -0
- package/dist/agent/commands/settings.d.ts +2 -0
- package/dist/agent/commands/settings.js +689 -264
- package/dist/agent/commands/status.js +13 -44
- package/dist/agent/commands/types.d.ts +108 -2
- package/dist/agent/commands/update.d.ts +18 -0
- package/dist/agent/commands/update.js +55 -96
- package/dist/agent/completion_state.d.ts +18 -0
- package/dist/agent/completion_state.js +35 -3
- package/dist/agent/factory.d.ts +9 -1
- package/dist/agent/factory.js +61 -17
- package/dist/agent/loop_policy.d.ts +14 -0
- package/dist/agent/loop_policy.js +9 -0
- package/dist/agent/request_encoder.d.ts +6 -0
- package/dist/agent/request_encoder.js +36 -6
- package/dist/agent/result_emit_cap.d.ts +1 -0
- package/dist/agent/result_emit_cap.js +1 -0
- package/dist/agent/runaway_output.d.ts +32 -0
- package/dist/agent/runaway_output.js +80 -0
- package/dist/agent/runtime/command_execution_policy.d.ts +6 -0
- package/dist/agent/runtime/command_execution_policy.js +39 -0
- package/dist/agent/runtime/evidence.d.ts +17 -1
- package/dist/agent/runtime/evidence.js +58 -8
- package/dist/agent/runtime/execution_context.js +7 -3
- package/dist/agent/runtime/read_only_command.d.ts +15 -0
- package/dist/agent/runtime/read_only_command.js +265 -0
- package/dist/agent/runtime/recovery.js +2 -38
- package/dist/agent/runtime/source_verification.js +3 -1
- package/dist/agent/runtime/tool_checkpoints.js +5 -1
- package/dist/agent/runtime/tool_runtime.js +15 -1
- package/dist/agent/runtime/tool_scheduler.js +3 -1
- package/dist/agent/subagent.d.ts +4 -0
- package/dist/agent/subagent.js +195 -23
- package/dist/agent/system_prompt.d.ts +3 -1
- package/dist/agent/system_prompt.js +3 -1
- package/dist/agent/tool_response_store.d.ts +9 -0
- package/dist/agent/tool_response_store.js +39 -3
- package/dist/agent/tool_result_parsing.d.ts +2 -0
- package/dist/agent/tool_result_parsing.js +1 -0
- package/dist/agent/tool_result_presentation.d.ts +21 -0
- package/dist/agent/tool_result_presentation.js +237 -0
- package/dist/agent/tools/apply_patch.js +130 -42
- package/dist/agent/tools/deferred.js +22 -2
- package/dist/agent/tools/delegate.js +182 -49
- package/dist/agent/tools/edit_view.d.ts +13 -0
- package/dist/agent/tools/edit_view.js +134 -0
- package/dist/agent/tools/file.js +54 -16
- package/dist/agent/tools/recall_tool_response.d.ts +6 -0
- package/dist/agent/tools/recall_tool_response.js +60 -17
- package/dist/agent/tools/screenshot.js +5 -3
- package/dist/agent/tools/search.js +18 -9
- package/dist/agent/tools/shell.d.ts +1 -1
- package/dist/agent/tools/shell.js +48 -10
- package/dist/agent/tools/sim_domain_tools.js +7 -1
- package/dist/agent/tools/tool_groups.d.ts +34 -0
- package/dist/agent/tools/tool_groups.js +112 -0
- package/dist/agent/tools/types.d.ts +10 -0
- package/dist/app/activity.js +2 -1
- package/dist/app/agent_runner.js +13 -4
- package/dist/app/ask_user_response.d.ts +6 -0
- package/dist/app/ask_user_response.js +26 -0
- package/dist/app/command_context.js +11 -5
- package/dist/app/launch_notices.d.ts +10 -0
- package/dist/app/launch_notices.js +20 -0
- package/dist/app/selection_completion.d.ts +30 -1
- package/dist/app/selection_completion.js +191 -28
- package/dist/app/session_manager.d.ts +5 -0
- package/dist/app/session_manager.js +50 -12
- package/dist/app/session_messages.d.ts +3 -0
- package/dist/app/session_messages.js +34 -12
- package/dist/app/workspace_admission_details.d.ts +7 -0
- package/dist/app/workspace_admission_details.js +45 -1
- package/dist/cli_args.js +1 -1
- package/dist/cli_main.js +20 -3
- package/dist/cli_ratatui.d.ts +95 -3
- package/dist/cli_ratatui.js +654 -161
- package/dist/components/InputArea.js +1 -1
- package/dist/config/compaction.d.ts +2 -1
- package/dist/config/compaction.js +2 -1
- package/dist/config/defaults.js +20 -48
- package/dist/config/provider_api_key_env.d.ts +76 -0
- package/dist/config/provider_api_key_env.js +148 -0
- package/dist/config/resolved.d.ts +4 -4
- package/dist/config/types.d.ts +102 -1
- package/dist/config.d.ts +70 -8
- package/dist/config.js +253 -63
- package/dist/diagnostics/session_export.d.ts +1 -0
- package/dist/diagnostics/session_export.js +81 -13
- package/dist/emulation/catalog.d.ts +2 -0
- package/dist/emulation/catalog.js +50 -21
- package/dist/emulation/tool_adapters.d.ts +6 -0
- package/dist/emulation/tool_adapters.js +30 -0
- package/dist/emulation/ztc_addendum.d.ts +22 -0
- package/dist/emulation/ztc_addendum.js +37 -0
- package/dist/events.d.ts +3 -0
- package/dist/headless.d.ts +35 -1
- package/dist/headless.js +209 -14
- package/dist/headless_cli.js +6 -0
- package/dist/headless_cli_args.d.ts +4 -0
- package/dist/headless_cli_args.js +2 -0
- package/dist/headless_output_schema.d.ts +46 -0
- package/dist/headless_output_schema.js +386 -0
- package/dist/headless_trajectory.d.ts +44 -0
- package/dist/headless_trajectory.js +113 -0
- package/dist/library.d.ts +6 -3
- package/dist/library.js +8 -4
- package/dist/lsp/client.js +4 -1
- package/dist/lsp/servers.js +2 -0
- package/dist/onboarding/first_run.d.ts +26 -6
- package/dist/onboarding/first_run.js +63 -45
- package/dist/onboarding/router_tips.d.ts +7 -0
- package/dist/onboarding/router_tips.js +38 -0
- package/dist/onboarding/setup.js +1 -1
- package/dist/onboarding/wordmark.d.ts +7 -0
- package/dist/onboarding/wordmark.js +14 -0
- package/dist/onboarding/zergai_login.d.ts +48 -0
- package/dist/onboarding/zergai_login.js +60 -0
- package/dist/prompts/subagent_worker.j2 +20 -0
- package/dist/prompts/tool_delegate_task.j2 +5 -14
- package/dist/router_auth.d.ts +37 -3
- package/dist/router_auth.js +221 -73
- package/dist/runtime_info.d.ts +19 -6
- package/dist/runtime_info.js +64 -28
- package/dist/session.d.ts +9 -0
- package/dist/session.js +41 -8
- package/dist/session_handoff_contract.d.ts +13 -0
- package/dist/session_handoff_contract.js +81 -15
- package/dist/session_media.d.ts +5 -0
- package/dist/session_media.js +2 -1
- package/dist/simulation/domain_types.d.ts +3 -3
- package/dist/simulation/living/context.d.ts +9 -9
- package/dist/simulation/living/definition.d.ts +1 -1
- package/dist/simulation/living/open-world.d.ts +3 -3
- package/dist/simulation/living/recall.d.ts +1 -1
- package/dist/simulation/living/types.d.ts +18 -18
- package/dist/simulation/orchestration/world_response.d.ts +2 -2
- package/dist/simulation/toolkit/dynamic_meetings.d.ts +1 -1
- package/dist/simulation/toolkit/dynamic_state.d.ts +1 -1
- package/dist/simulation/world/bootstrap_schema.d.ts +1 -1
- package/dist/simulation/world/gm_schema.d.ts +8 -8
- package/dist/skills/loader.js +3 -1
- package/dist/types.d.ts +6 -2
- package/dist/ui/core/input.d.ts +5 -1
- package/dist/ui/core/input.js +5 -1
- package/dist/ui/core/input_segments.d.ts +5 -1
- package/dist/ui/core/input_segments.js +5 -3
- package/dist/ui/ratatui/headless_pane_manager.d.ts +3 -1
- package/dist/ui/ratatui/headless_pane_manager.js +16 -5
- package/dist/ui/ratatui/input.js +4 -3
- package/dist/ui/ratatui/process.js +22 -13
- package/dist/ui/ratatui/protocol.d.ts +14 -0
- package/dist/ui/ratatui/protocol.js +2 -0
- package/dist/ui/scrollback.d.ts +17 -0
- package/dist/ui/scrollback.js +138 -4
- package/dist/ui/terminal_image.d.ts +129 -0
- package/dist/ui/terminal_image.js +516 -0
- package/dist/ui/transcript_render_cache.d.ts +4 -4
- package/dist/ui/transcript_render_cache.js +7 -4
- package/dist/ui/views/app.d.ts +7 -3
- package/dist/ui/views/app.js +13 -6
- package/dist/ui/views/completion_menu.js +18 -10
- package/dist/ui/views/input_area.d.ts +1 -2
- package/dist/ui/views/input_area.js +2 -2
- package/dist/ui/views/message_list.d.ts +8 -1
- package/dist/ui/views/message_list.js +176 -45
- package/dist/ui/views/status_bar.js +7 -1
- package/dist/ui/views/theme.d.ts +2 -0
- package/dist/ui/views/theme.js +2 -0
- package/dist/ui/widgets/color_panel.js +4 -3
- package/dist/ui/widgets/form.d.ts +8 -1
- package/dist/ui/widgets/form.js +36 -22
- package/dist/ui/widgets/index.d.ts +1 -1
- package/dist/ui/widgets/index.js +1 -1
- package/dist/ui/widgets/log_view.js +4 -3
- package/dist/ui/widgets/navigator_panel.js +5 -4
- package/dist/ui/widgets/panel_frame.d.ts +2 -0
- package/dist/ui/widgets/panel_frame.js +14 -0
- package/dist/ui/widgets/prompt_viewer.js +2 -1
- package/dist/ui/widgets/questionnaire.js +3 -3
- package/dist/ui/widgets/reasoning_track.d.ts +60 -0
- package/dist/ui/widgets/reasoning_track.js +218 -0
- package/dist/ui/widgets/resume_panel.js +15 -10
- package/dist/ui/widgets/rewind_panel.js +4 -16
- package/dist/ui/widgets/select.d.ts +90 -4
- package/dist/ui/widgets/select.js +305 -135
- package/dist/ui/widgets/settings_panel.d.ts +21 -1
- package/dist/ui/widgets/settings_panel.js +266 -45
- package/dist/ui/widgets/status_line_panel.js +6 -5
- package/dist/ui/widgets/text_input.d.ts +4 -0
- package/dist/ui/widgets/text_input.js +20 -13
- package/dist/ui/widgets/types.d.ts +2 -0
- package/dist/utils/compaction.d.ts +24 -4
- package/dist/utils/compaction.js +228 -44
- package/dist/utils/context.js +1 -0
- package/dist/utils/debug_log.d.ts +12 -0
- package/dist/utils/debug_log.js +25 -3
- package/dist/utils/deepseek.d.ts +3 -1
- package/dist/utils/deepseek.js +29 -1
- package/dist/utils/docker_target.d.ts +28 -0
- package/dist/utils/docker_target.js +89 -0
- package/dist/utils/ephemeral.js +2 -0
- package/dist/utils/fireworks.d.ts +4 -4
- package/dist/utils/fireworks.js +11 -7
- package/dist/utils/idle_compaction.d.ts +32 -0
- package/dist/utils/idle_compaction.js +113 -0
- package/dist/utils/mid_turn_compaction.d.ts +12 -0
- package/dist/utils/mid_turn_compaction.js +17 -0
- package/dist/utils/open_url.d.ts +4 -0
- package/dist/utils/open_url.js +10 -0
- package/dist/utils/openrouter_prices.d.ts +165 -0
- package/dist/utils/openrouter_prices.js +313 -0
- package/dist/utils/router_catalog.d.ts +13 -0
- package/dist/utils/router_catalog.js +30 -3
- package/dist/utils/sandbox.d.ts +12 -0
- package/dist/utils/sandbox.js +23 -5
- package/dist/utils/session_interactivity.d.ts +21 -0
- package/dist/utils/session_interactivity.js +28 -0
- package/dist/utils/shell.d.ts +7 -0
- package/dist/utils/shell.js +43 -7
- package/dist/utils/subprocess_env.d.ts +27 -0
- package/dist/utils/subprocess_env.js +69 -3
- package/dist/utils/tool_output_copies.d.ts +44 -0
- package/dist/utils/tool_output_copies.js +196 -0
- package/dist/utils/tool_result_message.d.ts +7 -0
- package/dist/utils/tool_result_message.js +11 -0
- package/dist/utils/tool_trace.d.ts +15 -0
- package/dist/utils/tool_trace.js +40 -9
- package/dist/web/event_history_store.d.ts +2 -0
- package/dist/web/event_history_store.js +31 -6
- package/dist/web/mirror_client.d.ts +3 -0
- package/dist/web/mirror_stream.d.ts +11 -0
- package/dist/web/mirror_stream.js +23 -3
- package/dist/worker/executor.js +3 -1
- package/dist/worker/toolsets.d.ts +1 -1
- package/dist/worker/toolsets.js +4 -3
- package/dist/worker/types.d.ts +6 -0
- package/dist/worker/worker_models.d.ts +17 -0
- package/dist/worker/worker_models.js +79 -0
- package/dist/zlm-embed.mjs +53761 -10916
- package/node_modules/@zerg/model-contracts/README.md +16 -5
- package/node_modules/@zerg/model-contracts/index.d.ts +7 -3
- package/node_modules/@zerg/model-contracts/index.js +40 -18
- package/node_modules/abort-controller/LICENSE +21 -0
- package/node_modules/abort-controller/README.md +98 -0
- package/node_modules/abort-controller/browser.js +13 -0
- package/node_modules/abort-controller/browser.mjs +11 -0
- package/node_modules/abort-controller/dist/abort-controller.d.ts +43 -0
- package/node_modules/abort-controller/dist/abort-controller.js +127 -0
- package/node_modules/abort-controller/dist/abort-controller.js.map +1 -0
- package/node_modules/abort-controller/dist/abort-controller.mjs +118 -0
- package/node_modules/abort-controller/dist/abort-controller.mjs.map +1 -0
- package/node_modules/abort-controller/dist/abort-controller.umd.js +5 -0
- package/node_modules/abort-controller/dist/abort-controller.umd.js.map +1 -0
- package/node_modules/abort-controller/package.json +97 -0
- package/node_modules/abort-controller/polyfill.js +21 -0
- package/node_modules/abort-controller/polyfill.mjs +19 -0
- package/node_modules/bluebird/LICENSE +1 -1
- package/node_modules/bluebird/README.md +8 -2
- package/node_modules/bluebird/js/browser/bluebird.core.js +325 -150
- package/node_modules/bluebird/js/browser/bluebird.core.min.js +4 -4
- package/node_modules/bluebird/js/browser/bluebird.js +362 -165
- package/node_modules/bluebird/js/browser/bluebird.min.js +5 -5
- package/node_modules/bluebird/js/release/async.js +15 -56
- package/node_modules/bluebird/js/release/debuggability.js +118 -25
- package/node_modules/bluebird/js/release/finally.js +37 -2
- package/node_modules/bluebird/js/release/generators.js +1 -1
- package/node_modules/bluebird/js/release/join.js +4 -7
- package/node_modules/bluebird/js/release/map.js +10 -3
- package/node_modules/bluebird/js/release/promise.js +89 -43
- package/node_modules/bluebird/js/release/promise_array.js +2 -0
- package/node_modules/bluebird/js/release/props.js +1 -1
- package/node_modules/bluebird/js/release/reduce.js +16 -5
- package/node_modules/bluebird/js/release/schedule.js +6 -5
- package/node_modules/bluebird/js/release/settle.js +4 -0
- package/node_modules/bluebird/js/release/util.js +53 -11
- package/node_modules/bluebird/package.json +7 -5
- package/node_modules/buffer/AUTHORS.md +3 -0
- package/node_modules/buffer/README.md +1 -1
- package/node_modules/buffer/index.d.ts +11 -3
- package/node_modules/buffer/index.js +424 -135
- package/node_modules/buffer/package.json +8 -11
- package/node_modules/compress-commons/README.md +1 -1
- package/node_modules/compress-commons/lib/archivers/archive-entry.js +6 -16
- package/node_modules/compress-commons/lib/archivers/archive-output-stream.js +79 -98
- package/node_modules/compress-commons/lib/archivers/zip/constants.js +99 -70
- package/node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js +70 -92
- package/node_modules/compress-commons/lib/archivers/zip/unix-stat.js +19 -53
- package/node_modules/compress-commons/lib/archivers/zip/util.js +49 -49
- package/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js +356 -389
- package/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js +335 -404
- package/node_modules/compress-commons/lib/compress-commons.js +18 -13
- package/node_modules/compress-commons/lib/util/index.js +11 -21
- package/node_modules/compress-commons/node_modules/readable-stream/README.md +116 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/_stream_duplex.js +4 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/_stream_passthrough.js +4 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/_stream_readable.js +4 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/_stream_transform.js +4 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/_stream_writable.js +4 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/shims/process.js +19 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +52 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/buffer_list.js +157 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/compose.js +194 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/destroy.js +290 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/duplex.js +143 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/duplexify.js +378 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +286 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/from.js +98 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +51 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/legacy.js +94 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/operators.js +457 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/passthrough.js +39 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/pipeline.js +471 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/readable.js +1290 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/state.js +39 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/transform.js +180 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/utils.js +327 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/streams/writable.js +819 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/internal/validators.js +530 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/ours/browser.js +35 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/ours/errors.js +343 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/ours/index.js +65 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/ours/primordials.js +124 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/ours/util/inspect.js +55 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/ours/util.js +148 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/stream/promises.js +43 -0
- package/node_modules/compress-commons/node_modules/readable-stream/lib/stream.js +143 -0
- package/node_modules/compress-commons/node_modules/readable-stream/package.json +89 -0
- package/node_modules/compress-commons/package.json +13 -10
- package/node_modules/crc32-stream/README.md +8 -8
- package/node_modules/crc32-stream/lib/crc32-stream.js +4 -23
- package/node_modules/crc32-stream/lib/deflate-crc32-stream.js +5 -27
- package/node_modules/crc32-stream/lib/index.js +7 -6
- package/node_modules/crc32-stream/node_modules/readable-stream/README.md +116 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/_stream_duplex.js +4 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/_stream_passthrough.js +4 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/_stream_readable.js +4 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/_stream_transform.js +4 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/_stream_writable.js +4 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/shims/process.js +19 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +52 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/buffer_list.js +157 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/compose.js +194 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/destroy.js +290 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/duplex.js +143 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/duplexify.js +378 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +286 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/from.js +98 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +51 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/legacy.js +94 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/operators.js +457 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/passthrough.js +39 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/pipeline.js +471 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/readable.js +1290 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/state.js +39 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/transform.js +180 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/utils.js +327 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/streams/writable.js +819 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/internal/validators.js +530 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/ours/browser.js +35 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/ours/errors.js +343 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/ours/index.js +65 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/ours/primordials.js +124 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/ours/util/inspect.js +55 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/ours/util.js +148 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/stream/promises.js +43 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/lib/stream.js +143 -0
- package/node_modules/crc32-stream/node_modules/readable-stream/package.json +89 -0
- package/node_modules/crc32-stream/package.json +9 -10
- package/node_modules/event-target-shim/LICENSE +22 -0
- package/node_modules/event-target-shim/README.md +293 -0
- package/node_modules/event-target-shim/dist/event-target-shim.js +871 -0
- package/node_modules/event-target-shim/dist/event-target-shim.js.map +1 -0
- package/node_modules/event-target-shim/dist/event-target-shim.mjs +862 -0
- package/node_modules/event-target-shim/dist/event-target-shim.mjs.map +1 -0
- package/node_modules/event-target-shim/dist/event-target-shim.umd.js +6 -0
- package/node_modules/event-target-shim/dist/event-target-shim.umd.js.map +1 -0
- package/node_modules/event-target-shim/index.d.ts +399 -0
- package/node_modules/event-target-shim/package.json +82 -0
- package/node_modules/events/.airtap.yml +15 -0
- package/node_modules/events/.github/FUNDING.yml +12 -0
- package/node_modules/events/.travis.yml +18 -0
- package/node_modules/events/History.md +118 -0
- package/node_modules/events/LICENSE +22 -0
- package/node_modules/events/Readme.md +50 -0
- package/node_modules/events/events.js +497 -0
- package/node_modules/events/package.json +37 -0
- package/node_modules/events/security.md +10 -0
- package/node_modules/events/tests/add-listeners.js +111 -0
- package/node_modules/events/tests/check-listener-leaks.js +101 -0
- package/node_modules/events/tests/common.js +104 -0
- package/node_modules/events/tests/errors.js +13 -0
- package/node_modules/events/tests/events-list.js +28 -0
- package/node_modules/events/tests/events-once.js +234 -0
- package/node_modules/events/tests/index.js +64 -0
- package/node_modules/events/tests/legacy-compat.js +16 -0
- package/node_modules/events/tests/listener-count.js +37 -0
- package/node_modules/events/tests/listeners-side-effects.js +56 -0
- package/node_modules/events/tests/listeners.js +168 -0
- package/node_modules/events/tests/max-listeners.js +47 -0
- package/node_modules/events/tests/method-names.js +35 -0
- package/node_modules/events/tests/modify-in-emit.js +90 -0
- package/node_modules/events/tests/num-args.js +60 -0
- package/node_modules/events/tests/once.js +83 -0
- package/node_modules/events/tests/prepend.js +31 -0
- package/node_modules/events/tests/remove-all-listeners.js +133 -0
- package/node_modules/events/tests/remove-listeners.js +212 -0
- package/node_modules/events/tests/set-max-listeners-side-effects.js +31 -0
- package/node_modules/events/tests/special-event-names.js +45 -0
- package/node_modules/events/tests/subclass.js +66 -0
- package/node_modules/events/tests/symbols.js +25 -0
- package/node_modules/exceljs/lib/stream/xlsx/workbook-reader.js +5 -1
- package/node_modules/exceljs/lib/stream/xlsx/workbook-writer.js +2 -2
- package/node_modules/exceljs/lib/utils/zip-archive.js +85 -0
- package/node_modules/exceljs/package.json +3 -3
- package/node_modules/fs-extra/LICENSE +15 -0
- package/node_modules/fs-extra/README.md +294 -0
- package/node_modules/fs-extra/lib/copy/copy-sync.js +171 -0
- package/node_modules/fs-extra/lib/copy/copy.js +182 -0
- package/node_modules/fs-extra/lib/copy/index.js +7 -0
- package/node_modules/fs-extra/lib/empty/index.js +39 -0
- package/node_modules/fs-extra/lib/ensure/file.js +66 -0
- package/node_modules/fs-extra/lib/ensure/index.js +23 -0
- package/node_modules/fs-extra/lib/ensure/link.js +64 -0
- package/node_modules/fs-extra/lib/ensure/symlink-paths.js +101 -0
- package/node_modules/fs-extra/lib/ensure/symlink-type.js +34 -0
- package/node_modules/fs-extra/lib/ensure/symlink.js +67 -0
- package/node_modules/fs-extra/lib/esm.mjs +68 -0
- package/node_modules/fs-extra/lib/fs/index.js +146 -0
- package/node_modules/fs-extra/lib/index.js +16 -0
- package/node_modules/fs-extra/lib/json/index.js +16 -0
- package/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
- package/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
- package/node_modules/fs-extra/lib/json/output-json.js +12 -0
- package/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
- package/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
- package/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
- package/node_modules/fs-extra/lib/move/index.js +7 -0
- package/node_modules/fs-extra/lib/move/move-sync.js +55 -0
- package/node_modules/fs-extra/lib/move/move.js +59 -0
- package/node_modules/fs-extra/lib/output-file/index.js +31 -0
- package/node_modules/fs-extra/lib/path-exists/index.js +12 -0
- package/node_modules/fs-extra/lib/remove/index.js +17 -0
- package/node_modules/fs-extra/lib/util/stat.js +159 -0
- package/node_modules/fs-extra/lib/util/utimes.js +36 -0
- package/node_modules/fs-extra/package.json +71 -0
- package/node_modules/is-stream/index.d.ts +90 -0
- package/node_modules/is-stream/index.js +37 -0
- package/node_modules/is-stream/license +9 -0
- package/node_modules/is-stream/package.json +48 -0
- package/node_modules/is-stream/readme.md +57 -0
- package/node_modules/jsonfile/LICENSE +15 -0
- package/node_modules/jsonfile/README.md +230 -0
- package/node_modules/jsonfile/index.js +88 -0
- package/node_modules/jsonfile/package.json +40 -0
- package/node_modules/jsonfile/utils.js +18 -0
- package/node_modules/node-int64/.npmignore +3 -0
- package/node_modules/node-int64/Int64.js +268 -0
- package/node_modules/node-int64/LICENSE +19 -0
- package/node_modules/node-int64/README.md +78 -0
- package/node_modules/node-int64/package.json +27 -0
- package/node_modules/node-int64/test.js +120 -0
- package/node_modules/process/.eslintrc +21 -0
- package/node_modules/process/LICENSE +22 -0
- package/node_modules/process/README.md +26 -0
- package/node_modules/process/browser.js +184 -0
- package/node_modules/process/index.js +2 -0
- package/node_modules/process/package.json +27 -0
- package/node_modules/process/test.js +199 -0
- package/node_modules/universalify/LICENSE +20 -0
- package/node_modules/universalify/README.md +76 -0
- package/node_modules/universalify/index.js +24 -0
- package/node_modules/universalify/package.json +34 -0
- package/node_modules/unzipper/README.md +206 -176
- package/node_modules/unzipper/eslint.config.mjs +29 -0
- package/node_modules/unzipper/lib/BufferStream.js +9 -15
- package/node_modules/unzipper/lib/Decrypt.js +58 -36
- package/node_modules/unzipper/lib/NoopStream.js +5 -10
- package/node_modules/unzipper/lib/Open/directory.js +140 -127
- package/node_modules/unzipper/lib/Open/index.js +72 -32
- package/node_modules/unzipper/lib/Open/unzip.js +68 -74
- package/node_modules/unzipper/lib/PullStream.js +50 -55
- package/node_modules/unzipper/lib/extract.js +26 -18
- package/node_modules/unzipper/lib/parse.js +119 -118
- package/node_modules/unzipper/lib/parseBuffer.js +55 -0
- package/node_modules/unzipper/lib/parseExtraField.js +17 -14
- package/node_modules/unzipper/lib/parseOne.js +23 -27
- package/node_modules/unzipper/package.json +12 -13
- package/node_modules/unzipper/unzip.js +0 -6
- package/node_modules/zip-stream/README.md +5 -5
- package/node_modules/zip-stream/index.js +143 -169
- package/node_modules/zip-stream/node_modules/readable-stream/README.md +116 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/_stream_duplex.js +4 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/_stream_passthrough.js +4 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/_stream_readable.js +4 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/_stream_transform.js +4 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/_stream_writable.js +4 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/shims/process.js +19 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +52 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/buffer_list.js +157 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/compose.js +194 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/destroy.js +290 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/duplex.js +143 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/duplexify.js +378 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +286 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/from.js +98 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +51 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/legacy.js +94 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/operators.js +457 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/passthrough.js +39 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/pipeline.js +471 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/readable.js +1290 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/state.js +39 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/transform.js +180 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/utils.js +327 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/streams/writable.js +819 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/internal/validators.js +530 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/ours/browser.js +35 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/ours/errors.js +343 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/ours/index.js +65 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/ours/primordials.js +124 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/ours/util/inspect.js +55 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/ours/util.js +148 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/stream/promises.js +43 -0
- package/node_modules/zip-stream/node_modules/readable-stream/lib/stream.js +143 -0
- package/node_modules/zip-stream/node_modules/readable-stream/package.json +89 -0
- package/node_modules/zip-stream/package.json +15 -12
- package/node_modules/zip-stream/utils.js +21 -0
- package/package.json +22 -10
- package/packages/exceljs/PROVENANCE.md +24 -1
- package/packages/exceljs/lib/stream/xlsx/workbook-reader.js +5 -1
- package/packages/exceljs/lib/stream/xlsx/workbook-writer.js +2 -2
- package/packages/exceljs/lib/utils/zip-archive.js +85 -0
- package/packages/exceljs/package.json +3 -3
- package/packages/model-contracts/README.md +16 -5
- package/packages/model-contracts/index.d.ts +7 -3
- package/packages/model-contracts/index.js +40 -18
- package/scripts/install-macos-app.mjs +10 -1
- package/node_modules/archiver/LICENSE +0 -22
- package/node_modules/archiver/README.md +0 -94
- package/node_modules/archiver/index.js +0 -84
- package/node_modules/archiver/lib/core.js +0 -974
- package/node_modules/archiver/lib/error.js +0 -40
- package/node_modules/archiver/lib/plugins/json.js +0 -110
- package/node_modules/archiver/lib/plugins/tar.js +0 -167
- package/node_modules/archiver/lib/plugins/zip.js +0 -120
- package/node_modules/archiver/package.json +0 -60
- package/node_modules/archiver-utils/LICENSE +0 -22
- package/node_modules/archiver-utils/README.md +0 -7
- package/node_modules/archiver-utils/file.js +0 -209
- package/node_modules/archiver-utils/index.js +0 -156
- package/node_modules/archiver-utils/node_modules/readable-stream/.travis.yml +0 -34
- package/node_modules/archiver-utils/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/archiver-utils/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/archiver-utils/node_modules/readable-stream/README.md +0 -58
- package/node_modules/archiver-utils/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
- package/node_modules/archiver-utils/node_modules/readable-stream/duplex-browser.js +0 -1
- package/node_modules/archiver-utils/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/_stream_duplex.js +0 -131
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/_stream_passthrough.js +0 -47
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/_stream_readable.js +0 -1019
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/_stream_transform.js +0 -214
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/_stream_writable.js +0 -685
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -78
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -84
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/archiver-utils/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/archiver-utils/node_modules/readable-stream/package.json +0 -52
- package/node_modules/archiver-utils/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/archiver-utils/node_modules/readable-stream/readable-browser.js +0 -7
- package/node_modules/archiver-utils/node_modules/readable-stream/readable.js +0 -19
- package/node_modules/archiver-utils/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/archiver-utils/node_modules/readable-stream/writable-browser.js +0 -1
- package/node_modules/archiver-utils/node_modules/readable-stream/writable.js +0 -8
- package/node_modules/archiver-utils/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/archiver-utils/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/archiver-utils/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/archiver-utils/node_modules/safe-buffer/index.js +0 -62
- package/node_modules/archiver-utils/node_modules/safe-buffer/package.json +0 -37
- package/node_modules/archiver-utils/node_modules/string_decoder/.travis.yml +0 -50
- package/node_modules/archiver-utils/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/archiver-utils/node_modules/string_decoder/README.md +0 -47
- package/node_modules/archiver-utils/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/archiver-utils/node_modules/string_decoder/package.json +0 -31
- package/node_modules/archiver-utils/package.json +0 -54
- package/node_modules/async/CHANGELOG.md +0 -351
- package/node_modules/async/LICENSE +0 -19
- package/node_modules/async/README.md +0 -59
- package/node_modules/async/all.js +0 -119
- package/node_modules/async/allLimit.js +0 -46
- package/node_modules/async/allSeries.js +0 -45
- package/node_modules/async/any.js +0 -122
- package/node_modules/async/anyLimit.js +0 -47
- package/node_modules/async/anySeries.js +0 -46
- package/node_modules/async/apply.js +0 -11
- package/node_modules/async/applyEach.js +0 -57
- package/node_modules/async/applyEachSeries.js +0 -37
- package/node_modules/async/asyncify.js +0 -118
- package/node_modules/async/auto.js +0 -333
- package/node_modules/async/autoInject.js +0 -182
- package/node_modules/async/bower.json +0 -17
- package/node_modules/async/cargo.js +0 -63
- package/node_modules/async/cargoQueue.js +0 -71
- package/node_modules/async/compose.js +0 -55
- package/node_modules/async/concat.js +0 -115
- package/node_modules/async/concatLimit.js +0 -60
- package/node_modules/async/concatSeries.js +0 -41
- package/node_modules/async/constant.js +0 -14
- package/node_modules/async/detect.js +0 -96
- package/node_modules/async/detectLimit.js +0 -48
- package/node_modules/async/detectSeries.js +0 -47
- package/node_modules/async/dir.js +0 -43
- package/node_modules/async/dist/async.js +0 -6061
- package/node_modules/async/dist/async.min.js +0 -1
- package/node_modules/async/dist/async.mjs +0 -5948
- package/node_modules/async/doDuring.js +0 -68
- package/node_modules/async/doUntil.js +0 -46
- package/node_modules/async/doWhilst.js +0 -68
- package/node_modules/async/during.js +0 -78
- package/node_modules/async/each.js +0 -129
- package/node_modules/async/eachLimit.js +0 -50
- package/node_modules/async/eachOf.js +0 -185
- package/node_modules/async/eachOfLimit.js +0 -47
- package/node_modules/async/eachOfSeries.js +0 -39
- package/node_modules/async/eachSeries.js +0 -44
- package/node_modules/async/ensureAsync.js +0 -67
- package/node_modules/async/every.js +0 -119
- package/node_modules/async/everyLimit.js +0 -46
- package/node_modules/async/everySeries.js +0 -45
- package/node_modules/async/filter.js +0 -93
- package/node_modules/async/filterLimit.js +0 -45
- package/node_modules/async/filterSeries.js +0 -43
- package/node_modules/async/find.js +0 -96
- package/node_modules/async/findLimit.js +0 -48
- package/node_modules/async/findSeries.js +0 -47
- package/node_modules/async/flatMap.js +0 -115
- package/node_modules/async/flatMapLimit.js +0 -60
- package/node_modules/async/flatMapSeries.js +0 -41
- package/node_modules/async/foldl.js +0 -153
- package/node_modules/async/foldr.js +0 -41
- package/node_modules/async/forEach.js +0 -129
- package/node_modules/async/forEachLimit.js +0 -50
- package/node_modules/async/forEachOf.js +0 -185
- package/node_modules/async/forEachOfLimit.js +0 -47
- package/node_modules/async/forEachOfSeries.js +0 -39
- package/node_modules/async/forEachSeries.js +0 -44
- package/node_modules/async/forever.js +0 -68
- package/node_modules/async/groupBy.js +0 -108
- package/node_modules/async/groupByLimit.js +0 -71
- package/node_modules/async/groupBySeries.js +0 -36
- package/node_modules/async/index.js +0 -588
- package/node_modules/async/inject.js +0 -153
- package/node_modules/async/internal/DoublyLinkedList.js +0 -92
- package/node_modules/async/internal/Heap.js +0 -120
- package/node_modules/async/internal/applyEach.js +0 -29
- package/node_modules/async/internal/asyncEachOfLimit.js +0 -75
- package/node_modules/async/internal/awaitify.js +0 -28
- package/node_modules/async/internal/breakLoop.js +0 -10
- package/node_modules/async/internal/consoleFunc.js +0 -31
- package/node_modules/async/internal/createTester.js +0 -40
- package/node_modules/async/internal/eachOfLimit.js +0 -90
- package/node_modules/async/internal/filter.js +0 -55
- package/node_modules/async/internal/getIterator.js +0 -11
- package/node_modules/async/internal/initialParams.js +0 -14
- package/node_modules/async/internal/isArrayLike.js +0 -10
- package/node_modules/async/internal/iterator.js +0 -57
- package/node_modules/async/internal/map.js +0 -30
- package/node_modules/async/internal/once.js +0 -17
- package/node_modules/async/internal/onlyOnce.js +0 -15
- package/node_modules/async/internal/parallel.js +0 -34
- package/node_modules/async/internal/promiseCallback.js +0 -23
- package/node_modules/async/internal/queue.js +0 -294
- package/node_modules/async/internal/range.js +0 -14
- package/node_modules/async/internal/reject.js +0 -26
- package/node_modules/async/internal/setImmediate.js +0 -34
- package/node_modules/async/internal/withoutIndex.js +0 -10
- package/node_modules/async/internal/wrapAsync.js +0 -34
- package/node_modules/async/log.js +0 -41
- package/node_modules/async/map.js +0 -142
- package/node_modules/async/mapLimit.js +0 -45
- package/node_modules/async/mapSeries.js +0 -44
- package/node_modules/async/mapValues.js +0 -152
- package/node_modules/async/mapValuesLimit.js +0 -61
- package/node_modules/async/mapValuesSeries.js +0 -37
- package/node_modules/async/memoize.js +0 -91
- package/node_modules/async/nextTick.js +0 -52
- package/node_modules/async/package.json +0 -75
- package/node_modules/async/parallel.js +0 -180
- package/node_modules/async/parallelLimit.js +0 -41
- package/node_modules/async/priorityQueue.js +0 -60
- package/node_modules/async/queue.js +0 -24
- package/node_modules/async/race.js +0 -67
- package/node_modules/async/reduce.js +0 -153
- package/node_modules/async/reduceRight.js +0 -41
- package/node_modules/async/reflect.js +0 -78
- package/node_modules/async/reflectAll.js +0 -93
- package/node_modules/async/reject.js +0 -87
- package/node_modules/async/rejectLimit.js +0 -45
- package/node_modules/async/rejectSeries.js +0 -43
- package/node_modules/async/retry.js +0 -159
- package/node_modules/async/retryable.js +0 -77
- package/node_modules/async/select.js +0 -93
- package/node_modules/async/selectLimit.js +0 -45
- package/node_modules/async/selectSeries.js +0 -43
- package/node_modules/async/seq.js +0 -79
- package/node_modules/async/series.js +0 -186
- package/node_modules/async/setImmediate.js +0 -45
- package/node_modules/async/some.js +0 -122
- package/node_modules/async/someLimit.js +0 -47
- package/node_modules/async/someSeries.js +0 -46
- package/node_modules/async/sortBy.js +0 -190
- package/node_modules/async/timeout.js +0 -89
- package/node_modules/async/times.js +0 -50
- package/node_modules/async/timesLimit.js +0 -43
- package/node_modules/async/timesSeries.js +0 -32
- package/node_modules/async/transform.js +0 -173
- package/node_modules/async/tryEach.js +0 -78
- package/node_modules/async/unmemoize.js +0 -25
- package/node_modules/async/until.js +0 -61
- package/node_modules/async/waterfall.js +0 -105
- package/node_modules/async/whilst.js +0 -78
- package/node_modules/async/wrapSync.js +0 -118
- package/node_modules/big-integer/BigInteger.d.ts +0 -2393
- package/node_modules/big-integer/BigInteger.js +0 -1453
- package/node_modules/big-integer/BigInteger.min.js +0 -1
- package/node_modules/big-integer/LICENSE +0 -24
- package/node_modules/big-integer/README.md +0 -589
- package/node_modules/big-integer/bower.json +0 -29
- package/node_modules/big-integer/package.json +0 -48
- package/node_modules/big-integer/tsconfig.json +0 -24
- package/node_modules/binary/.npmignore +0 -1
- package/node_modules/binary/.travis.yml +0 -4
- package/node_modules/binary/README.markdown +0 -177
- package/node_modules/binary/example/buf.js +0 -11
- package/node_modules/binary/example/parse.js +0 -10
- package/node_modules/binary/example/stream.js +0 -12
- package/node_modules/binary/index.js +0 -397
- package/node_modules/binary/lib/vars.js +0 -28
- package/node_modules/binary/package.json +0 -38
- package/node_modules/binary/perf/loop.js +0 -92
- package/node_modules/binary/perf/small.js +0 -80
- package/node_modules/binary/test/bu.js +0 -46
- package/node_modules/binary/test/deferred.js +0 -20
- package/node_modules/binary/test/dots.js +0 -23
- package/node_modules/binary/test/eof.js +0 -41
- package/node_modules/binary/test/flush.js +0 -17
- package/node_modules/binary/test/from_buffer.js +0 -14
- package/node_modules/binary/test/get_buffer.js +0 -28
- package/node_modules/binary/test/immediate.js +0 -18
- package/node_modules/binary/test/interval.js +0 -38
- package/node_modules/binary/test/into_buffer.js +0 -35
- package/node_modules/binary/test/into_stream.js +0 -43
- package/node_modules/binary/test/loop.js +0 -44
- package/node_modules/binary/test/loop_scan.js +0 -54
- package/node_modules/binary/test/lu.js +0 -46
- package/node_modules/binary/test/negbs.js +0 -29
- package/node_modules/binary/test/negls.js +0 -29
- package/node_modules/binary/test/nested.js +0 -35
- package/node_modules/binary/test/not_enough_buf.js +0 -17
- package/node_modules/binary/test/not_enough_parse.js +0 -19
- package/node_modules/binary/test/parse.js +0 -54
- package/node_modules/binary/test/peek.js +0 -40
- package/node_modules/binary/test/pipe.js +0 -49
- package/node_modules/binary/test/posbs.js +0 -29
- package/node_modules/binary/test/posls.js +0 -29
- package/node_modules/binary/test/scan.js +0 -33
- package/node_modules/binary/test/scan_buf.js +0 -18
- package/node_modules/binary/test/scan_buf_null.js +0 -16
- package/node_modules/binary/test/skip.js +0 -58
- package/node_modules/binary/test/split.js +0 -34
- package/node_modules/bl/.travis.yml +0 -17
- package/node_modules/bl/BufferList.js +0 -396
- package/node_modules/bl/LICENSE.md +0 -13
- package/node_modules/bl/README.md +0 -247
- package/node_modules/bl/bl.js +0 -84
- package/node_modules/bl/package.json +0 -37
- package/node_modules/bl/test/convert.js +0 -21
- package/node_modules/bl/test/indexOf.js +0 -492
- package/node_modules/bl/test/isBufferList.js +0 -32
- package/node_modules/bl/test/test.js +0 -869
- package/node_modules/buffer-crc32/LICENSE +0 -19
- package/node_modules/buffer-crc32/README.md +0 -47
- package/node_modules/buffer-crc32/index.js +0 -111
- package/node_modules/buffer-crc32/package.json +0 -39
- package/node_modules/buffer-indexof-polyfill/.eslintrc +0 -33
- package/node_modules/buffer-indexof-polyfill/.travis.yml +0 -17
- package/node_modules/buffer-indexof-polyfill/LICENSE +0 -22
- package/node_modules/buffer-indexof-polyfill/README.md +0 -33
- package/node_modules/buffer-indexof-polyfill/index.js +0 -73
- package/node_modules/buffer-indexof-polyfill/init-buffer.js +0 -8
- package/node_modules/buffer-indexof-polyfill/package.json +0 -34
- package/node_modules/buffer-indexof-polyfill/test/indexof.js +0 -128
- package/node_modules/buffers/README.markdown +0 -122
- package/node_modules/buffers/examples/slice.js +0 -9
- package/node_modules/buffers/examples/splice.js +0 -17
- package/node_modules/buffers/index.js +0 -269
- package/node_modules/buffers/package.json +0 -14
- package/node_modules/buffers/test/buffers.js +0 -209
- package/node_modules/chainsaw/.npmignore +0 -1
- package/node_modules/chainsaw/README.markdown +0 -157
- package/node_modules/chainsaw/examples/add_do.js +0 -25
- package/node_modules/chainsaw/examples/prompt.js +0 -67
- package/node_modules/chainsaw/index.js +0 -145
- package/node_modules/chainsaw/package.json +0 -23
- package/node_modules/chainsaw/test/chainsaw.js +0 -418
- package/node_modules/concat-map/.travis.yml +0 -4
- package/node_modules/concat-map/LICENSE +0 -18
- package/node_modules/concat-map/README.markdown +0 -62
- package/node_modules/concat-map/example/map.js +0 -6
- package/node_modules/concat-map/index.js +0 -13
- package/node_modules/concat-map/package.json +0 -43
- package/node_modules/concat-map/test/map.js +0 -39
- package/node_modules/end-of-stream/LICENSE +0 -21
- package/node_modules/end-of-stream/README.md +0 -54
- package/node_modules/end-of-stream/index.js +0 -96
- package/node_modules/end-of-stream/package.json +0 -37
- package/node_modules/fs-constants/LICENSE +0 -21
- package/node_modules/fs-constants/README.md +0 -26
- package/node_modules/fs-constants/browser.js +0 -1
- package/node_modules/fs-constants/index.js +0 -1
- package/node_modules/fs-constants/package.json +0 -19
- package/node_modules/fs.realpath/LICENSE +0 -43
- package/node_modules/fs.realpath/README.md +0 -33
- package/node_modules/fs.realpath/index.js +0 -66
- package/node_modules/fs.realpath/old.js +0 -303
- package/node_modules/fs.realpath/package.json +0 -26
- package/node_modules/fstream/.travis.yml +0 -9
- package/node_modules/fstream/LICENSE +0 -15
- package/node_modules/fstream/README.md +0 -76
- package/node_modules/fstream/examples/filter-pipe.js +0 -134
- package/node_modules/fstream/examples/pipe.js +0 -118
- package/node_modules/fstream/examples/reader.js +0 -68
- package/node_modules/fstream/examples/symlink-write.js +0 -27
- package/node_modules/fstream/fstream.js +0 -35
- package/node_modules/fstream/lib/abstract.js +0 -85
- package/node_modules/fstream/lib/collect.js +0 -70
- package/node_modules/fstream/lib/dir-reader.js +0 -252
- package/node_modules/fstream/lib/dir-writer.js +0 -174
- package/node_modules/fstream/lib/file-reader.js +0 -150
- package/node_modules/fstream/lib/file-writer.js +0 -107
- package/node_modules/fstream/lib/get-type.js +0 -33
- package/node_modules/fstream/lib/link-reader.js +0 -53
- package/node_modules/fstream/lib/link-writer.js +0 -95
- package/node_modules/fstream/lib/proxy-reader.js +0 -95
- package/node_modules/fstream/lib/proxy-writer.js +0 -111
- package/node_modules/fstream/lib/reader.js +0 -255
- package/node_modules/fstream/lib/socket-reader.js +0 -36
- package/node_modules/fstream/lib/writer.js +0 -390
- package/node_modules/fstream/package.json +0 -28
- package/node_modules/glob/LICENSE +0 -21
- package/node_modules/glob/README.md +0 -378
- package/node_modules/glob/common.js +0 -238
- package/node_modules/glob/glob.js +0 -790
- package/node_modules/glob/node_modules/balanced-match/.github/FUNDING.yml +0 -2
- package/node_modules/glob/node_modules/balanced-match/LICENSE.md +0 -21
- package/node_modules/glob/node_modules/balanced-match/README.md +0 -97
- package/node_modules/glob/node_modules/balanced-match/index.js +0 -62
- package/node_modules/glob/node_modules/balanced-match/package.json +0 -48
- package/node_modules/glob/node_modules/brace-expansion/LICENSE +0 -21
- package/node_modules/glob/node_modules/brace-expansion/README.md +0 -151
- package/node_modules/glob/node_modules/brace-expansion/index.js +0 -438
- package/node_modules/glob/node_modules/brace-expansion/package.json +0 -50
- package/node_modules/glob/node_modules/minimatch/LICENSE +0 -15
- package/node_modules/glob/node_modules/minimatch/README.md +0 -267
- package/node_modules/glob/node_modules/minimatch/minimatch.js +0 -1005
- package/node_modules/glob/node_modules/minimatch/package.json +0 -33
- package/node_modules/glob/package.json +0 -55
- package/node_modules/glob/sync.js +0 -486
- package/node_modules/inflight/LICENSE +0 -15
- package/node_modules/inflight/README.md +0 -37
- package/node_modules/inflight/inflight.js +0 -54
- package/node_modules/inflight/package.json +0 -29
- package/node_modules/lazystream/LICENSE +0 -23
- package/node_modules/lazystream/README.md +0 -114
- package/node_modules/lazystream/lib/lazystream.js +0 -54
- package/node_modules/lazystream/node_modules/readable-stream/.travis.yml +0 -34
- package/node_modules/lazystream/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/lazystream/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/lazystream/node_modules/readable-stream/README.md +0 -58
- package/node_modules/lazystream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
- package/node_modules/lazystream/node_modules/readable-stream/duplex-browser.js +0 -1
- package/node_modules/lazystream/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/lazystream/node_modules/readable-stream/lib/_stream_duplex.js +0 -131
- package/node_modules/lazystream/node_modules/readable-stream/lib/_stream_passthrough.js +0 -47
- package/node_modules/lazystream/node_modules/readable-stream/lib/_stream_readable.js +0 -1019
- package/node_modules/lazystream/node_modules/readable-stream/lib/_stream_transform.js +0 -214
- package/node_modules/lazystream/node_modules/readable-stream/lib/_stream_writable.js +0 -685
- package/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -78
- package/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -84
- package/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/lazystream/node_modules/readable-stream/package.json +0 -52
- package/node_modules/lazystream/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/lazystream/node_modules/readable-stream/readable-browser.js +0 -7
- package/node_modules/lazystream/node_modules/readable-stream/readable.js +0 -19
- package/node_modules/lazystream/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/lazystream/node_modules/readable-stream/writable-browser.js +0 -1
- package/node_modules/lazystream/node_modules/readable-stream/writable.js +0 -8
- package/node_modules/lazystream/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/lazystream/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/lazystream/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/lazystream/node_modules/safe-buffer/index.js +0 -62
- package/node_modules/lazystream/node_modules/safe-buffer/package.json +0 -37
- package/node_modules/lazystream/node_modules/string_decoder/.travis.yml +0 -50
- package/node_modules/lazystream/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/lazystream/node_modules/string_decoder/README.md +0 -47
- package/node_modules/lazystream/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/lazystream/node_modules/string_decoder/package.json +0 -31
- package/node_modules/lazystream/package.json +0 -46
- package/node_modules/lazystream/test/data.md +0 -13
- package/node_modules/lazystream/test/fs_test.js +0 -69
- package/node_modules/lazystream/test/helper.js +0 -39
- package/node_modules/lazystream/test/pipe_test.js +0 -36
- package/node_modules/lazystream/test/readable_test.js +0 -90
- package/node_modules/lazystream/test/writable_test.js +0 -59
- package/node_modules/listenercount/.npmignore +0 -2
- package/node_modules/listenercount/LICENSE.md +0 -5
- package/node_modules/listenercount/README.md +0 -50
- package/node_modules/listenercount/circle.yml +0 -6
- package/node_modules/listenercount/index.js +0 -16
- package/node_modules/listenercount/package.json +0 -27
- package/node_modules/listenercount/test/test.js +0 -31
- package/node_modules/lodash.defaults/LICENSE +0 -47
- package/node_modules/lodash.defaults/README.md +0 -18
- package/node_modules/lodash.defaults/index.js +0 -668
- package/node_modules/lodash.defaults/package.json +0 -17
- package/node_modules/lodash.difference/LICENSE +0 -47
- package/node_modules/lodash.difference/README.md +0 -18
- package/node_modules/lodash.difference/index.js +0 -1170
- package/node_modules/lodash.difference/package.json +0 -17
- package/node_modules/lodash.flatten/LICENSE +0 -47
- package/node_modules/lodash.flatten/README.md +0 -18
- package/node_modules/lodash.flatten/index.js +0 -349
- package/node_modules/lodash.flatten/package.json +0 -17
- package/node_modules/lodash.isplainobject/LICENSE +0 -47
- package/node_modules/lodash.isplainobject/README.md +0 -18
- package/node_modules/lodash.isplainobject/index.js +0 -139
- package/node_modules/lodash.isplainobject/package.json +0 -17
- package/node_modules/lodash.union/LICENSE +0 -47
- package/node_modules/lodash.union/README.md +0 -18
- package/node_modules/lodash.union/index.js +0 -1181
- package/node_modules/lodash.union/package.json +0 -17
- package/node_modules/minimist/.eslintrc +0 -29
- package/node_modules/minimist/.github/FUNDING.yml +0 -12
- package/node_modules/minimist/.nycrc +0 -14
- package/node_modules/minimist/CHANGELOG.md +0 -298
- package/node_modules/minimist/LICENSE +0 -18
- package/node_modules/minimist/README.md +0 -121
- package/node_modules/minimist/example/parse.js +0 -4
- package/node_modules/minimist/index.js +0 -263
- package/node_modules/minimist/package.json +0 -75
- package/node_modules/minimist/test/all_bool.js +0 -34
- package/node_modules/minimist/test/bool.js +0 -177
- package/node_modules/minimist/test/dash.js +0 -43
- package/node_modules/minimist/test/default_bool.js +0 -37
- package/node_modules/minimist/test/dotted.js +0 -24
- package/node_modules/minimist/test/kv_short.js +0 -32
- package/node_modules/minimist/test/long.js +0 -33
- package/node_modules/minimist/test/num.js +0 -38
- package/node_modules/minimist/test/parse.js +0 -209
- package/node_modules/minimist/test/parse_modified.js +0 -11
- package/node_modules/minimist/test/proto.js +0 -64
- package/node_modules/minimist/test/short.js +0 -69
- package/node_modules/minimist/test/stop_early.js +0 -17
- package/node_modules/minimist/test/unknown.js +0 -104
- package/node_modules/minimist/test/whitespace.js +0 -10
- package/node_modules/mkdirp/LICENSE +0 -21
- package/node_modules/mkdirp/bin/cmd.js +0 -33
- package/node_modules/mkdirp/bin/usage.txt +0 -12
- package/node_modules/mkdirp/index.js +0 -102
- package/node_modules/mkdirp/package.json +0 -33
- package/node_modules/mkdirp/readme.markdown +0 -100
- package/node_modules/once/LICENSE +0 -15
- package/node_modules/once/README.md +0 -79
- package/node_modules/once/once.js +0 -42
- package/node_modules/once/package.json +0 -33
- package/node_modules/path-is-absolute/index.js +0 -20
- package/node_modules/path-is-absolute/license +0 -21
- package/node_modules/path-is-absolute/package.json +0 -43
- package/node_modules/path-is-absolute/readme.md +0 -59
- package/node_modules/readdir-glob/LICENSE +0 -201
- package/node_modules/readdir-glob/README.md +0 -85
- package/node_modules/readdir-glob/index.js +0 -243
- package/node_modules/readdir-glob/node_modules/balanced-match/.github/FUNDING.yml +0 -2
- package/node_modules/readdir-glob/node_modules/balanced-match/LICENSE.md +0 -21
- package/node_modules/readdir-glob/node_modules/balanced-match/README.md +0 -97
- package/node_modules/readdir-glob/node_modules/balanced-match/index.js +0 -62
- package/node_modules/readdir-glob/node_modules/balanced-match/package.json +0 -48
- package/node_modules/readdir-glob/node_modules/brace-expansion/.github/FUNDING.yml +0 -2
- package/node_modules/readdir-glob/node_modules/brace-expansion/LICENSE +0 -21
- package/node_modules/readdir-glob/node_modules/brace-expansion/README.md +0 -157
- package/node_modules/readdir-glob/node_modules/brace-expansion/index.js +0 -394
- package/node_modules/readdir-glob/node_modules/brace-expansion/package.json +0 -49
- package/node_modules/readdir-glob/node_modules/minimatch/LICENSE +0 -15
- package/node_modules/readdir-glob/node_modules/minimatch/README.md +0 -296
- package/node_modules/readdir-glob/node_modules/minimatch/lib/path.js +0 -4
- package/node_modules/readdir-glob/node_modules/minimatch/minimatch.js +0 -996
- package/node_modules/readdir-glob/node_modules/minimatch/package.json +0 -35
- package/node_modules/readdir-glob/package.json +0 -43
- package/node_modules/rimraf/LICENSE +0 -15
- package/node_modules/rimraf/README.md +0 -101
- package/node_modules/rimraf/bin.js +0 -50
- package/node_modules/rimraf/package.json +0 -29
- package/node_modules/rimraf/rimraf.js +0 -372
- package/node_modules/tar-stream/LICENSE +0 -21
- package/node_modules/tar-stream/README.md +0 -168
- package/node_modules/tar-stream/extract.js +0 -257
- package/node_modules/tar-stream/headers.js +0 -295
- package/node_modules/tar-stream/index.js +0 -2
- package/node_modules/tar-stream/pack.js +0 -255
- package/node_modules/tar-stream/package.json +0 -58
- package/node_modules/tar-stream/sandbox.js +0 -11
- package/node_modules/traverse/.npmignore +0 -1
- package/node_modules/traverse/LICENSE +0 -24
- package/node_modules/traverse/README.markdown +0 -247
- package/node_modules/traverse/examples/json.js +0 -16
- package/node_modules/traverse/examples/leaves.js +0 -15
- package/node_modules/traverse/examples/negative.js +0 -8
- package/node_modules/traverse/examples/stringify.js +0 -38
- package/node_modules/traverse/index.js +0 -322
- package/node_modules/traverse/package.json +0 -18
- package/node_modules/traverse/test/circular.js +0 -114
- package/node_modules/traverse/test/date.js +0 -35
- package/node_modules/traverse/test/equal.js +0 -219
- package/node_modules/traverse/test/instance.js +0 -17
- package/node_modules/traverse/test/interface.js +0 -42
- package/node_modules/traverse/test/json.js +0 -47
- package/node_modules/traverse/test/leaves.js +0 -21
- package/node_modules/traverse/test/mutability.js +0 -203
- package/node_modules/traverse/test/negative.js +0 -20
- package/node_modules/traverse/test/obj.js +0 -15
- package/node_modules/traverse/test/stop.js +0 -41
- package/node_modules/traverse/test/stringify.js +0 -36
- package/node_modules/traverse/test/super_deep.js +0 -54
- package/node_modules/unzipper/.circleci/config.yml +0 -13
- package/node_modules/unzipper/.travis.yml +0 -21
- package/node_modules/unzipper/lib/Buffer.js +0 -12
- package/node_modules/unzipper/node_modules/readable-stream/.travis.yml +0 -34
- package/node_modules/unzipper/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/unzipper/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/unzipper/node_modules/readable-stream/README.md +0 -58
- package/node_modules/unzipper/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
- package/node_modules/unzipper/node_modules/readable-stream/duplex-browser.js +0 -1
- package/node_modules/unzipper/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/unzipper/node_modules/readable-stream/lib/_stream_duplex.js +0 -131
- package/node_modules/unzipper/node_modules/readable-stream/lib/_stream_passthrough.js +0 -47
- package/node_modules/unzipper/node_modules/readable-stream/lib/_stream_readable.js +0 -1019
- package/node_modules/unzipper/node_modules/readable-stream/lib/_stream_transform.js +0 -214
- package/node_modules/unzipper/node_modules/readable-stream/lib/_stream_writable.js +0 -685
- package/node_modules/unzipper/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -78
- package/node_modules/unzipper/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -84
- package/node_modules/unzipper/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/unzipper/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/unzipper/node_modules/readable-stream/package.json +0 -52
- package/node_modules/unzipper/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/unzipper/node_modules/readable-stream/readable-browser.js +0 -7
- package/node_modules/unzipper/node_modules/readable-stream/readable.js +0 -19
- package/node_modules/unzipper/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/unzipper/node_modules/readable-stream/writable-browser.js +0 -1
- package/node_modules/unzipper/node_modules/readable-stream/writable.js +0 -8
- package/node_modules/unzipper/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/unzipper/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/unzipper/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/unzipper/node_modules/safe-buffer/index.js +0 -62
- package/node_modules/unzipper/node_modules/safe-buffer/package.json +0 -37
- package/node_modules/unzipper/node_modules/string_decoder/.travis.yml +0 -50
- package/node_modules/unzipper/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/unzipper/node_modules/string_decoder/README.md +0 -47
- package/node_modules/unzipper/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/unzipper/node_modules/string_decoder/package.json +0 -31
- package/node_modules/wrappy/LICENSE +0 -15
- package/node_modules/wrappy/README.md +0 -36
- package/node_modules/wrappy/package.json +0 -29
- package/node_modules/wrappy/wrappy.js +0 -33
- package/node_modules/zip-stream/node_modules/archiver-utils/LICENSE +0 -22
- package/node_modules/zip-stream/node_modules/archiver-utils/README.md +0 -6
- package/node_modules/zip-stream/node_modules/archiver-utils/file.js +0 -209
- package/node_modules/zip-stream/node_modules/archiver-utils/index.js +0 -149
- package/node_modules/zip-stream/node_modules/archiver-utils/package.json +0 -54
- /package/node_modules/{archiver-utils → compress-commons}/node_modules/readable-stream/LICENSE +0 -0
- /package/node_modules/{lazystream → crc32-stream}/node_modules/readable-stream/LICENSE +0 -0
- /package/node_modules/{unzipper → zip-stream}/node_modules/readable-stream/LICENSE +0 -0
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Terminal image previews for the transcript.
|
|
3
|
+
*
|
|
4
|
+
* In a terminal that speaks the Kitty graphics protocol (Ghostty, Kitty) the
|
|
5
|
+
* transcript shows the image itself. The image is sent to the terminal once
|
|
6
|
+
* and placed with Kitty's Unicode placeholders: cells of U+10EEEE whose
|
|
7
|
+
* foreground colour names the image and whose diacritics give the cell's row
|
|
8
|
+
* and column. The terminal draws the image over those cells, so they travel
|
|
9
|
+
* as ordinary transcript text: they scroll into history and survive redraws
|
|
10
|
+
* like any other row.
|
|
11
|
+
*
|
|
12
|
+
* Everywhere else an image is drawn with Unicode half blocks: each cell shows
|
|
13
|
+
* two vertically stacked pixels, the top one as the `▀` glyph's 24-bit
|
|
14
|
+
* foreground and the bottom one as its background. The output is ordinary SGR
|
|
15
|
+
* text, so every renderer that already draws ZTC's coloured transcript rows
|
|
16
|
+
* (ztc-tui, zmux, zterm) shows it unchanged, whichever model produced the image.
|
|
17
|
+
*
|
|
18
|
+
* Decoding is synchronous because transcript rendering is. Each source is
|
|
19
|
+
* decoded once into a small thumbnail, plus the pixels a Kitty terminal is
|
|
20
|
+
* sent; renders at any width resample or place those.
|
|
21
|
+
*/
|
|
22
|
+
import { createHash } from 'node:crypto';
|
|
23
|
+
import { statSync, readFileSync } from 'node:fs';
|
|
24
|
+
import { basename } from 'node:path';
|
|
25
|
+
import { deflateSync } from 'node:zlib';
|
|
26
|
+
import jpeg from 'jpeg-js';
|
|
27
|
+
import { GifReader } from 'omggif';
|
|
28
|
+
import { PNG } from 'pngjs';
|
|
29
|
+
import { readDurableSessionImageSync } from '../session_media.js';
|
|
30
|
+
/** Largest preview, in terminal cells. */
|
|
31
|
+
export const TRANSCRIPT_IMAGE_MAX_COLS = 80;
|
|
32
|
+
export const TRANSCRIPT_IMAGE_MAX_ROWS = 20;
|
|
33
|
+
/** Files larger than this are not read for a preview. */
|
|
34
|
+
const MAX_SOURCE_BYTES = 20 * 1024 * 1024;
|
|
35
|
+
/** Decoders refuse images larger than this many megapixels. */
|
|
36
|
+
const MAX_MEGAPIXELS = 50;
|
|
37
|
+
const MAX_HELD_IMAGES = 256;
|
|
38
|
+
/** Pixel alpha at or above this draws; below it the terminal background shows. */
|
|
39
|
+
const OPAQUE_ALPHA = 128;
|
|
40
|
+
/** Held Kitty pixels past this many base64 bytes evict the oldest images. */
|
|
41
|
+
const MAX_HELD_GRAPHIC_BYTES = 128 * 1024 * 1024;
|
|
42
|
+
/** Image placements remembered for uploading, most recent last. */
|
|
43
|
+
const MAX_PLACEMENTS = 1024;
|
|
44
|
+
/** The renderer refuses larger images; ZTC's previews stay far below it. */
|
|
45
|
+
const MAX_GRAPHIC_SIDE = 8192;
|
|
46
|
+
const PNG_SIGNATURE = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
|
|
47
|
+
/** Decode a PNG, JPEG or GIF (first frame). Anything else, or corrupt data, is null. */
|
|
48
|
+
export function decodeImage(bytes) {
|
|
49
|
+
const buffer = Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
50
|
+
try {
|
|
51
|
+
if (buffer.length >= 8 && buffer.subarray(0, 8).equals(PNG_SIGNATURE)) {
|
|
52
|
+
// Size from the IHDR chunk first: decoding a small file that claims 8000x8000 inflates about 1 GB.
|
|
53
|
+
if (buffer.length < 24 || buffer.toString('latin1', 12, 16) !== 'IHDR'
|
|
54
|
+
|| buffer.readUInt32BE(16) * buffer.readUInt32BE(20) > MAX_MEGAPIXELS * 1_000_000)
|
|
55
|
+
return null;
|
|
56
|
+
const png = PNG.sync.read(buffer);
|
|
57
|
+
return { width: png.width, height: png.height, data: new Uint8Array(png.data.buffer, png.data.byteOffset, png.data.byteLength) };
|
|
58
|
+
}
|
|
59
|
+
if (buffer.length >= 3 && buffer[0] === 0xff && buffer[1] === 0xd8 && buffer[2] === 0xff) {
|
|
60
|
+
const decoded = jpeg.decode(buffer, { useTArray: true, formatAsRGBA: true, maxResolutionInMP: MAX_MEGAPIXELS, maxMemoryUsageInMB: 512 });
|
|
61
|
+
return { width: decoded.width, height: decoded.height, data: decoded.data };
|
|
62
|
+
}
|
|
63
|
+
if (buffer.length >= 6 && ['GIF87a', 'GIF89a'].includes(buffer.subarray(0, 6).toString('latin1'))) {
|
|
64
|
+
const reader = new GifReader(buffer);
|
|
65
|
+
if (reader.numFrames() === 0 || reader.width * reader.height > MAX_MEGAPIXELS * 1_000_000)
|
|
66
|
+
return null;
|
|
67
|
+
const data = new Uint8Array(reader.width * reader.height * 4);
|
|
68
|
+
reader.decodeAndBlitFrameRGBA(0, data);
|
|
69
|
+
return { width: reader.width, height: reader.height, data };
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Area-average `image` down to fit `maxWidth` x `maxHeight` pixels, keeping its
|
|
79
|
+
* aspect ratio. Colour is averaged weighted by alpha so transparent pixels do
|
|
80
|
+
* not darken edges. Never upscales.
|
|
81
|
+
*/
|
|
82
|
+
function fit(image, maxWidth, maxHeight) {
|
|
83
|
+
const scale = Math.min(1, maxWidth / image.width, maxHeight / image.height);
|
|
84
|
+
const width = Math.max(1, Math.min(maxWidth, Math.round(image.width * scale)));
|
|
85
|
+
const height = Math.max(1, Math.min(maxHeight, Math.round(image.height * scale)));
|
|
86
|
+
if (width === image.width && height === image.height)
|
|
87
|
+
return image;
|
|
88
|
+
const data = new Uint8Array(width * height * 4);
|
|
89
|
+
for (let y = 0; y < height; y++) {
|
|
90
|
+
const y0 = Math.floor(y * image.height / height);
|
|
91
|
+
const y1 = Math.max(y0 + 1, Math.floor((y + 1) * image.height / height));
|
|
92
|
+
for (let x = 0; x < width; x++) {
|
|
93
|
+
const x0 = Math.floor(x * image.width / width);
|
|
94
|
+
const x1 = Math.max(x0 + 1, Math.floor((x + 1) * image.width / width));
|
|
95
|
+
let r = 0;
|
|
96
|
+
let g = 0;
|
|
97
|
+
let b = 0;
|
|
98
|
+
let a = 0;
|
|
99
|
+
for (let sy = y0; sy < y1; sy++) {
|
|
100
|
+
let offset = (sy * image.width + x0) * 4;
|
|
101
|
+
for (let sx = x0; sx < x1; sx++, offset += 4) {
|
|
102
|
+
const alpha = image.data[offset + 3];
|
|
103
|
+
r += image.data[offset] * alpha;
|
|
104
|
+
g += image.data[offset + 1] * alpha;
|
|
105
|
+
b += image.data[offset + 2] * alpha;
|
|
106
|
+
a += alpha;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const out = (y * width + x) * 4;
|
|
110
|
+
const count = (y1 - y0) * (x1 - x0);
|
|
111
|
+
if (a > 0) {
|
|
112
|
+
data[out] = Math.round(r / a);
|
|
113
|
+
data[out + 1] = Math.round(g / a);
|
|
114
|
+
data[out + 2] = Math.round(b / a);
|
|
115
|
+
}
|
|
116
|
+
data[out + 3] = Math.round(a / count);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return { width, height, data };
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Draw `image` as at most `maxRows` rows of at most `maxCols` half-block cells.
|
|
123
|
+
* Each row is self-contained SGR text ending in a reset.
|
|
124
|
+
*/
|
|
125
|
+
export function imageToTerminalRows(image, maxCols, maxRows) {
|
|
126
|
+
if (maxCols < 1 || maxRows < 1 || image.width < 1 || image.height < 1)
|
|
127
|
+
return [];
|
|
128
|
+
const fitted = fit(image, maxCols, maxRows * 2);
|
|
129
|
+
const { width, height, data } = fitted;
|
|
130
|
+
const rows = [];
|
|
131
|
+
for (let y = 0; y < height; y += 2) {
|
|
132
|
+
let row = '';
|
|
133
|
+
let fg = '';
|
|
134
|
+
let bg = '';
|
|
135
|
+
const setFg = (code) => { if (fg !== code) {
|
|
136
|
+
row += `\x1b[${code}m`;
|
|
137
|
+
fg = code;
|
|
138
|
+
} };
|
|
139
|
+
const setBg = (code) => { if (bg !== code) {
|
|
140
|
+
row += `\x1b[${code}m`;
|
|
141
|
+
bg = code;
|
|
142
|
+
} };
|
|
143
|
+
for (let x = 0; x < width; x++) {
|
|
144
|
+
const top = (y * width + x) * 4;
|
|
145
|
+
const bottom = top + width * 4;
|
|
146
|
+
const topShown = data[top + 3] >= OPAQUE_ALPHA;
|
|
147
|
+
const bottomShown = y + 1 < height && data[bottom + 3] >= OPAQUE_ALPHA;
|
|
148
|
+
const colour = (offset) => `${data[offset]};${data[offset + 1]};${data[offset + 2]}`;
|
|
149
|
+
if (topShown && bottomShown) {
|
|
150
|
+
setFg(`38;2;${colour(top)}`);
|
|
151
|
+
setBg(`48;2;${colour(bottom)}`);
|
|
152
|
+
row += '▀';
|
|
153
|
+
}
|
|
154
|
+
else if (topShown) {
|
|
155
|
+
setFg(`38;2;${colour(top)}`);
|
|
156
|
+
setBg('49');
|
|
157
|
+
row += '▀';
|
|
158
|
+
}
|
|
159
|
+
else if (bottomShown) {
|
|
160
|
+
setFg(`38;2;${colour(bottom)}`);
|
|
161
|
+
setBg('49');
|
|
162
|
+
row += '▄';
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
setBg('49');
|
|
166
|
+
row += ' ';
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
rows.push(`${row}\x1b[0m`);
|
|
170
|
+
}
|
|
171
|
+
return rows;
|
|
172
|
+
}
|
|
173
|
+
/** A cell's shape when the terminal does not report it: about twice as tall as wide. */
|
|
174
|
+
const DEFAULT_CELL_PIXELS = { width: 10, height: 20 };
|
|
175
|
+
let imageMode = 'blocks';
|
|
176
|
+
let cellPixels = DEFAULT_CELL_PIXELS;
|
|
177
|
+
/**
|
|
178
|
+
* Whether the terminal ZTC runs in draws Kitty graphics with Unicode
|
|
179
|
+
* placeholders: Ghostty and Kitty. A multiplexer in between (tmux, screen)
|
|
180
|
+
* drops the upload, and a terminal started from a Ghostty shell inherits
|
|
181
|
+
* Ghostty's variables without being Ghostty, so its own TERM_PROGRAM decides.
|
|
182
|
+
* `ZTC_IMAGE_PROTOCOL=kitty` or `=blocks` overrides the detection.
|
|
183
|
+
*/
|
|
184
|
+
export function kittyGraphicsTerminal(env) {
|
|
185
|
+
const override = env.ZTC_IMAGE_PROTOCOL?.toLowerCase();
|
|
186
|
+
if (override === 'kitty')
|
|
187
|
+
return true;
|
|
188
|
+
if (override === 'blocks' || override === 'none' || override === '0')
|
|
189
|
+
return false;
|
|
190
|
+
const term = (env.TERM ?? '').toLowerCase();
|
|
191
|
+
const program = (env.TERM_PROGRAM ?? '').toLowerCase();
|
|
192
|
+
if (env.TMUX || term.startsWith('tmux') || term.startsWith('screen'))
|
|
193
|
+
return false;
|
|
194
|
+
if (program)
|
|
195
|
+
return program === 'ghostty' || program === 'kitty';
|
|
196
|
+
return term === 'xterm-ghostty' || term === 'xterm-kitty' || Boolean(env.KITTY_WINDOW_ID) || Boolean(env.GHOSTTY_RESOURCES_DIR);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Draw transcript images as `mode` from now on. `cell` is the cell size the
|
|
200
|
+
* renderer measured, when the terminal reports one. Previews of files are read
|
|
201
|
+
* again, so they carry (or drop) the pixels a Kitty terminal is sent; a tool
|
|
202
|
+
* image already held keeps the form it was decoded in.
|
|
203
|
+
*/
|
|
204
|
+
export function setTerminalImageMode(mode, cell) {
|
|
205
|
+
imageMode = mode;
|
|
206
|
+
cellPixels = cell && cell.width > 0 && cell.height > 0 ? cell : DEFAULT_CELL_PIXELS;
|
|
207
|
+
for (const key of [...thumbnails.keys()]) {
|
|
208
|
+
if (!key.startsWith('inline:'))
|
|
209
|
+
forget(key);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
/** Least-recently-used thumbnails, by source identity. */
|
|
213
|
+
const thumbnails = new Map();
|
|
214
|
+
let heldGraphicBytes = 0;
|
|
215
|
+
function forget(key) {
|
|
216
|
+
const held = thumbnails.get(key);
|
|
217
|
+
if (held?.graphic)
|
|
218
|
+
heldGraphicBytes -= held.graphic.data.length;
|
|
219
|
+
thumbnails.delete(key);
|
|
220
|
+
}
|
|
221
|
+
function remember(key, thumbnail) {
|
|
222
|
+
if (thumbnails.has(key)) {
|
|
223
|
+
// Re-inserting moves the entry to the newest end without recounting it.
|
|
224
|
+
thumbnails.delete(key);
|
|
225
|
+
}
|
|
226
|
+
else if (thumbnail?.graphic) {
|
|
227
|
+
heldGraphicBytes += thumbnail.graphic.data.length;
|
|
228
|
+
}
|
|
229
|
+
thumbnails.set(key, thumbnail);
|
|
230
|
+
while (thumbnails.size > MAX_HELD_IMAGES || heldGraphicBytes > MAX_HELD_GRAPHIC_BYTES) {
|
|
231
|
+
const oldest = thumbnails.keys().next();
|
|
232
|
+
if (oldest.done || oldest.value === key)
|
|
233
|
+
break;
|
|
234
|
+
forget(oldest.value);
|
|
235
|
+
}
|
|
236
|
+
return thumbnail;
|
|
237
|
+
}
|
|
238
|
+
function recall(key) {
|
|
239
|
+
const held = thumbnails.get(key);
|
|
240
|
+
if (held !== undefined)
|
|
241
|
+
remember(key, held);
|
|
242
|
+
return held;
|
|
243
|
+
}
|
|
244
|
+
function thumbnailOf(key, bytes) {
|
|
245
|
+
const image = decodeImage(bytes);
|
|
246
|
+
if (!image)
|
|
247
|
+
return null;
|
|
248
|
+
return {
|
|
249
|
+
key,
|
|
250
|
+
image: fit(image, TRANSCRIPT_IMAGE_MAX_COLS, TRANSCRIPT_IMAGE_MAX_ROWS * 2),
|
|
251
|
+
width: image.width,
|
|
252
|
+
height: image.height,
|
|
253
|
+
...(imageMode === 'kitty' ? { graphic: kittyGraphic(image) } : {}),
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
/** The pixels for the largest box the transcript places an image in; the terminal scales them to each placement. */
|
|
257
|
+
function kittyGraphic(image) {
|
|
258
|
+
const fitted = fit(image, Math.min(MAX_GRAPHIC_SIDE, TRANSCRIPT_IMAGE_MAX_COLS * cellPixels.width), Math.min(MAX_GRAPHIC_SIDE, TRANSCRIPT_IMAGE_MAX_ROWS * cellPixels.height));
|
|
259
|
+
const pixels = Buffer.from(fitted.data.buffer, fitted.data.byteOffset, fitted.data.byteLength);
|
|
260
|
+
return { width: fitted.width, height: fitted.height, data: deflateSync(pixels).toString('base64') };
|
|
261
|
+
}
|
|
262
|
+
function fileThumbnail(path) {
|
|
263
|
+
let key;
|
|
264
|
+
try {
|
|
265
|
+
const stats = statSync(path);
|
|
266
|
+
if (!stats.isFile() || stats.size > MAX_SOURCE_BYTES)
|
|
267
|
+
return null;
|
|
268
|
+
// A rewritten file at the same path is a different image.
|
|
269
|
+
key = `file:${path}:${stats.size}:${stats.mtimeMs}`;
|
|
270
|
+
}
|
|
271
|
+
catch {
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
const held = recall(key);
|
|
275
|
+
if (held !== undefined)
|
|
276
|
+
return held;
|
|
277
|
+
try {
|
|
278
|
+
return remember(key, thumbnailOf(key, readFileSync(path)));
|
|
279
|
+
}
|
|
280
|
+
catch {
|
|
281
|
+
return remember(key, null);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Hold a tool result's image bytes for transcript rendering and return the
|
|
286
|
+
* reference to keep in message metadata. Null when the data is not a
|
|
287
|
+
* displayable image.
|
|
288
|
+
*/
|
|
289
|
+
export function rememberInlineImage(base64) {
|
|
290
|
+
const ref = createHash('sha256').update(base64).digest('hex');
|
|
291
|
+
const key = `inline:${ref}`;
|
|
292
|
+
const held = recall(key);
|
|
293
|
+
if (held !== undefined)
|
|
294
|
+
return held ? ref : null;
|
|
295
|
+
return remember(key, thumbnailOf(key, Buffer.from(base64, 'base64'))) ? ref : null;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Turn a tool group's images into metadata references, holding inline bytes
|
|
299
|
+
* in memory. Images that do not decode are listed by label so the transcript
|
|
300
|
+
* can say they are unavailable.
|
|
301
|
+
*/
|
|
302
|
+
export function transcriptImagesForToolOutput(images) {
|
|
303
|
+
return (images ?? []).map(image => {
|
|
304
|
+
if (!('data' in image))
|
|
305
|
+
return { label: image.label, path: image.path };
|
|
306
|
+
// The held bytes are exactly what the tool returned; the path, when there
|
|
307
|
+
// is one, lets a resumed session redraw the image after they are gone.
|
|
308
|
+
return { label: image.label, ref: rememberInlineImage(image.data) ?? '', ...(image.path ? { path: image.path } : {}) };
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
function attachmentThumbnail(attachment) {
|
|
312
|
+
// The session checkpoint owns a durable copy; prefer it over a path that
|
|
313
|
+
// may since have been deleted or rewritten.
|
|
314
|
+
if (attachment.durable) {
|
|
315
|
+
const key = `durable:${attachment.durable.sha256}`;
|
|
316
|
+
const held = recall(key);
|
|
317
|
+
if (held !== undefined)
|
|
318
|
+
return held;
|
|
319
|
+
try {
|
|
320
|
+
const durable = readDurableSessionImageSync(attachment);
|
|
321
|
+
if (durable)
|
|
322
|
+
return remember(key, thumbnailOf(key, durable.data));
|
|
323
|
+
}
|
|
324
|
+
catch {
|
|
325
|
+
// Fall back to the local path below.
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return attachment.localPath ? fileThumbnail(attachment.localPath) : null;
|
|
329
|
+
}
|
|
330
|
+
function preview(label, thumbnail, maxCols) {
|
|
331
|
+
if (!thumbnail)
|
|
332
|
+
return { caption: `[image] ${label} · unavailable`, rows: [] };
|
|
333
|
+
const cols = Math.min(maxCols, TRANSCRIPT_IMAGE_MAX_COLS);
|
|
334
|
+
return {
|
|
335
|
+
caption: `[image] ${label} · ${thumbnail.width}×${thumbnail.height}`,
|
|
336
|
+
rows: imageMode === 'kitty' && thumbnail.graphic && cols >= 1
|
|
337
|
+
? kittyPlacementRows(thumbnail, cols, TRANSCRIPT_IMAGE_MAX_ROWS)
|
|
338
|
+
: imageToTerminalRows(thumbnail.image, cols, TRANSCRIPT_IMAGE_MAX_ROWS),
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Kitty's row and column diacritics (rowcolumn-diacritics.txt in the Kitty
|
|
343
|
+
* repository): entry n marks row or column n of a placeholder cell.
|
|
344
|
+
*/
|
|
345
|
+
const PLACEHOLDER_DIACRITICS = [
|
|
346
|
+
0x0305, 0x030D, 0x030E, 0x0310, 0x0312, 0x033D, 0x033E, 0x033F, 0x0346, 0x034A, 0x034B, 0x034C,
|
|
347
|
+
0x0350, 0x0351, 0x0352, 0x0357, 0x035B, 0x0363, 0x0364, 0x0365, 0x0366, 0x0367, 0x0368, 0x0369,
|
|
348
|
+
0x036A, 0x036B, 0x036C, 0x036D, 0x036E, 0x036F, 0x0483, 0x0484, 0x0485, 0x0486, 0x0487, 0x0592,
|
|
349
|
+
0x0593, 0x0594, 0x0595, 0x0597, 0x0598, 0x0599, 0x059C, 0x059D, 0x059E, 0x059F, 0x05A0, 0x05A1,
|
|
350
|
+
0x05A8, 0x05A9, 0x05AB, 0x05AC, 0x05AF, 0x05C4, 0x0610, 0x0611, 0x0612, 0x0613, 0x0614, 0x0615,
|
|
351
|
+
0x0616, 0x0617, 0x0657, 0x0658, 0x0659, 0x065A, 0x065B, 0x065D, 0x065E, 0x06D6, 0x06D7, 0x06D8,
|
|
352
|
+
0x06D9, 0x06DA, 0x06DB, 0x06DC, 0x06DF, 0x06E0, 0x06E1, 0x06E2, 0x06E4, 0x06E7, 0x06E8, 0x06EB,
|
|
353
|
+
0x06EC, 0x0730, 0x0732, 0x0733, 0x0735, 0x0736, 0x073A, 0x073D, 0x073F, 0x0740, 0x0741, 0x0743,
|
|
354
|
+
0x0745, 0x0747, 0x0749, 0x074A, 0x07EB, 0x07EC, 0x07ED, 0x07EE, 0x07EF, 0x07F0, 0x07F1, 0x07F3,
|
|
355
|
+
0x0816, 0x0817, 0x0818, 0x0819, 0x081B, 0x081C, 0x081D, 0x081E, 0x081F, 0x0820, 0x0821, 0x0822,
|
|
356
|
+
0x0823, 0x0825, 0x0826, 0x0827, 0x0829, 0x082A, 0x082B, 0x082C, 0x082D, 0x0951, 0x0953, 0x0954,
|
|
357
|
+
0x0F82, 0x0F83, 0x0F86, 0x0F87, 0x135D, 0x135E, 0x135F, 0x17DD, 0x193A, 0x1A17, 0x1A75, 0x1A76,
|
|
358
|
+
0x1A77, 0x1A78, 0x1A79, 0x1A7A, 0x1A7B, 0x1A7C, 0x1B6B, 0x1B6D, 0x1B6E, 0x1B6F, 0x1B70, 0x1B71,
|
|
359
|
+
0x1B72, 0x1B73, 0x1CD0, 0x1CD1, 0x1CD2, 0x1CDA, 0x1CDB, 0x1CE0, 0x1DC0, 0x1DC1, 0x1DC3, 0x1DC4,
|
|
360
|
+
0x1DC5, 0x1DC6, 0x1DC7, 0x1DC8, 0x1DC9, 0x1DCB, 0x1DCC, 0x1DD1, 0x1DD2, 0x1DD3, 0x1DD4, 0x1DD5,
|
|
361
|
+
0x1DD6, 0x1DD7, 0x1DD8, 0x1DD9, 0x1DDA, 0x1DDB, 0x1DDC, 0x1DDD, 0x1DDE, 0x1DDF, 0x1DE0, 0x1DE1,
|
|
362
|
+
0x1DE2, 0x1DE3, 0x1DE4, 0x1DE5, 0x1DE6, 0x1DFE, 0x20D0, 0x20D1, 0x20D4, 0x20D5, 0x20D6, 0x20D7,
|
|
363
|
+
0x20DB, 0x20DC, 0x20E1, 0x20E7, 0x20E9, 0x20F0, 0x2CEF, 0x2CF0, 0x2CF1, 0x2DE0, 0x2DE1, 0x2DE2,
|
|
364
|
+
0x2DE3, 0x2DE4, 0x2DE5, 0x2DE6, 0x2DE7, 0x2DE8, 0x2DE9, 0x2DEA, 0x2DEB, 0x2DEC, 0x2DED, 0x2DEE,
|
|
365
|
+
0x2DEF, 0x2DF0, 0x2DF1, 0x2DF2, 0x2DF3, 0x2DF4, 0x2DF5, 0x2DF6, 0x2DF7, 0x2DF8, 0x2DF9, 0x2DFA,
|
|
366
|
+
0x2DFB, 0x2DFC, 0x2DFD, 0x2DFE, 0x2DFF, 0xA66F, 0xA67C, 0xA67D, 0xA6F0, 0xA6F1, 0xA8E0, 0xA8E1,
|
|
367
|
+
0xA8E2, 0xA8E3, 0xA8E4, 0xA8E5, 0xA8E6, 0xA8E7, 0xA8E8, 0xA8E9, 0xA8EA, 0xA8EB, 0xA8EC, 0xA8ED,
|
|
368
|
+
0xA8EE, 0xA8EF, 0xA8F0, 0xA8F1, 0xAAB0, 0xAAB2, 0xAAB3, 0xAAB7, 0xAAB8, 0xAABE, 0xAABF, 0xAAC1,
|
|
369
|
+
0xFE20, 0xFE21, 0xFE22, 0xFE23, 0xFE24, 0xFE25, 0xFE26, 0x10A0F, 0x10A38, 0x1D185, 0x1D186, 0x1D187,
|
|
370
|
+
0x1D188, 0x1D189, 0x1D1AA, 0x1D1AB, 0x1D1AC, 0x1D1AD, 0x1D242, 0x1D243, 0x1D244,
|
|
371
|
+
].map(code => String.fromCodePoint(code));
|
|
372
|
+
const PLACEHOLDER = '\u{10EEEE}';
|
|
373
|
+
/** A placeholder run's colour, which names its image. */
|
|
374
|
+
const PLACEMENT_COLOUR = /\x1b\[38;2;(\d+);(\d+);(\d+)m\u{10EEEE}/gu;
|
|
375
|
+
/** Placements drawn recently, by image id, so their uploads can be built from the rows that use them. */
|
|
376
|
+
const placements = new Map();
|
|
377
|
+
/**
|
|
378
|
+
* Rows of placeholder cells for `thumbnail`: at one image pixel per screen
|
|
379
|
+
* pixel when that fits, otherwise scaled down into the box, keeping its shape.
|
|
380
|
+
* Each size of each image is its own placement, with an id derived from both,
|
|
381
|
+
* so the same image at the same width keeps its id across redraws.
|
|
382
|
+
*/
|
|
383
|
+
function kittyPlacementRows(thumbnail, maxCols, maxRows) {
|
|
384
|
+
const boxCols = Math.min(maxCols, PLACEHOLDER_DIACRITICS.length);
|
|
385
|
+
const boxRows = Math.min(maxRows, PLACEHOLDER_DIACRITICS.length);
|
|
386
|
+
const scale = Math.min(1, boxCols * cellPixels.width / thumbnail.width, boxRows * cellPixels.height / thumbnail.height);
|
|
387
|
+
const cols = Math.max(1, Math.min(boxCols, Math.round(thumbnail.width * scale / cellPixels.width)));
|
|
388
|
+
const rows = Math.max(1, Math.min(boxRows, Math.round(thumbnail.height * scale / cellPixels.height)));
|
|
389
|
+
const id = createHash('sha256').update(`${thumbnail.key}|${cols}x${rows}`).digest().readUIntBE(0, 3) || 1;
|
|
390
|
+
placements.delete(id);
|
|
391
|
+
placements.set(id, { key: thumbnail.key, cols, rows });
|
|
392
|
+
while (placements.size > MAX_PLACEMENTS) {
|
|
393
|
+
const oldest = placements.keys().next();
|
|
394
|
+
if (oldest.done)
|
|
395
|
+
break;
|
|
396
|
+
placements.delete(oldest.value);
|
|
397
|
+
}
|
|
398
|
+
const colour = `\x1b[38;2;${(id >> 16) & 255};${(id >> 8) & 255};${id & 255}m`;
|
|
399
|
+
return Array.from({ length: rows }, (_, row) => {
|
|
400
|
+
let text = colour;
|
|
401
|
+
for (let column = 0; column < cols; column++) {
|
|
402
|
+
text += PLACEHOLDER + PLACEHOLDER_DIACRITICS[row] + PLACEHOLDER_DIACRITICS[column];
|
|
403
|
+
}
|
|
404
|
+
return `${text}\x1b[0m`;
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Which images the terminal still needs before transcript rows that place
|
|
409
|
+
* them are written. A Kitty terminal keeps an uploaded image until it is
|
|
410
|
+
* deleted, through screen and history clears, so each is sent once per
|
|
411
|
+
* renderer.
|
|
412
|
+
*/
|
|
413
|
+
export class KittyImageUploads {
|
|
414
|
+
sent = new Set();
|
|
415
|
+
/** Forget what the terminal holds; every image is sent again when next placed. */
|
|
416
|
+
reset() {
|
|
417
|
+
this.sent.clear();
|
|
418
|
+
}
|
|
419
|
+
/** The images `texts` place that the terminal has not been sent, in order, now counted as sent. */
|
|
420
|
+
pending(texts) {
|
|
421
|
+
const uploads = [];
|
|
422
|
+
for (const text of texts) {
|
|
423
|
+
if (!text.includes(PLACEHOLDER))
|
|
424
|
+
continue;
|
|
425
|
+
for (const match of text.matchAll(PLACEMENT_COLOUR)) {
|
|
426
|
+
const id = (Number(match[1]) << 16) | (Number(match[2]) << 8) | Number(match[3]);
|
|
427
|
+
if (this.sent.has(id))
|
|
428
|
+
continue;
|
|
429
|
+
const placement = placements.get(id);
|
|
430
|
+
const graphic = placement ? recall(placement.key)?.graphic : undefined;
|
|
431
|
+
// An image no longer held leaves its cells blank rather than failing the transcript.
|
|
432
|
+
if (!placement || !graphic)
|
|
433
|
+
continue;
|
|
434
|
+
this.sent.add(id);
|
|
435
|
+
uploads.push({ id, cols: placement.cols, rows: placement.rows, width: graphic.width, height: graphic.height, data: graphic.data });
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
return uploads;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
/** Previews of a user message's image attachments. */
|
|
442
|
+
export function attachmentImagePreviews(attachments, maxCols) {
|
|
443
|
+
if (!Array.isArray(attachments))
|
|
444
|
+
return [];
|
|
445
|
+
return attachments
|
|
446
|
+
.filter(attachment => attachment?.kind === 'image')
|
|
447
|
+
.map(attachment => preview(attachmentLabel(attachment), attachmentThumbnail(attachment), maxCols));
|
|
448
|
+
}
|
|
449
|
+
function attachmentLabel(attachment) {
|
|
450
|
+
const name = typeof attachment.name === 'string' && attachment.name ? attachment.name
|
|
451
|
+
: attachment.localPath ? basename(attachment.localPath) : 'image';
|
|
452
|
+
return name.replace(/[\u0000-\u001f\u007f]/g, ' ');
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* `[image PATH]`: the composer's token for a path-only image badge, which is
|
|
456
|
+
* how a clipboard paste is sent. The request encoder turns the same token into
|
|
457
|
+
* an image block, so whatever the model is shown, the transcript draws.
|
|
458
|
+
*/
|
|
459
|
+
const IMAGE_TOKEN = /\[image ([^\]]+)\]/g;
|
|
460
|
+
const WHOLE_LINE_IMAGE_TOKEN = /^\[image ([^\]]+)\]$/;
|
|
461
|
+
/**
|
|
462
|
+
* Split a user message's image tokens from its text. A token on a line of its
|
|
463
|
+
* own (as the composer writes a pasted image) is removed; one inside a sentence
|
|
464
|
+
* is shortened to the file name so the sentence still reads. Paths are returned
|
|
465
|
+
* in order of appearance.
|
|
466
|
+
*/
|
|
467
|
+
export function extractImageTokens(content) {
|
|
468
|
+
const paths = [];
|
|
469
|
+
const lines = [];
|
|
470
|
+
for (const line of content.split('\n')) {
|
|
471
|
+
const whole = WHOLE_LINE_IMAGE_TOKEN.exec(line.trim());
|
|
472
|
+
if (whole) {
|
|
473
|
+
paths.push(whole[1].trim());
|
|
474
|
+
continue;
|
|
475
|
+
}
|
|
476
|
+
lines.push(line.replace(IMAGE_TOKEN, (_token, path) => {
|
|
477
|
+
paths.push(path.trim());
|
|
478
|
+
return `[image ${basename(path.trim())}]`;
|
|
479
|
+
}));
|
|
480
|
+
}
|
|
481
|
+
if (paths.length === 0)
|
|
482
|
+
return { text: content, paths };
|
|
483
|
+
return { text: lines.join('\n').replace(/^\n+|\n+$/g, ''), paths };
|
|
484
|
+
}
|
|
485
|
+
/** Previews of image files named by `[image PATH]` tokens. */
|
|
486
|
+
export function imagePathPreviews(paths, maxCols) {
|
|
487
|
+
return paths.map(path => preview(basename(path).replace(/[\u0000-\u001f\u007f]/g, ' '), fileThumbnail(path), maxCols));
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Previews of a tool message's images. `images` comes from persisted message
|
|
491
|
+
* metadata, so anything that is not a well-formed reference is skipped.
|
|
492
|
+
*/
|
|
493
|
+
export function toolImagePreviews(images, maxCols) {
|
|
494
|
+
if (!Array.isArray(images))
|
|
495
|
+
return [];
|
|
496
|
+
const previews = [];
|
|
497
|
+
for (const image of images) {
|
|
498
|
+
if (!image || typeof image !== 'object')
|
|
499
|
+
continue;
|
|
500
|
+
const { label, path, ref } = image;
|
|
501
|
+
if (typeof label !== 'string')
|
|
502
|
+
continue;
|
|
503
|
+
const clean = label.replace(/[\u0000-\u001f\u007f]/g, ' ');
|
|
504
|
+
const held = typeof ref === 'string' ? recall(`inline:${ref}`) ?? null : null;
|
|
505
|
+
if (held) {
|
|
506
|
+
previews.push(preview(clean, held, maxCols));
|
|
507
|
+
}
|
|
508
|
+
else if (typeof path === 'string' && path) {
|
|
509
|
+
previews.push(preview(clean, fileThumbnail(path), maxCols));
|
|
510
|
+
}
|
|
511
|
+
else if (typeof ref === 'string') {
|
|
512
|
+
previews.push(preview(clean, null, maxCols));
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
return previews;
|
|
516
|
+
}
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
*
|
|
12
12
|
* This cache keys each rendered message by the inputs that change its
|
|
13
13
|
* rendering: content, timestamp, role, the render-relevant metadata flags
|
|
14
|
-
* (`reasoning`, `recap`, `toolOutput` identity),
|
|
15
|
-
* layout config key (columns + thinking
|
|
16
|
-
* message object —
|
|
17
|
-
* by the renderer and must not invalidate it.
|
|
14
|
+
* (`reasoning`, `recap`, `toolOutput` identity), image attachments (drawn as
|
|
15
|
+
* previews), streaming state, and the layout config key (columns + thinking
|
|
16
|
+
* visibility). Everything else about the message object — widget data,
|
|
17
|
+
* unrelated metadata — is not read by the renderer and must not invalidate it.
|
|
18
18
|
*
|
|
19
19
|
* Entries are bounded by a total rendered-line budget; the oldest entries are
|
|
20
20
|
* dropped first. A dropped message simply re-renders on its next rebuild.
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
*
|
|
12
12
|
* This cache keys each rendered message by the inputs that change its
|
|
13
13
|
* rendering: content, timestamp, role, the render-relevant metadata flags
|
|
14
|
-
* (`reasoning`, `recap`, `toolOutput` identity),
|
|
15
|
-
* layout config key (columns + thinking
|
|
16
|
-
* message object —
|
|
17
|
-
* by the renderer and must not invalidate it.
|
|
14
|
+
* (`reasoning`, `recap`, `toolOutput` identity), image attachments (drawn as
|
|
15
|
+
* previews), streaming state, and the layout config key (columns + thinking
|
|
16
|
+
* visibility). Everything else about the message object — widget data,
|
|
17
|
+
* unrelated metadata — is not read by the renderer and must not invalidate it.
|
|
18
18
|
*
|
|
19
19
|
* Entries are bounded by a total rendered-line budget; the oldest entries are
|
|
20
20
|
* dropped first. A dropped message simply re-renders on its next rebuild.
|
|
@@ -80,6 +80,7 @@ export class TranscriptRenderCache {
|
|
|
80
80
|
timestampMs: message.timestamp instanceof Date ? message.timestamp.getTime() : -1,
|
|
81
81
|
timestampRef: message.timestamp,
|
|
82
82
|
toolOutput: toolOutputIdentity(message),
|
|
83
|
+
attachments: message.attachments,
|
|
83
84
|
};
|
|
84
85
|
const replaced = this.entries.get(message.id);
|
|
85
86
|
if (replaced !== undefined)
|
|
@@ -106,6 +107,8 @@ export class TranscriptRenderCache {
|
|
|
106
107
|
return false;
|
|
107
108
|
if (entry.toolOutput !== toolOutputIdentity(message))
|
|
108
109
|
return false;
|
|
110
|
+
if (entry.attachments !== message.attachments)
|
|
111
|
+
return false;
|
|
109
112
|
if (entry.turnKey !== turnRenderKey(message))
|
|
110
113
|
return false;
|
|
111
114
|
if (entry.timestampRef !== message.timestamp) {
|
package/dist/ui/views/app.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ interface AppViewProps {
|
|
|
12
12
|
messages: Message[];
|
|
13
13
|
agentState: AgentState;
|
|
14
14
|
inputState: InputState;
|
|
15
|
-
canYank?: boolean;
|
|
16
15
|
sessionId: string;
|
|
17
16
|
/** User-set session name (`/rename` or `--name`); shown as a left-side status badge. */
|
|
18
17
|
sessionName?: string;
|
|
@@ -48,6 +47,8 @@ interface AppViewProps {
|
|
|
48
47
|
/** Structured widget view for surfaces that need real terminal styling. */
|
|
49
48
|
widgetView?: LayoutNode | null;
|
|
50
49
|
compactWidget?: boolean;
|
|
50
|
+
/** Rows the transcript holds, when known: a compact widget follows them (see AppLayoutMetricsProps). */
|
|
51
|
+
transcriptRows?: number;
|
|
51
52
|
isRecording?: boolean;
|
|
52
53
|
recordingDevice?: string | null;
|
|
53
54
|
audioLevel?: number;
|
|
@@ -79,6 +80,8 @@ interface AppViewProps {
|
|
|
79
80
|
* Ink-rendered message list.
|
|
80
81
|
*/
|
|
81
82
|
externalTranscript?: boolean;
|
|
83
|
+
/** Where a short conversation sits in ZTC's own frame (see buildMessageListView). */
|
|
84
|
+
transcriptAnchor?: 'top' | 'bottom';
|
|
82
85
|
agentActive?: boolean;
|
|
83
86
|
}
|
|
84
87
|
interface AppLayoutMetricsProps {
|
|
@@ -95,10 +98,11 @@ interface AppLayoutMetricsProps {
|
|
|
95
98
|
externalTranscript?: boolean;
|
|
96
99
|
compactWidget?: boolean;
|
|
97
100
|
widgetContentRows?: number;
|
|
101
|
+
transcriptRows?: number;
|
|
98
102
|
agentActive?: boolean;
|
|
99
103
|
statusLine?: StatusLineSettings;
|
|
100
104
|
}
|
|
101
|
-
export declare function getAppLayoutMetrics({ rows, cols, inputState, commands, completion, showHeader, showTodos, todoCount, widgetActive, queueTotal, externalTranscript, compactWidget, widgetContentRows, agentActive, statusLine, }: AppLayoutMetricsProps): {
|
|
105
|
+
export declare function getAppLayoutMetrics({ rows, cols, inputState, commands, completion, showHeader, showTodos, todoCount, widgetActive, queueTotal, externalTranscript, compactWidget, widgetContentRows, transcriptRows, agentActive, statusLine, }: AppLayoutMetricsProps): {
|
|
102
106
|
contentAreaY: number;
|
|
103
107
|
contentAreaHeight: number;
|
|
104
108
|
chromeHeight: number;
|
|
@@ -109,5 +113,5 @@ export declare function getAppLayoutMetrics({ rows, cols, inputState, commands,
|
|
|
109
113
|
widgetHeight: number;
|
|
110
114
|
transcriptHeight: number;
|
|
111
115
|
};
|
|
112
|
-
export declare function buildAppView({ messages, agentState, inputState,
|
|
116
|
+
export declare function buildAppView({ messages, agentState, inputState, sessionId, sessionName, cols, rows, commands, completion, hasApiKey, version, contextLength, contextEstimated, contextStatus, provider, model, emulationId, inputMode, escapeHint, toast, spinnerLabel, spinnerFrame, lastEventAt, stallHintMs, debug, expandToolOutputs, showThinking, showTurnMetadata, renderer, showHeader, showMessages, isRecording, recordingDevice, audioLevel, partialTranscript, todos, showTodos, activeTask, taskStartedAt, mode, authEmail, authWorkspace, backgroundRunning, widgetContent, widgetView: providedWidgetView, queuePreview, queueTotal, queueSelectedIndex, externalTranscript, transcriptAnchor, compactWidget, transcriptRows, agentActive, statusLine, effort, unsupportedEffort, }: AppViewProps): LayoutNode;
|
|
113
117
|
export {};
|