@zergai/ztc 0.2.6-dev.36101352252 → 0.2.7-dev.36236183737

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.
Files changed (112) hide show
  1. package/README.md +43 -17
  2. package/bin/zmux-darwin-arm64 +0 -0
  3. package/bin/ztc-tui-darwin-arm64 +0 -0
  4. package/bin/zterm-darwin-arm64 +0 -0
  5. package/dist/App.js +19 -5
  6. package/dist/agent/agent.d.ts +5 -1
  7. package/dist/agent/agent.js +51 -8
  8. package/dist/agent/backends/account_pool.d.ts +5 -6
  9. package/dist/agent/backends/account_pool.js +39 -14
  10. package/dist/agent/backends/account_rotation.d.ts +3 -0
  11. package/dist/agent/backends/account_rotation.js +14 -3
  12. package/dist/agent/backends/codex_account_status.d.ts +42 -0
  13. package/dist/agent/backends/codex_account_status.js +196 -0
  14. package/dist/agent/backends/codex_app_server.d.ts +12 -2
  15. package/dist/agent/backends/codex_app_server.js +66 -6
  16. package/dist/agent/backends/index.d.ts +2 -0
  17. package/dist/agent/backends/index.js +13 -5
  18. package/dist/agent/backends/openai.d.ts +2 -2
  19. package/dist/agent/backends/openai.js +4 -3
  20. package/dist/agent/backends/openai_compatible.js +10 -10
  21. package/dist/agent/backends/openai_responses.d.ts +17 -5
  22. package/dist/agent/backends/openai_responses.js +2 -4
  23. package/dist/agent/backends/token_usage.js +1 -1
  24. package/dist/agent/backends/types.d.ts +3 -0
  25. package/dist/agent/commands/accounts.d.ts +7 -1
  26. package/dist/agent/commands/accounts.js +299 -101
  27. package/dist/agent/commands/config.js +11 -3
  28. package/dist/agent/commands/config_profile_switch.d.ts +2 -0
  29. package/dist/agent/commands/config_profile_switch.js +22 -0
  30. package/dist/agent/commands/context.js +4 -3
  31. package/dist/agent/commands/index.js +1 -2
  32. package/dist/agent/commands/input_mode.js +1 -1
  33. package/dist/agent/commands/model.js +7 -2
  34. package/dist/agent/commands/plan.d.ts +12 -0
  35. package/dist/agent/commands/plan.js +39 -28
  36. package/dist/agent/commands/profile.d.ts +1 -1
  37. package/dist/agent/commands/profile.js +34 -257
  38. package/dist/agent/commands/provider_choices.d.ts +12 -1
  39. package/dist/agent/commands/provider_choices.js +29 -2
  40. package/dist/agent/commands/provider_selection.d.ts +3 -0
  41. package/dist/agent/commands/provider_selection.js +63 -0
  42. package/dist/agent/commands/settings.d.ts +2 -0
  43. package/dist/agent/commands/settings.js +655 -50
  44. package/dist/agent/commands/types.d.ts +19 -2
  45. package/dist/agent/tools/ask_user.js +2 -2
  46. package/dist/app/agent_runner.d.ts +1 -1
  47. package/dist/app/agent_runner.js +2 -2
  48. package/dist/app/ask_user_response.d.ts +3 -0
  49. package/dist/app/ask_user_response.js +16 -0
  50. package/dist/app/command_context.js +29 -13
  51. package/dist/app/controller.d.ts +17 -2
  52. package/dist/app/controller.js +24 -1
  53. package/dist/app/selection_completion.d.ts +9 -3
  54. package/dist/app/selection_completion.js +54 -22
  55. package/dist/cli_args.js +10 -1
  56. package/dist/cli_main.js +85 -2
  57. package/dist/cli_ratatui.d.ts +22 -4
  58. package/dist/cli_ratatui.js +421 -146
  59. package/dist/config/defaults.d.ts +6 -0
  60. package/dist/config/defaults.js +20 -0
  61. package/dist/config/profiles.d.ts +9 -0
  62. package/dist/config/profiles.js +87 -0
  63. package/dist/config/types.d.ts +2 -0
  64. package/dist/config.d.ts +7 -0
  65. package/dist/config.js +283 -40
  66. package/dist/headless.js +14 -0
  67. package/dist/panes/model_catalog.d.ts +1 -1
  68. package/dist/panes/model_catalog.js +24 -2
  69. package/dist/panes/ztc_launch.js +6 -0
  70. package/dist/router_auth.js +3 -2
  71. package/dist/session.d.ts +2 -0
  72. package/dist/session.js +3 -0
  73. package/dist/types.d.ts +23 -2
  74. package/dist/ui/views/app.d.ts +3 -1
  75. package/dist/ui/views/app.js +3 -2
  76. package/dist/ui/views/completion_menu.js +6 -6
  77. package/dist/ui/views/input_area.d.ts +2 -1
  78. package/dist/ui/views/input_area.js +9 -8
  79. package/dist/ui/views/status_bar.d.ts +2 -0
  80. package/dist/ui/views/status_bar.js +15 -4
  81. package/dist/ui/widgets/color_panel.d.ts +9 -0
  82. package/dist/ui/widgets/color_panel.js +41 -26
  83. package/dist/ui/widgets/navigator_panel.d.ts +9 -0
  84. package/dist/ui/widgets/navigator_panel.js +17 -16
  85. package/dist/ui/widgets/panel_frame.d.ts +83 -3
  86. package/dist/ui/widgets/panel_frame.js +107 -9
  87. package/dist/ui/widgets/questionnaire.d.ts +9 -0
  88. package/dist/ui/widgets/questionnaire.js +214 -16
  89. package/dist/ui/widgets/resume_panel.d.ts +9 -0
  90. package/dist/ui/widgets/resume_panel.js +18 -17
  91. package/dist/ui/widgets/rewind_panel.d.ts +9 -0
  92. package/dist/ui/widgets/rewind_panel.js +15 -16
  93. package/dist/ui/widgets/select.d.ts +6 -0
  94. package/dist/ui/widgets/select.js +47 -12
  95. package/dist/ui/widgets/settings_panel.d.ts +75 -0
  96. package/dist/ui/widgets/settings_panel.js +197 -39
  97. package/dist/ui/widgets/status_line_panel.d.ts +9 -0
  98. package/dist/ui/widgets/status_line_panel.js +18 -19
  99. package/dist/ui/widgets/transcript_preview.d.ts +8 -0
  100. package/dist/ui/widgets/transcript_preview.js +10 -0
  101. package/dist/utils/context.js +2 -0
  102. package/dist/utils/fireworks.d.ts +20 -0
  103. package/dist/utils/fireworks.js +23 -0
  104. package/dist/utils/models.d.ts +2 -1
  105. package/dist/utils/models.js +19 -0
  106. package/dist/web/accounts_mirror.d.ts +7 -0
  107. package/dist/web/accounts_mirror.js +59 -7
  108. package/dist/web/mirror_stream.js +19 -5
  109. package/dist/zlm-embed.mjs +5734 -5362
  110. package/package.json +2 -2
  111. package/dist/agent/commands/provider.d.ts +0 -2
  112. package/dist/agent/commands/provider.js +0 -75
