@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
package/dist/headless.js
CHANGED
|
@@ -24,6 +24,7 @@ import { projectGoal } from './goal_contract.js';
|
|
|
24
24
|
*/
|
|
25
25
|
import { randomUUID } from 'node:crypto';
|
|
26
26
|
import { writeFile } from 'fs/promises';
|
|
27
|
+
import { existsSync, truncateSync } from 'node:fs';
|
|
27
28
|
import { configStore } from './config.js';
|
|
28
29
|
import { formatTaskHandoffContext, projectTaskHandoff } from './session_handoff_contract.js';
|
|
29
30
|
import { RouterConfigurationError } from './router_auth.js';
|
|
@@ -32,9 +33,11 @@ import { ContextOverflowError, isContextOverflowMessage } from './agent/agent.js
|
|
|
32
33
|
import { dumpContextOverflow } from './agent/contextDump.js';
|
|
33
34
|
import { registerToolCallbacks } from './app/tool_callbacks.js';
|
|
34
35
|
import { createAgentWithConfig } from './app/agent_runner.js';
|
|
36
|
+
import { awaitStartupGitSnapshot, prefetchStartupGitSnapshot } from './runtime_info.js';
|
|
35
37
|
import { mergeToolCheckpointMessages } from './agent/runtime/tool_checkpoints.js';
|
|
36
38
|
import { clearWorkerExecutor } from './worker/index.js';
|
|
37
39
|
import { commands, refreshPluginCommands } from './agent/commands/index.js';
|
|
40
|
+
import { isCommandRefusal, refusalEvent } from './agent/commands/command_refusal.js';
|
|
38
41
|
import { goalManager, goalPinTask, detectGoalCompletion, detectGoalBlocked, goalBlockedReason, goalFinalNote, turnProducedText, turnToolOutcomes, shouldAccountFinalTurn, snapshotGoalForTurn } from './agent/commands/goal.js';
|
|
39
42
|
import { createModeContext } from './agent/commands/mode_commands.js';
|
|
40
43
|
import { allocatePlanArtifact, findPlanContent, readPlanArtifactSafely, } from './agent/commands/plan.js';
|
|
@@ -50,12 +53,17 @@ import { rename as renameFile } from 'fs/promises';
|
|
|
50
53
|
import { buildModelsController, buildSkillsController, buildShellController, buildStubShellController, buildAutoSelectWidgets, routeUserInput, getPlanModeCommandDenial } from './app/command_context.js';
|
|
51
54
|
import { isToolAllowed } from './app/modes.js';
|
|
52
55
|
import { SessionManager } from './app/session_manager.js';
|
|
56
|
+
import { interruptedTurnMarker } from './app/session_messages.js';
|
|
53
57
|
import { LocalWorkspaceCoordinator } from './workspace_collision.js';
|
|
54
58
|
import { HeadlessPaneManager } from './ui/ratatui/headless_pane_manager.js';
|
|
59
|
+
import { modelHandoffSummarizer } from './utils/compaction.js';
|
|
55
60
|
import { setPaneToolsTuiProcess, clearPaneToolsTuiProcess, setBusTransport, clearBusTransport, getBackgroundRegistry, clearBackgroundRegistry, resetAskUserTurnFlag, setTodoUpdateCallback } from './agent/tools/index.js';
|
|
56
61
|
import { PaneRelayServer, generateRelaySocketPath } from './ui/ratatui/pane_relay.js';
|
|
57
62
|
import { writePaneResponseSync } from './utils/pane_response.js';
|
|
58
63
|
import { terminateActiveShellChildren } from './utils/shell.js';
|
|
64
|
+
import { reserveModelRouteCredentials } from './utils/subprocess_env.js';
|
|
65
|
+
import { OutputSchemaContract, OutputSchemaError } from './headless_output_schema.js';
|
|
66
|
+
import { TrajectoryJsonlWriter, TrajectoryUnavailableError } from './headless_trajectory.js';
|
|
59
67
|
// The simulation subsystem (world state, runner, and their zod/nunjucks/graph
|
|
60
68
|
// dependency trees) is loaded lazily: most headless runs never start a
|
|
61
69
|
// simulation, and the import is only needed at end-of-run checks.
|
|
@@ -68,6 +76,10 @@ import { HookLifecycle } from './hooks/lifecycle.js';
|
|
|
68
76
|
import { runtimePluginRegistry } from './plugin/runtime_registry.js';
|
|
69
77
|
import { getWorkflowRegistry } from './workflows/registry_handle.js';
|
|
70
78
|
import { workflowsEnabled, workflowNaturalLanguageTriggerEnabled } from './workflows/config.js';
|
|
79
|
+
/** Exit status when the only failure was a final message that never satisfied --output-schema. */
|
|
80
|
+
export const HEADLESS_EXIT_OUTPUT_SCHEMA = 3;
|
|
81
|
+
/** Exit status for an unusable --output-schema or --trajectory-jsonl, before any inference. */
|
|
82
|
+
export const HEADLESS_EXIT_USAGE = 2;
|
|
71
83
|
export function classifyPaneChildLine(line) {
|
|
72
84
|
const trimmed = line.trim();
|
|
73
85
|
// A control command is ONLY a BARE {"__ztc_cmd":...} line — the parent's
|
|
@@ -348,6 +360,7 @@ export class HeadlessApp {
|
|
|
348
360
|
sessionManager;
|
|
349
361
|
workspaceCoordinator = null;
|
|
350
362
|
taskHandoff = null;
|
|
363
|
+
loadedHostScaffold;
|
|
351
364
|
restoredHandoffCorrections = [];
|
|
352
365
|
paneManager = null;
|
|
353
366
|
askUserAutoAnswered = false;
|
|
@@ -367,6 +380,13 @@ export class HeadlessApp {
|
|
|
367
380
|
batchEventUnsub = null;
|
|
368
381
|
batchFailed = false;
|
|
369
382
|
hadHeadlessError = false;
|
|
383
|
+
fatalTurnReached = false;
|
|
384
|
+
outputSchema;
|
|
385
|
+
trajectory;
|
|
386
|
+
/** Prompts whose final message never satisfied --output-schema. */
|
|
387
|
+
outputSchemaFailures = 0;
|
|
388
|
+
/** 1-based index of the agent prompt in flight; groups trajectory records. */
|
|
389
|
+
promptTurn = 0;
|
|
370
390
|
/**
|
|
371
391
|
* The AbortController of the agent turn currently in flight, or null between
|
|
372
392
|
* turns. A pane child's SIGUSR2 handler (and the post-turn `cancel` stdin
|
|
@@ -397,7 +417,9 @@ export class HeadlessApp {
|
|
|
397
417
|
lastEmittedVerb = null;
|
|
398
418
|
lastEmittedWaiting = null;
|
|
399
419
|
hookLifecycle;
|
|
400
|
-
constructor(options) {
|
|
420
|
+
constructor(options, sinks = {}) {
|
|
421
|
+
this.outputSchema = sinks.outputSchema ?? null;
|
|
422
|
+
this.trajectory = sinks.trajectory ?? null;
|
|
401
423
|
this.options = {
|
|
402
424
|
autoAccept: true, // Default to auto-accept in headless mode
|
|
403
425
|
// No default iteration cap: a user-level headless agent runs until the
|
|
@@ -432,11 +454,13 @@ export class HeadlessApp {
|
|
|
432
454
|
// /context), not the char/4 estimate. 0 before the first turn -> estimate.
|
|
433
455
|
getContextTokens: () => this.lastContextTokens,
|
|
434
456
|
getContextWindow: () => this.lastContextWindow,
|
|
457
|
+
getHandoffSummarizer: (signal, messages) => this.buildHandoffSummarizer(signal, messages),
|
|
435
458
|
// Persist the active safety/runtime identity alongside the conversation.
|
|
436
459
|
// Without mode + artifact, a resumed headless plan silently becomes a
|
|
437
460
|
// normal full-tool agent even though its transcript says it is planning.
|
|
438
461
|
getRuntimeState: () => ({
|
|
439
462
|
environment: this.environmentRecord ? { id: this.environmentRecord.id, name: this.environmentRecord.name } : null,
|
|
463
|
+
hostScaffold: this.agent?.hostScaffoldMessages(),
|
|
440
464
|
evidence: this.agent?.getEvidenceSnapshot(),
|
|
441
465
|
usage: this.agent?.getUsageSessionId() === this.sessionId ? this.agent.getUsageSnapshot() : undefined,
|
|
442
466
|
diagnostics: this.agent?.getDiagnosticSessionId() === this.sessionId
|
|
@@ -478,6 +502,23 @@ export class HeadlessApp {
|
|
|
478
502
|
getApprovalRequester: () => (request) => this.requestHookApproval(request),
|
|
479
503
|
});
|
|
480
504
|
}
|
|
505
|
+
buildHandoffSummarizer(signal, messages) {
|
|
506
|
+
const agent = this.agent;
|
|
507
|
+
if (!agent)
|
|
508
|
+
return undefined;
|
|
509
|
+
const context = agent.getHandoffContext(messages ?? this.messages);
|
|
510
|
+
return modelHandoffSummarizer(context.backend, context.model, {
|
|
511
|
+
request: context,
|
|
512
|
+
signal,
|
|
513
|
+
onFallback: reason => {
|
|
514
|
+
if (!signal?.aborted)
|
|
515
|
+
this.output({ type: 'status', timestamp: new Date().toISOString(),
|
|
516
|
+
data: { status: 'compaction_fallback', message: `Model handoff failed: ${reason}. Using a local summary.` } });
|
|
517
|
+
},
|
|
518
|
+
system: context.system,
|
|
519
|
+
tools: context.tools,
|
|
520
|
+
});
|
|
521
|
+
}
|
|
481
522
|
outputPromptComplete() {
|
|
482
523
|
this.output({
|
|
483
524
|
type: 'complete',
|
|
@@ -664,8 +705,18 @@ export class HeadlessApp {
|
|
|
664
705
|
});
|
|
665
706
|
}
|
|
666
707
|
break;
|
|
708
|
+
case 'stream_reset':
|
|
709
|
+
if (this.options.json) {
|
|
710
|
+
this.output({
|
|
711
|
+
type: 'stream_reset',
|
|
712
|
+
timestamp: new Date().toISOString(),
|
|
713
|
+
data: {},
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
break;
|
|
667
717
|
case 'tool_start':
|
|
668
718
|
this.emitHeadlessStatus();
|
|
719
|
+
this.recordTrajectory({ type: 'tool_call', tool: event.tool, toolCallId: event.toolCallId, args: event.args });
|
|
669
720
|
this.output({
|
|
670
721
|
type: 'tool_call',
|
|
671
722
|
timestamp: new Date().toISOString(),
|
|
@@ -676,6 +727,8 @@ export class HeadlessApp {
|
|
|
676
727
|
if (event.tool === 'write_file') {
|
|
677
728
|
this.hookLifecycle.onToolWrite();
|
|
678
729
|
}
|
|
730
|
+
this.recordTrajectory({ type: 'tool_result', tool: event.tool, toolCallId: event.toolCallId, success: true,
|
|
731
|
+
result: event.result });
|
|
679
732
|
// success:true so a mirror child pane resolves the chip as ✓ (matches
|
|
680
733
|
// the overseer's publishToolResult(tool, result, true)); without it the
|
|
681
734
|
// reducer reads undefined and paints every chip ✗.
|
|
@@ -700,6 +753,8 @@ export class HeadlessApp {
|
|
|
700
753
|
// Resolve the chip FIRST — a tool_result with success:false — so it
|
|
701
754
|
// flips to ✗ instead of hanging on "..."; then the human-facing error
|
|
702
755
|
// line (kept for --json consumers / logs) renders after.
|
|
756
|
+
this.recordTrajectory({ type: 'tool_result', tool: event.tool, toolCallId: event.toolCallId, success: false,
|
|
757
|
+
result: `Error: ${event.error}` });
|
|
703
758
|
this.output({
|
|
704
759
|
type: 'tool_result',
|
|
705
760
|
timestamp: new Date().toISOString(),
|
|
@@ -1103,6 +1158,9 @@ export class HeadlessApp {
|
|
|
1103
1158
|
* Initialize the app
|
|
1104
1159
|
*/
|
|
1105
1160
|
async init() {
|
|
1161
|
+
// Scan git in the background while startup loads config, plugins and
|
|
1162
|
+
// modes; the agent's runtime-context prompt reads the result below.
|
|
1163
|
+
prefetchStartupGitSnapshot(this.shellCwd);
|
|
1106
1164
|
// Load the persisted profile before reading any credential signal.
|
|
1107
1165
|
// `runHeadless` is a public entry point, so it cannot assume its caller ran
|
|
1108
1166
|
// the CLI loader (headless_cli.ts does; direct library callers may not).
|
|
@@ -1110,9 +1168,12 @@ export class HeadlessApp {
|
|
|
1110
1168
|
// whose real credential (for example a Codex subscription auth.json) is on
|
|
1111
1169
|
// disk. `load()` is idempotent, so the CLI path is unaffected.
|
|
1112
1170
|
await configStore.load();
|
|
1171
|
+
// A headless run executes model-chosen commands with no human reviewing
|
|
1172
|
+
// them, so tool children never inherit the run's inference credentials.
|
|
1173
|
+
this.reserveRouteCredentials();
|
|
1113
1174
|
// Hosted native Messages supplies its own scoped transport bearer. The
|
|
1114
1175
|
// backend factory validates it; provider-key discovery must not gate it.
|
|
1115
|
-
if (!configStore.get().nativeAnthropicMessagesRouter && !configStore.hasApiKey() && !configStore.isAuthenticated()) {
|
|
1176
|
+
if (configStore.getProvider() !== 'bedrock' && !configStore.get().nativeAnthropicMessagesRouter && !configStore.hasApiKey() && !configStore.isAuthenticated()) {
|
|
1116
1177
|
this.output({
|
|
1117
1178
|
type: 'error',
|
|
1118
1179
|
timestamp: new Date().toISOString(),
|
|
@@ -1424,6 +1485,7 @@ export class HeadlessApp {
|
|
|
1424
1485
|
}
|
|
1425
1486
|
catch { /* Offline startup keeps the account-scoped cached catalog. */ }
|
|
1426
1487
|
// Create agent
|
|
1488
|
+
await awaitStartupGitSnapshot(this.shellCwd);
|
|
1427
1489
|
this.agent = this.createAgent();
|
|
1428
1490
|
if (!this.agent) {
|
|
1429
1491
|
this.output({
|
|
@@ -1577,7 +1639,12 @@ export class HeadlessApp {
|
|
|
1577
1639
|
* Create the agent
|
|
1578
1640
|
*/
|
|
1579
1641
|
commandJobsUnsubscribe;
|
|
1642
|
+
/** Reservation is additive and idempotent; profile reloads may name a new apiKeyEnv. */
|
|
1643
|
+
reserveRouteCredentials() {
|
|
1644
|
+
reserveModelRouteCredentials(configStore.get().apiKeyEnv ?? {});
|
|
1645
|
+
}
|
|
1580
1646
|
createAgent(options = {}) {
|
|
1647
|
+
this.reserveRouteCredentials();
|
|
1581
1648
|
const diagnostics = this.sessionManager.getDiagnostics();
|
|
1582
1649
|
this.sessionManager.recordHostDiagnostic('runtime', {
|
|
1583
1650
|
renderer: 'headless', rendererVersion: null, nativeCapabilities: null, source: 'host_launch',
|
|
@@ -1598,6 +1665,7 @@ export class HeadlessApp {
|
|
|
1598
1665
|
environmentContext: this.environmentRecord ? describeEnvironmentForAgent(this.environmentRecord) : undefined,
|
|
1599
1666
|
autoContinue: true, // Always auto-continue in headless mode
|
|
1600
1667
|
maxConsecutiveAutoContinues: configStore.getMaxConsecutiveAutoContinues(),
|
|
1668
|
+
completionCheck: true,
|
|
1601
1669
|
maxIterations: isEvolveMode ? 200 : (this.options.maxIterations ?? Infinity),
|
|
1602
1670
|
pinTaskHeader: this.options.pinTaskHeader,
|
|
1603
1671
|
mode: this.currentMode,
|
|
@@ -1614,6 +1682,7 @@ export class HeadlessApp {
|
|
|
1614
1682
|
hookApprovalRequester: (request) => this.requestHookApproval(request),
|
|
1615
1683
|
toolResponseStore: this.sessionToolResponseStore,
|
|
1616
1684
|
onLocalFileChange: async (paths, cwd) => {
|
|
1685
|
+
this.recordTrajectory({ type: 'file_change', paths, cwd });
|
|
1617
1686
|
await this.workspaceCoordinator?.recordObservedPaths(paths, cwd);
|
|
1618
1687
|
},
|
|
1619
1688
|
toolCheckpoint: async (checkpoint) => {
|
|
@@ -1626,10 +1695,12 @@ export class HeadlessApp {
|
|
|
1626
1695
|
this.messages.splice(0, this.messages.length, ...merged);
|
|
1627
1696
|
await this.sessionManager.save({ required: true });
|
|
1628
1697
|
},
|
|
1698
|
+
onMidTurnCompact: ({ signal, messages }) => this.sessionManager.compactHistory(30, 5, signal, messages),
|
|
1629
1699
|
});
|
|
1630
1700
|
if (agent) {
|
|
1631
1701
|
agent.restoreDiagnosticSnapshot(diagnostics);
|
|
1632
1702
|
agent.restoreUsageSnapshot(this.sessionManager.getUsageSnapshot());
|
|
1703
|
+
agent.setHostScaffoldMessages(this.loadedHostScaffold);
|
|
1633
1704
|
agent.setTaskHandoff(this.taskHandoff);
|
|
1634
1705
|
this.agentBindFailure = null;
|
|
1635
1706
|
const bind = this.bindAgentStore(agent);
|
|
@@ -2141,7 +2212,7 @@ export class HeadlessApp {
|
|
|
2141
2212
|
* Run a single prompt through the agent
|
|
2142
2213
|
*/
|
|
2143
2214
|
async runPrompt(prompt, opts = {}) {
|
|
2144
|
-
if (routeUserInput(prompt).type === 'command') {
|
|
2215
|
+
if (process.env.ZTC_DISABLE_SLASH_COMMANDS !== '1' && routeUserInput(prompt).type === 'command') {
|
|
2145
2216
|
await this.runPromptAdmitted(prompt, opts);
|
|
2146
2217
|
return;
|
|
2147
2218
|
}
|
|
@@ -2157,11 +2228,13 @@ export class HeadlessApp {
|
|
|
2157
2228
|
}
|
|
2158
2229
|
async runPromptAdmitted(prompt, opts = {}) {
|
|
2159
2230
|
// Route input: slash command or regular message
|
|
2160
|
-
const route = routeUserInput(prompt);
|
|
2231
|
+
const route = process.env.ZTC_DISABLE_SLASH_COMMANDS === '1' ? { type: 'message' } : routeUserInput(prompt);
|
|
2161
2232
|
if (route.type === 'command') {
|
|
2162
2233
|
const output = await this.executeCommand(route.cmd, route.args);
|
|
2163
2234
|
await this.saveCurrentSession();
|
|
2164
|
-
if (
|
|
2235
|
+
if (isCommandRefusal(output)) {
|
|
2236
|
+
this.hadHeadlessError = true;
|
|
2237
|
+
this.output(refusalEvent(output));
|
|
2165
2238
|
this.output({
|
|
2166
2239
|
type: 'message',
|
|
2167
2240
|
timestamp: new Date().toISOString(),
|
|
@@ -2182,7 +2255,9 @@ export class HeadlessApp {
|
|
|
2182
2255
|
this.output({ type: 'error', timestamp: new Date().toISOString(), data: { message: 'Shell commands (!cmd) not supported in headless mode' } });
|
|
2183
2256
|
return;
|
|
2184
2257
|
}
|
|
2185
|
-
|
|
2258
|
+
this.promptTurn += 1;
|
|
2259
|
+
// A schema-bound prompt always takes the validated agent path below.
|
|
2260
|
+
const triggeredWorkflow = !this.outputSchema && this.workflowToolAvailableInCurrentMode()
|
|
2186
2261
|
&& workflowsEnabled(configStore.get()) && workflowNaturalLanguageTriggerEnabled(configStore.get())
|
|
2187
2262
|
? await this.buildTriggeredWorkflow(prompt)
|
|
2188
2263
|
: null;
|
|
@@ -2190,11 +2265,14 @@ export class HeadlessApp {
|
|
|
2190
2265
|
await this.runTriggeredWorkflowPrompt(prompt, triggeredWorkflow);
|
|
2191
2266
|
return;
|
|
2192
2267
|
}
|
|
2193
|
-
// Add user message
|
|
2268
|
+
// Add user message. A schema-bound prompt carries its output contract, so
|
|
2269
|
+
// the model sees the schema on the first attempt, not only on repair.
|
|
2270
|
+
if (this.outputSchema)
|
|
2271
|
+
this.clearSchemaOutputFile();
|
|
2194
2272
|
const userMsg = {
|
|
2195
2273
|
id: `msg_${randomUUID()}`,
|
|
2196
2274
|
role: 'user',
|
|
2197
|
-
content: prompt,
|
|
2275
|
+
content: this.outputSchema ? `${prompt}\n\n${this.outputSchema.promptContract()}` : prompt,
|
|
2198
2276
|
timestamp: new Date(),
|
|
2199
2277
|
};
|
|
2200
2278
|
this.messages.push(userMsg);
|
|
@@ -2225,6 +2303,8 @@ export class HeadlessApp {
|
|
|
2225
2303
|
await this.maybeAutoCompact();
|
|
2226
2304
|
let maxRetries = 2;
|
|
2227
2305
|
const maxAskUserRounds = 20;
|
|
2306
|
+
// --output-schema allows exactly one repair turn per prompt.
|
|
2307
|
+
let schemaRepairUsed = false;
|
|
2228
2308
|
let askUserRounds = 0;
|
|
2229
2309
|
let attempt = 0;
|
|
2230
2310
|
while (attempt <= maxRetries) {
|
|
@@ -2283,7 +2363,8 @@ export class HeadlessApp {
|
|
|
2283
2363
|
timestamp: new Date(),
|
|
2284
2364
|
// Reasoning models expect their trace replayed with the assistant
|
|
2285
2365
|
// message on later turns; dropping it strips the history.
|
|
2286
|
-
...(response.reasoning ? {
|
|
2366
|
+
metadata: { ...(response.reasoning ? { reasoningContent: response.reasoning } : {}),
|
|
2367
|
+
...(response.responseItems ? { openaiResponseItems: response.responseItems, openaiResponseModel: response.nativeModel ?? configStore.get().model } : {}) },
|
|
2287
2368
|
};
|
|
2288
2369
|
this.messages.push(assistantMsg);
|
|
2289
2370
|
this.lastResponse = response.content; // Track for --output
|
|
@@ -2314,8 +2395,10 @@ export class HeadlessApp {
|
|
|
2314
2395
|
await this.saveCurrentSession();
|
|
2315
2396
|
// Check if we should auto-compact after the run
|
|
2316
2397
|
await this.maybeAutoCompact();
|
|
2317
|
-
// Save to output file if specified
|
|
2318
|
-
|
|
2398
|
+
// Save to output file if specified (schema-bound output is written
|
|
2399
|
+
// only after validation, below).
|
|
2400
|
+
if (!this.outputSchema)
|
|
2401
|
+
await this.writeFinalOutputFile(this.lastResponse ?? response.content);
|
|
2319
2402
|
const selfAppliedPlanTransition = response.toolCalls.some((toolCall) => toolCall.name === 'plan_mode'
|
|
2320
2403
|
&& toolCall.status === 'complete') && this.currentMode === 'plan'
|
|
2321
2404
|
&& (this.agentBuiltForMode !== 'plan'
|
|
@@ -2347,6 +2430,25 @@ export class HeadlessApp {
|
|
|
2347
2430
|
});
|
|
2348
2431
|
continue;
|
|
2349
2432
|
}
|
|
2433
|
+
if (this.outputSchema) {
|
|
2434
|
+
const verdict = this.outputSchema.validateMessage(response.content);
|
|
2435
|
+
if (!verdict.ok && !schemaRepairUsed) {
|
|
2436
|
+
schemaRepairUsed = true;
|
|
2437
|
+
this.messages.push({
|
|
2438
|
+
id: `msg_${randomUUID()}`,
|
|
2439
|
+
role: 'user',
|
|
2440
|
+
content: this.outputSchema.repairPrompt(verdict.errors),
|
|
2441
|
+
timestamp: new Date(),
|
|
2442
|
+
});
|
|
2443
|
+
this.output({
|
|
2444
|
+
type: 'status',
|
|
2445
|
+
timestamp: new Date().toISOString(),
|
|
2446
|
+
data: { status: 'output_schema_repair', errors: verdict.errors },
|
|
2447
|
+
});
|
|
2448
|
+
continue;
|
|
2449
|
+
}
|
|
2450
|
+
await this.settleSchemaOutput(verdict, schemaRepairUsed);
|
|
2451
|
+
}
|
|
2350
2452
|
// Success - exit retry loop
|
|
2351
2453
|
break;
|
|
2352
2454
|
}
|
|
@@ -2359,6 +2461,7 @@ export class HeadlessApp {
|
|
|
2359
2461
|
if (this.runCancelledByUser) {
|
|
2360
2462
|
this.runCancelledByUser = false;
|
|
2361
2463
|
this.goalTurnCancelled = true;
|
|
2464
|
+
this.messages.push(interruptedTurnMarker());
|
|
2362
2465
|
await this.saveCurrentSession();
|
|
2363
2466
|
break;
|
|
2364
2467
|
}
|
|
@@ -2599,7 +2702,8 @@ export class HeadlessApp {
|
|
|
2599
2702
|
timestamp: new Date(),
|
|
2600
2703
|
// Reasoning models expect their trace replayed with the assistant
|
|
2601
2704
|
// message on later turns; dropping it strips the history.
|
|
2602
|
-
...(response.reasoning ? {
|
|
2705
|
+
metadata: { ...(response.reasoning ? { reasoningContent: response.reasoning } : {}),
|
|
2706
|
+
...(response.responseItems ? { openaiResponseItems: response.responseItems, openaiResponseModel: response.nativeModel ?? configStore.get().model } : {}) },
|
|
2603
2707
|
};
|
|
2604
2708
|
this.messages.push(assistantMsg);
|
|
2605
2709
|
this.lastResponse = response.content;
|
|
@@ -2657,6 +2761,7 @@ export class HeadlessApp {
|
|
|
2657
2761
|
if (this.runCancelledByUser) {
|
|
2658
2762
|
this.runCancelledByUser = false;
|
|
2659
2763
|
this.goalTurnCancelled = true;
|
|
2764
|
+
this.messages.push(interruptedTurnMarker());
|
|
2660
2765
|
await this.saveCurrentSession();
|
|
2661
2766
|
}
|
|
2662
2767
|
else {
|
|
@@ -2790,7 +2895,48 @@ export class HeadlessApp {
|
|
|
2790
2895
|
});
|
|
2791
2896
|
}
|
|
2792
2897
|
getExitCode() {
|
|
2793
|
-
|
|
2898
|
+
if (this.batchFailed || this.hadHeadlessError)
|
|
2899
|
+
return 1;
|
|
2900
|
+
return this.outputSchemaFailures > 0 ? HEADLESS_EXIT_OUTPUT_SCHEMA : 0;
|
|
2901
|
+
}
|
|
2902
|
+
recordTrajectory(event) {
|
|
2903
|
+
if (!this.trajectory)
|
|
2904
|
+
return;
|
|
2905
|
+
try {
|
|
2906
|
+
this.trajectory.record(this.sessionId, this.promptTurn, event);
|
|
2907
|
+
}
|
|
2908
|
+
catch (error) {
|
|
2909
|
+
if (!(error instanceof TrajectoryUnavailableError))
|
|
2910
|
+
throw error;
|
|
2911
|
+
this.trajectory = null;
|
|
2912
|
+
this.hadHeadlessError = true;
|
|
2913
|
+
this.output({ type: 'error', timestamp: new Date().toISOString(),
|
|
2914
|
+
data: { error: error.code, message: error.message } });
|
|
2915
|
+
}
|
|
2916
|
+
}
|
|
2917
|
+
/**
|
|
2918
|
+
* Under --output-schema the --output file only ever holds validated JSON for
|
|
2919
|
+
* the prompt in flight: it is emptied when a prompt starts (never created)
|
|
2920
|
+
* and filled only once that prompt's final message validates.
|
|
2921
|
+
*/
|
|
2922
|
+
clearSchemaOutputFile() {
|
|
2923
|
+
const path = this.options.outputFile;
|
|
2924
|
+
if (path && existsSync(path))
|
|
2925
|
+
truncateSync(path, 0);
|
|
2926
|
+
}
|
|
2927
|
+
async settleSchemaOutput(verdict, repaired) {
|
|
2928
|
+
if (verdict.ok) {
|
|
2929
|
+
if (this.options.outputFile)
|
|
2930
|
+
await writeFile(this.options.outputFile, `${verdict.json}\n`, 'utf-8');
|
|
2931
|
+
this.output({ type: 'status', timestamp: new Date().toISOString(),
|
|
2932
|
+
data: { status: 'output_schema_valid', repaired, ...(this.options.outputFile ? { path: this.options.outputFile } : {}) } });
|
|
2933
|
+
return;
|
|
2934
|
+
}
|
|
2935
|
+
this.outputSchemaFailures += 1;
|
|
2936
|
+
const message = `Final message did not satisfy --output-schema${repaired ? ' after one repair turn' : ''}: `
|
|
2937
|
+
+ verdict.errors.slice(0, 3).join('; ');
|
|
2938
|
+
this.output({ type: 'error', timestamp: new Date().toISOString(),
|
|
2939
|
+
data: { error: 'output_schema_validation_failed', message, errors: verdict.errors, repair_attempted: repaired } });
|
|
2794
2940
|
}
|
|
2795
2941
|
/**
|
|
2796
2942
|
* Shut down background agents and batch orchestrator gracefully before exiting.
|
|
@@ -2952,6 +3098,8 @@ export class HeadlessApp {
|
|
|
2952
3098
|
data: { status: 'ready', session_id: this.sessionId, mode: this.currentMode }
|
|
2953
3099
|
});
|
|
2954
3100
|
for (const input of parsedInputs) {
|
|
3101
|
+
if (this.fatalTurnReached)
|
|
3102
|
+
break;
|
|
2955
3103
|
if (input.prompt && this.validateJsonInputMode(input.mode)) {
|
|
2956
3104
|
await this.runInteractivePrompt(input.prompt);
|
|
2957
3105
|
this.outputPromptComplete();
|
|
@@ -2986,6 +3134,8 @@ export class HeadlessApp {
|
|
|
2986
3134
|
}
|
|
2987
3135
|
else {
|
|
2988
3136
|
// TTY, JSON protocol, and pane children process one line at a time.
|
|
3137
|
+
// Their caller sends the next line after a failed turn, so a failure
|
|
3138
|
+
// ends only that turn; a batch read up front stops at it instead.
|
|
2989
3139
|
const budget = { records: 0, aggregateBytes: 0 };
|
|
2990
3140
|
for await (const line of inputLines) {
|
|
2991
3141
|
const trimmed = line.text.trim();
|
|
@@ -3223,6 +3373,8 @@ export class HeadlessApp {
|
|
|
3223
3373
|
this.sessionLabels = { ...session.metadata.labels, manual_title: this.sessionName };
|
|
3224
3374
|
this.messages = session.messages;
|
|
3225
3375
|
this.taskHandoff = session.task_handoff ? projectTaskHandoff(session.task_handoff) : null;
|
|
3376
|
+
this.loadedHostScaffold = session.host_scaffold;
|
|
3377
|
+
this.agent?.setHostScaffoldMessages(session.host_scaffold);
|
|
3226
3378
|
this.restoredHandoffCorrections = session.task_handoff?.corrections.map(correction => ({
|
|
3227
3379
|
...correction, deliveryState: correction.deliveryState === 'pending' ? 'unknown' : correction.deliveryState,
|
|
3228
3380
|
})) ?? [];
|
|
@@ -3300,6 +3452,8 @@ export class HeadlessApp {
|
|
|
3300
3452
|
await this.runPrompt(prompt);
|
|
3301
3453
|
await this.accountGoalFinalTurnAfterPrompt();
|
|
3302
3454
|
await this.runGoalLoopIfArmed();
|
|
3455
|
+
if (this.hadHeadlessError)
|
|
3456
|
+
this.fatalTurnReached = true;
|
|
3303
3457
|
}
|
|
3304
3458
|
/**
|
|
3305
3459
|
* Drive an autonomous /goal to a terminal state in headless mode. No-op unless
|
|
@@ -3478,6 +3632,42 @@ export class HeadlessApp {
|
|
|
3478
3632
|
process.exit(this.getExitCode());
|
|
3479
3633
|
}
|
|
3480
3634
|
}
|
|
3635
|
+
/**
|
|
3636
|
+
* Load --output-schema and open --trajectory-jsonl before any stdin is read or
|
|
3637
|
+
* inference runs. Returns null after reporting a typed error.
|
|
3638
|
+
*/
|
|
3639
|
+
function openHeadlessSinks(options) {
|
|
3640
|
+
const report = (error) => {
|
|
3641
|
+
if (options.json) {
|
|
3642
|
+
process.stdout.write(`${JSON.stringify({ type: 'error', timestamp: new Date().toISOString(),
|
|
3643
|
+
data: { error: error.code, message: error.message } })}\n`);
|
|
3644
|
+
}
|
|
3645
|
+
else {
|
|
3646
|
+
process.stderr.write(`${error.message}\n`);
|
|
3647
|
+
}
|
|
3648
|
+
};
|
|
3649
|
+
let outputSchema;
|
|
3650
|
+
try {
|
|
3651
|
+
if (options.outputSchemaFile)
|
|
3652
|
+
outputSchema = OutputSchemaContract.fromFile(resolve(options.outputSchemaFile));
|
|
3653
|
+
}
|
|
3654
|
+
catch (error) {
|
|
3655
|
+
if (!(error instanceof OutputSchemaError))
|
|
3656
|
+
throw error;
|
|
3657
|
+
report(error);
|
|
3658
|
+
return null;
|
|
3659
|
+
}
|
|
3660
|
+
try {
|
|
3661
|
+
const trajectory = options.trajectoryJsonl ? TrajectoryJsonlWriter.open(resolve(options.trajectoryJsonl)) : undefined;
|
|
3662
|
+
return { outputSchema, trajectory };
|
|
3663
|
+
}
|
|
3664
|
+
catch (error) {
|
|
3665
|
+
if (!(error instanceof TrajectoryUnavailableError))
|
|
3666
|
+
throw error;
|
|
3667
|
+
report(error);
|
|
3668
|
+
return null;
|
|
3669
|
+
}
|
|
3670
|
+
}
|
|
3481
3671
|
/**
|
|
3482
3672
|
* Main entry point for headless mode
|
|
3483
3673
|
*/
|
|
@@ -3510,6 +3700,11 @@ export async function runHeadless(options, initialPrompt) {
|
|
|
3510
3700
|
return;
|
|
3511
3701
|
}
|
|
3512
3702
|
}
|
|
3703
|
+
const sinks = openHeadlessSinks(options);
|
|
3704
|
+
if (!sinks) {
|
|
3705
|
+
process.exitCode = HEADLESS_EXIT_USAGE;
|
|
3706
|
+
return;
|
|
3707
|
+
}
|
|
3513
3708
|
const deferJsonStdinStartup = !!options.json
|
|
3514
3709
|
&& !options.jsonStream
|
|
3515
3710
|
&& !initialPrompt
|
|
@@ -3552,7 +3747,7 @@ export async function runHeadless(options, initialPrompt) {
|
|
|
3552
3747
|
...options,
|
|
3553
3748
|
deferJsonStdinStartup,
|
|
3554
3749
|
jsonInputLines,
|
|
3555
|
-
});
|
|
3750
|
+
}, sinks);
|
|
3556
3751
|
let initialized;
|
|
3557
3752
|
try {
|
|
3558
3753
|
initialized = await app.init();
|
package/dist/headless_cli.js
CHANGED
|
@@ -23,6 +23,10 @@ Server-host options:
|
|
|
23
23
|
--max-iterations <n> Bound one agent turn
|
|
24
24
|
--timeout <ms> Bound one agent operation
|
|
25
25
|
--cwd <path> Set the agent working directory
|
|
26
|
+
--output <path> Write each prompt's final answer to a file
|
|
27
|
+
--output-schema <file> Require each prompt's final answer to be JSON valid
|
|
28
|
+
against this schema (one repair turn; exit 3 on failure)
|
|
29
|
+
--trajectory-jsonl <path> Append tool_call/tool_result/file_change records as JSONL
|
|
26
30
|
--quiet Suppress non-protocol output
|
|
27
31
|
|
|
28
32
|
Interactive, TUI, audio, simulation-control-plane, and document-generation
|
|
@@ -112,6 +116,8 @@ async function main() {
|
|
|
112
116
|
timeout: options.timeout,
|
|
113
117
|
verbose: options.verbose,
|
|
114
118
|
outputFile: options.outputFile,
|
|
119
|
+
outputSchemaFile: options.outputSchemaFile,
|
|
120
|
+
trajectoryJsonl: options.trajectoryJsonl,
|
|
115
121
|
pinTaskHeader: options.pinTaskHeader,
|
|
116
122
|
};
|
|
117
123
|
await runHeadless(headlessOptions, options.prompt);
|
|
@@ -17,6 +17,10 @@ export interface HeadlessCliOptions {
|
|
|
17
17
|
prompt?: string;
|
|
18
18
|
cwd?: string;
|
|
19
19
|
outputFile?: string;
|
|
20
|
+
/** JSON Schema the final assistant message of each prompt must satisfy. */
|
|
21
|
+
outputSchemaFile?: string;
|
|
22
|
+
/** Tool-call/tool-result/file-change trajectory sink (JSONL). Not --json-stream, which is input. */
|
|
23
|
+
trajectoryJsonl?: string;
|
|
20
24
|
maxIterations?: number;
|
|
21
25
|
timeout?: number;
|
|
22
26
|
}
|
|
@@ -35,6 +35,8 @@ export function parseHeadlessCliArgs(args) {
|
|
|
35
35
|
['--prompt', (value) => { options.prompt = value; return undefined; }],
|
|
36
36
|
['--cwd', (value) => { options.cwd = value; return undefined; }],
|
|
37
37
|
['--output', (value) => { options.outputFile = value; return undefined; }],
|
|
38
|
+
['--output-schema', (value) => { options.outputSchemaFile = value; return undefined; }],
|
|
39
|
+
['--trajectory-jsonl', (value) => { options.trajectoryJsonl = value; return undefined; }],
|
|
38
40
|
['--max-iterations', (value) => {
|
|
39
41
|
const parsed = Number(value);
|
|
40
42
|
if (!Number.isSafeInteger(parsed) || parsed <= 0)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const OUTPUT_SCHEMA_LIMITS: Readonly<{
|
|
2
|
+
schemaBytes: number;
|
|
3
|
+
depth: 64;
|
|
4
|
+
reportedErrors: 20;
|
|
5
|
+
/** Schema-node visits per validation; bounds anyOf/oneOf/$ref fan-out. */
|
|
6
|
+
validationSteps: 200000;
|
|
7
|
+
}>;
|
|
8
|
+
export type OutputSchemaErrorCode = 'output_schema_invalid' | 'output_schema_validation_failed';
|
|
9
|
+
export declare class OutputSchemaError extends Error {
|
|
10
|
+
readonly code: OutputSchemaErrorCode;
|
|
11
|
+
readonly errors: readonly string[];
|
|
12
|
+
constructor(code: OutputSchemaErrorCode, message: string, errors?: readonly string[]);
|
|
13
|
+
}
|
|
14
|
+
export type OutputSchemaVerdict = {
|
|
15
|
+
ok: true;
|
|
16
|
+
value: unknown;
|
|
17
|
+
json: string;
|
|
18
|
+
} | {
|
|
19
|
+
ok: false;
|
|
20
|
+
errors: string[];
|
|
21
|
+
};
|
|
22
|
+
export declare class OutputSchemaContract {
|
|
23
|
+
private readonly root;
|
|
24
|
+
private readonly patterns;
|
|
25
|
+
/** JSON pointers of every position compile() checked as a schema. */
|
|
26
|
+
private readonly schemaPointers;
|
|
27
|
+
private readonly refSites;
|
|
28
|
+
private readonly refTargets;
|
|
29
|
+
private steps;
|
|
30
|
+
private constructor();
|
|
31
|
+
/** Read, bound and compile a schema file; every failure is `output_schema_invalid`. */
|
|
32
|
+
static fromFile(path: string): OutputSchemaContract;
|
|
33
|
+
static fromSchema(schema: unknown): OutputSchemaContract;
|
|
34
|
+
/** Text appended to each schema-bound prompt so the model knows the contract up front. */
|
|
35
|
+
promptContract(): string;
|
|
36
|
+
repairPrompt(errors: readonly string[]): string;
|
|
37
|
+
validateMessage(text: string | null | undefined): OutputSchemaVerdict;
|
|
38
|
+
private compile;
|
|
39
|
+
private compileOther;
|
|
40
|
+
private matches;
|
|
41
|
+
private check;
|
|
42
|
+
private checkString;
|
|
43
|
+
private checkNumber;
|
|
44
|
+
private checkArray;
|
|
45
|
+
private checkObject;
|
|
46
|
+
}
|