@@ -201,7 +201,10 @@ export declare class RatatuiApp {
201
201
  private nativeDictationModule;
202
202
  private legacyDictationModule;
203
203
  private dictationFilterModule;
204
- private messageQueue;
204
+ /** Busy Enter prompts waiting for the next completed tool batch. */
205
+ private pendingSteering;
206
+ private nativeSteeringInFlight;
207
+ private nativeSteeringTail;
205
208
  private pendingBusTrigger;
206
209
  private flushingQueue;
207
210
  private queueEdit;
@@ -260,6 +263,15 @@ export declare class RatatuiApp {
260
263
  * only the render path knows which layout the frame actually used.
261
264
  */
262
265
  private widgetSurfaceOriginY;
266
+ /**
267
+ * Columns between the ZTC pane's left edge and the surface's first column.
268
+ *
269
+ * A full-page panel caps its frame and centres it, so the frame no longer
270
+ * starts at the pane's own gutter: the margin is whatever the panel did not
271
+ * spend. Recorded from the surface it just painted, because only the panel
272
+ * knows how wide its frame ended up.
273
+ */
274
+ private widgetSurfaceOriginX;
263
275
  /** Last value pushed to zmux's wheel capture, to send only on change. */
264
276
  private wheelCaptureActive;
265
277
  private promptViewer;
@@ -288,6 +300,7 @@ export declare class RatatuiApp {
288
300
  private mirrorClient;
289
301
  private pendingWidgetCallbacks;
290
302
  private widgetIdCounter;
303
+ private activeSettingsWidgetId;
291
304
  private muxMode;
292
305
  /**
293
306
  * Phase 1+ of always-scrolling rollout: when true, the mux pane paints
@@ -420,6 +433,8 @@ export declare class RatatuiApp {
420
433
  * command that changes what the agent should be.
421
434
  */
422
435
  private reloadAgentInPlace;
436
+ /** Change the active config while retaining this renderer's session and transcript. */
437
+ private switchConfigProfileInPlace;
423
438
  /**
424
439
  * Environment handed to the renderer so zmux boots with the user's rebinds.
425
440
  * Live changes are pushed over the socket afterwards (`set_keybindings`).
@@ -699,8 +714,9 @@ export declare class RatatuiApp {
699
714
  * used to give up a row here anyway, which left one blank line at the bottom
700
715
  * of every spawned ZTC pane.
701
716
  *
702
- * Inline keeps rows above the viewport for the shell's scrollback, and desktop
703
- * is left reserving one because ZTerm's own reservation is unverified.
717
+ * Inline fills the terminal except for one shell row. The transcript remains
718
+ * in terminal scrollback when it no longer fits the live view. Desktop is
719
+ * left reserving one because ZTerm's own reservation is unverified.
704
720
  */
705
721
  private viewportHeightFor;
706
722
  private handleTuiEvent;
@@ -795,6 +811,8 @@ export declare class RatatuiApp {
795
811
  * method would re-enter and dequeue twice, scrambling FIFO order.
796
812
  */
797
813
  private maybeFlushQueue;
814
+ /** Put steering that missed a tool boundary after the finished answer. */
815
+ private movePendingSteeringToEnd;
798
816
  /** True while an agent turn is active (same definition as handleSubmit's busy check). */
799
817
  private isAgentBusy;
800
818
  /**
@@ -938,7 +956,7 @@ export declare class RatatuiApp {
938
956
  private showPlanApproval;
939
957
  /**
940
958
  * Show ask_user widget after ask_user tool is called.
941
- * Presents the agent's question with predefined options + "Other..." for custom input.
959
+ * Presents options with an optional note for additional context.
942
960
  */
943
961
  private showAskUserWidget;
944
962
  /**