aicodeman 1.40.0 → 1.41.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 +81 -13
- package/dist/attachment-registry.d.ts +2 -0
- package/dist/attachment-registry.d.ts.map +1 -1
- package/dist/attachment-registry.js +14 -3
- package/dist/attachment-registry.js.map +1 -1
- package/dist/cli-agent.d.ts +227 -0
- package/dist/cli-agent.d.ts.map +1 -0
- package/dist/cli-agent.js +771 -0
- package/dist/cli-agent.js.map +1 -0
- package/dist/cli.d.ts +25 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +103 -41
- package/dist/cli.js.map +1 -1
- package/dist/codeman-credentials.d.ts +27 -0
- package/dist/codeman-credentials.d.ts.map +1 -0
- package/dist/codeman-credentials.js +66 -0
- package/dist/codeman-credentials.js.map +1 -0
- package/dist/config/buffer-limits.d.ts +9 -0
- package/dist/config/buffer-limits.d.ts.map +1 -1
- package/dist/config/buffer-limits.js +9 -0
- package/dist/config/buffer-limits.js.map +1 -1
- package/dist/config/cli-registry/schema.d.ts +10 -0
- package/dist/config/cli-registry/schema.d.ts.map +1 -1
- package/dist/config/cli-registry/schema.js +15 -0
- package/dist/config/cli-registry/schema.js.map +1 -1
- package/dist/config/cli-registry/stock.d.ts.map +1 -1
- package/dist/config/cli-registry/stock.js +47 -0
- package/dist/config/cli-registry/stock.js.map +1 -1
- package/dist/config/cli-registry/types.d.ts +47 -1
- package/dist/config/cli-registry/types.d.ts.map +1 -1
- package/dist/folder-listing.d.ts +94 -0
- package/dist/folder-listing.d.ts.map +1 -0
- package/dist/folder-listing.js +241 -0
- package/dist/folder-listing.js.map +1 -0
- package/dist/git-clone.d.ts.map +1 -1
- package/dist/git-clone.js +4 -0
- package/dist/git-clone.js.map +1 -1
- package/dist/hooks-config.d.ts +36 -16
- package/dist/hooks-config.d.ts.map +1 -1
- package/dist/hooks-config.js +45 -20
- package/dist/hooks-config.js.map +1 -1
- package/dist/html-view-capabilities.d.ts +54 -0
- package/dist/html-view-capabilities.d.ts.map +1 -0
- package/dist/html-view-capabilities.js +103 -0
- package/dist/html-view-capabilities.js.map +1 -0
- package/dist/image-watcher.d.ts.map +1 -1
- package/dist/image-watcher.js +6 -2
- package/dist/image-watcher.js.map +1 -1
- package/dist/mcp-server.d.ts +114 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +917 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/mcp-sync-targets.d.ts +34 -0
- package/dist/mcp-sync-targets.d.ts.map +1 -0
- package/dist/mcp-sync-targets.js +55 -0
- package/dist/mcp-sync-targets.js.map +1 -0
- package/dist/mcp-sync.d.ts +7 -1
- package/dist/mcp-sync.d.ts.map +1 -1
- package/dist/mcp-sync.js +113 -6
- package/dist/mcp-sync.js.map +1 -1
- package/dist/mux-interface.d.ts +36 -1
- package/dist/mux-interface.d.ts.map +1 -1
- package/dist/remote-files.d.ts +37 -0
- package/dist/remote-files.d.ts.map +1 -1
- package/dist/remote-files.js +103 -0
- package/dist/remote-files.js.map +1 -1
- package/dist/remote-pane-history.d.ts +103 -0
- package/dist/remote-pane-history.d.ts.map +1 -0
- package/dist/remote-pane-history.js +258 -0
- package/dist/remote-pane-history.js.map +1 -0
- package/dist/remote-ssh-limiter.d.ts +16 -3
- package/dist/remote-ssh-limiter.d.ts.map +1 -1
- package/dist/remote-ssh-limiter.js +37 -6
- package/dist/remote-ssh-limiter.js.map +1 -1
- package/dist/session.d.ts +29 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +63 -4
- package/dist/session.js.map +1 -1
- package/dist/subagent-watcher.d.ts.map +1 -1
- package/dist/subagent-watcher.js +29 -6
- package/dist/subagent-watcher.js.map +1 -1
- package/dist/tab-layout-legacy-order.d.ts.map +1 -1
- package/dist/tab-layout-legacy-order.js +72 -13
- package/dist/tab-layout-legacy-order.js.map +1 -1
- package/dist/tab-layout-service.d.ts +33 -2
- package/dist/tab-layout-service.d.ts.map +1 -1
- package/dist/tab-layout-service.js +102 -7
- package/dist/tab-layout-service.js.map +1 -1
- package/dist/tab-layout.d.ts +9 -0
- package/dist/tab-layout.d.ts.map +1 -1
- package/dist/tab-layout.js +15 -2
- package/dist/tab-layout.js.map +1 -1
- package/dist/templates/case-template.md +2 -0
- package/dist/tmux-manager.d.ts +76 -2
- package/dist/tmux-manager.d.ts.map +1 -1
- package/dist/tmux-manager.js +216 -40
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tui/tui-client.d.ts +3 -17
- package/dist/tui/tui-client.d.ts.map +1 -1
- package/dist/tui/tui-client.js +3 -44
- package/dist/tui/tui-client.js.map +1 -1
- package/dist/types/session.d.ts +53 -0
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js.map +1 -1
- package/dist/usage-telemetry.d.ts +44 -7
- package/dist/usage-telemetry.d.ts.map +1 -1
- package/dist/usage-telemetry.js +72 -7
- package/dist/usage-telemetry.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/process-exit-wait.d.ts +40 -0
- package/dist/utils/process-exit-wait.d.ts.map +1 -0
- package/dist/utils/process-exit-wait.js +68 -0
- package/dist/utils/process-exit-wait.js.map +1 -0
- package/dist/web/approval-inbox.d.ts +12 -0
- package/dist/web/approval-inbox.d.ts.map +1 -1
- package/dist/web/approval-inbox.js +1 -0
- package/dist/web/approval-inbox.js.map +1 -1
- package/dist/web/middleware/auth.d.ts.map +1 -1
- package/dist/web/middleware/auth.js +33 -0
- package/dist/web/middleware/auth.js.map +1 -1
- package/dist/web/paste-image-gc.d.ts +46 -6
- package/dist/web/paste-image-gc.d.ts.map +1 -1
- package/dist/web/paste-image-gc.js +106 -32
- package/dist/web/paste-image-gc.js.map +1 -1
- package/dist/web/ports/session-port.d.ts +8 -1
- package/dist/web/ports/session-port.d.ts.map +1 -1
- package/dist/web/public/admin-ui.js.gz +0 -0
- package/dist/web/public/api-client.c9b1cddc.js.gz +0 -0
- package/dist/web/public/app.24689381.js +43 -0
- package/dist/web/public/app.24689381.js.br +0 -0
- package/dist/web/public/app.24689381.js.gz +0 -0
- package/dist/web/public/approvals-ui.js +4 -0
- package/dist/web/public/approvals-ui.js.br +0 -0
- package/dist/web/public/approvals-ui.js.gz +0 -0
- package/dist/web/public/{constants.c0f8f9de.js → constants.17d77b65.js} +690 -35
- package/dist/web/public/constants.17d77b65.js.br +0 -0
- package/dist/web/public/constants.17d77b65.js.gz +0 -0
- package/dist/web/public/cron-ui.js.gz +0 -0
- package/dist/web/public/entrance-animations.js +490 -43
- package/dist/web/public/entrance-animations.js.br +0 -0
- package/dist/web/public/entrance-animations.js.gz +0 -0
- package/dist/web/public/gesture/gesture-codeman.js +112 -6
- package/dist/web/public/git-status-ui.js.gz +0 -0
- package/dist/web/public/home-sessions.js +2 -1
- package/dist/web/public/home-sessions.js.br +0 -0
- package/dist/web/public/home-sessions.js.gz +0 -0
- package/dist/web/public/host-wake-ui.js.gz +0 -0
- package/dist/web/public/i18n.9afd8e4d.js +2 -0
- package/dist/web/public/i18n.9afd8e4d.js.br +0 -0
- package/dist/web/public/i18n.9afd8e4d.js.gz +0 -0
- package/dist/web/public/image-input.9ed1d0d2.js +453 -0
- package/dist/web/public/image-input.9ed1d0d2.js.br +0 -0
- package/dist/web/public/image-input.9ed1d0d2.js.gz +0 -0
- package/dist/web/public/index.html +223 -46
- package/dist/web/public/index.html.br +0 -0
- package/dist/web/public/index.html.gz +0 -0
- package/dist/web/public/input-cjk.8bc46081.js.gz +0 -0
- package/dist/web/public/{keyboard-accessory.c1e7c7b7.js → keyboard-accessory.c458eea8.js} +115 -35
- package/dist/web/public/keyboard-accessory.c458eea8.js.br +0 -0
- package/dist/web/public/keyboard-accessory.c458eea8.js.gz +0 -0
- package/dist/web/public/mobile-handlers.0ef9c311.js.gz +0 -0
- package/dist/web/public/mobile-ime-preview.2dbaf262.js.gz +0 -0
- package/dist/web/public/mobile-overview.js +11 -2
- package/dist/web/public/mobile-overview.js.br +0 -0
- package/dist/web/public/mobile-overview.js.gz +0 -0
- package/dist/web/public/mobile.2dff1580.css +1 -0
- package/dist/web/public/mobile.2dff1580.css.br +0 -0
- package/dist/web/public/mobile.2dff1580.css.gz +0 -0
- package/dist/web/public/{notification-manager.50bb87d8.js → notification-manager.feb82c04.js} +19 -2
- package/dist/web/public/notification-manager.feb82c04.js.br +0 -0
- package/dist/web/public/notification-manager.feb82c04.js.gz +0 -0
- package/dist/web/public/orchestrator-panel.js.gz +0 -0
- package/dist/web/public/{panels-ui.4735dfc2.js → panels-ui.73ec0137.js} +87 -87
- package/dist/web/public/panels-ui.73ec0137.js.br +0 -0
- package/dist/web/public/panels-ui.73ec0137.js.gz +0 -0
- package/dist/web/public/ralph-panel.b350e2ef.js.gz +0 -0
- package/dist/web/public/ralph-wizard.b6c0dd19.js.gz +0 -0
- package/dist/web/public/readmymind-ui.js.gz +0 -0
- package/dist/web/public/reboot-restore-ui.js.gz +0 -0
- package/dist/web/public/respawn-ui.ff0dae4c.js.gz +0 -0
- package/dist/web/public/sanitize-html.e7147e76.js.gz +0 -0
- package/dist/web/public/session-lineage.js.gz +0 -0
- package/dist/web/public/{session-ui.f731602c.js → session-ui.dbc6819b.js} +33 -33
- package/dist/web/public/session-ui.dbc6819b.js.br +0 -0
- package/dist/web/public/session-ui.dbc6819b.js.gz +0 -0
- package/dist/web/public/settings-ui.81ac264e.js +97 -0
- package/dist/web/public/settings-ui.81ac264e.js.br +0 -0
- package/dist/web/public/settings-ui.81ac264e.js.gz +0 -0
- package/dist/web/public/spreadsheet-preview-worker.js +11 -0
- package/dist/web/public/spreadsheet-preview-worker.js.br +0 -0
- package/dist/web/public/spreadsheet-preview-worker.js.gz +0 -0
- package/dist/web/public/{spreadsheet-preview.af82fa2f.js → spreadsheet-preview.75c751de.js} +1 -1
- package/dist/web/public/spreadsheet-preview.75c751de.js.br +0 -0
- package/dist/web/public/spreadsheet-preview.75c751de.js.gz +0 -0
- package/dist/web/public/spreadsheet-xlsx-core.js +110 -0
- package/dist/web/public/spreadsheet-xlsx-core.js.br +0 -0
- package/dist/web/public/spreadsheet-xlsx-core.js.gz +0 -0
- package/dist/web/public/styles.900a28e4.css +1 -0
- package/dist/web/public/styles.900a28e4.css.br +0 -0
- package/dist/web/public/styles.900a28e4.css.gz +0 -0
- package/dist/web/public/{subagent-windows.e6ca799f.js → subagent-windows.07277a58.js} +7 -5
- package/dist/web/public/subagent-windows.07277a58.js.br +0 -0
- package/dist/web/public/subagent-windows.07277a58.js.gz +0 -0
- package/dist/web/public/sw.js +6 -2
- package/dist/web/public/sw.js.br +0 -0
- package/dist/web/public/sw.js.gz +0 -0
- package/dist/web/public/tab-layout-browser.2d6189f7.js +1 -0
- package/dist/web/public/tab-layout-browser.2d6189f7.js.br +0 -0
- package/dist/web/public/tab-layout-browser.2d6189f7.js.gz +0 -0
- package/dist/web/public/{tab-rail-resize.a5867793.js → tab-rail-resize.7157e0bd.js} +1 -1
- package/dist/web/public/tab-rail-resize.7157e0bd.js.br +0 -0
- package/dist/web/public/tab-rail-resize.7157e0bd.js.gz +0 -0
- package/dist/web/public/terminal-keycode229-recovery.af09f99a.js.gz +0 -0
- package/dist/web/public/terminal-split.js.gz +0 -0
- package/dist/web/public/terminal-tile.js +135 -38
- package/dist/web/public/terminal-tile.js.br +0 -0
- package/dist/web/public/terminal-tile.js.gz +0 -0
- package/dist/web/public/terminal-ui.858f5da5.js +2 -0
- package/dist/web/public/terminal-ui.858f5da5.js.br +0 -0
- package/dist/web/public/terminal-ui.858f5da5.js.gz +0 -0
- package/dist/web/public/tile-grid.js +769 -137
- package/dist/web/public/tile-grid.js.br +0 -0
- package/dist/web/public/tile-grid.js.gz +0 -0
- package/dist/web/public/ultracode-panel.js.gz +0 -0
- package/dist/web/public/ultracode-windows.js +9 -6
- package/dist/web/public/ultracode-windows.js.br +0 -0
- package/dist/web/public/ultracode-windows.js.gz +0 -0
- package/dist/web/public/vendor/dompurify.min.js.gz +0 -0
- package/dist/web/public/vendor/exceljs.min.js.gz +0 -0
- package/dist/web/public/vendor/fflate.min.js.gz +0 -0
- package/dist/web/public/vendor/marked.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-fit.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-serialize.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-unicode11.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-predictive-echo.ae5e3d5d.js.gz +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.0b69623c.js +4 -0
- package/dist/web/public/vendor/xterm-zerolag-input.0b69623c.js.br +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.0b69623c.js.gz +0 -0
- package/dist/web/public/vendor/xterm.css.gz +0 -0
- package/dist/web/public/vendor/xterm.min.js.gz +0 -0
- package/dist/web/public/voice-input.2342c37b.js.gz +0 -0
- package/dist/web/public/voice-pcm-worklet.js.gz +0 -0
- package/dist/web/public/webview-tabs.js +12 -0
- package/dist/web/public/webview-tabs.js.br +0 -0
- package/dist/web/public/webview-tabs.js.gz +0 -0
- package/dist/web/route-helpers.d.ts +8 -0
- package/dist/web/route-helpers.d.ts.map +1 -1
- package/dist/web/route-helpers.js +8 -0
- package/dist/web/route-helpers.js.map +1 -1
- package/dist/web/routes/admin-routes.d.ts.map +1 -1
- package/dist/web/routes/admin-routes.js +4 -1
- package/dist/web/routes/admin-routes.js.map +1 -1
- package/dist/web/routes/approval-routes.d.ts.map +1 -1
- package/dist/web/routes/approval-routes.js +6 -8
- package/dist/web/routes/approval-routes.js.map +1 -1
- package/dist/web/routes/case-routes.js +1 -1
- package/dist/web/routes/case-routes.js.map +1 -1
- package/dist/web/routes/cli-registry-routes.d.ts +23 -4
- package/dist/web/routes/cli-registry-routes.d.ts.map +1 -1
- package/dist/web/routes/cli-registry-routes.js +92 -7
- package/dist/web/routes/cli-registry-routes.js.map +1 -1
- package/dist/web/routes/file-routes.d.ts +46 -1
- package/dist/web/routes/file-routes.d.ts.map +1 -1
- package/dist/web/routes/file-routes.js +214 -27
- package/dist/web/routes/file-routes.js.map +1 -1
- package/dist/web/routes/hook-event-routes.d.ts.map +1 -1
- package/dist/web/routes/hook-event-routes.js +8 -1
- package/dist/web/routes/hook-event-routes.js.map +1 -1
- package/dist/web/routes/html-view-routes.d.ts +60 -0
- package/dist/web/routes/html-view-routes.d.ts.map +1 -0
- package/dist/web/routes/html-view-routes.js +288 -0
- package/dist/web/routes/html-view-routes.js.map +1 -0
- package/dist/web/routes/index.d.ts +1 -0
- package/dist/web/routes/index.d.ts.map +1 -1
- package/dist/web/routes/index.js +1 -0
- package/dist/web/routes/index.js.map +1 -1
- package/dist/web/routes/mcp-sync-routes.d.ts +7 -2
- package/dist/web/routes/mcp-sync-routes.d.ts.map +1 -1
- package/dist/web/routes/mcp-sync-routes.js +10 -3
- package/dist/web/routes/mcp-sync-routes.js.map +1 -1
- package/dist/web/routes/reboot-restore-routes.js +3 -3
- package/dist/web/routes/reboot-restore-routes.js.map +1 -1
- package/dist/web/routes/session-routes.d.ts +1 -0
- package/dist/web/routes/session-routes.d.ts.map +1 -1
- package/dist/web/routes/session-routes.js +345 -90
- package/dist/web/routes/session-routes.js.map +1 -1
- package/dist/web/routes/status-telemetry-routes.d.ts.map +1 -1
- package/dist/web/routes/status-telemetry-routes.js +16 -2
- package/dist/web/routes/status-telemetry-routes.js.map +1 -1
- package/dist/web/schemas.d.ts +32 -0
- package/dist/web/schemas.d.ts.map +1 -1
- package/dist/web/schemas.js +74 -0
- package/dist/web/schemas.js.map +1 -1
- package/dist/web/server.d.ts +7 -2
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +77 -24
- package/dist/web/server.js.map +1 -1
- package/dist/web/sse-events.d.ts +5 -2
- package/dist/web/sse-events.d.ts.map +1 -1
- package/dist/web/sse-events.js +5 -2
- package/dist/web/sse-events.js.map +1 -1
- package/package.json +5 -4
- package/skills/codeman/SKILL.md +30 -7
- package/README.zh-CN.md +0 -1147
- package/dist/web/public/app.abadc970.js +0 -43
- package/dist/web/public/app.abadc970.js.br +0 -0
- package/dist/web/public/app.abadc970.js.gz +0 -0
- package/dist/web/public/constants.c0f8f9de.js.br +0 -0
- package/dist/web/public/constants.c0f8f9de.js.gz +0 -0
- package/dist/web/public/i18n.a31747a9.js +0 -2
- package/dist/web/public/i18n.a31747a9.js.br +0 -0
- package/dist/web/public/i18n.a31747a9.js.gz +0 -0
- package/dist/web/public/image-input.898a538b.js +0 -281
- package/dist/web/public/image-input.898a538b.js.br +0 -0
- package/dist/web/public/image-input.898a538b.js.gz +0 -0
- package/dist/web/public/keyboard-accessory.c1e7c7b7.js.br +0 -0
- package/dist/web/public/keyboard-accessory.c1e7c7b7.js.gz +0 -0
- package/dist/web/public/mobile.111b187d.css +0 -1
- package/dist/web/public/mobile.111b187d.css.br +0 -0
- package/dist/web/public/mobile.111b187d.css.gz +0 -0
- package/dist/web/public/notification-manager.50bb87d8.js.br +0 -0
- package/dist/web/public/notification-manager.50bb87d8.js.gz +0 -0
- package/dist/web/public/panels-ui.4735dfc2.js.br +0 -0
- package/dist/web/public/panels-ui.4735dfc2.js.gz +0 -0
- package/dist/web/public/session-ui.f731602c.js.br +0 -0
- package/dist/web/public/session-ui.f731602c.js.gz +0 -0
- package/dist/web/public/settings-ui.a97ab16f.js +0 -97
- package/dist/web/public/settings-ui.a97ab16f.js.br +0 -0
- package/dist/web/public/settings-ui.a97ab16f.js.gz +0 -0
- package/dist/web/public/spreadsheet-preview.af82fa2f.js.br +0 -0
- package/dist/web/public/spreadsheet-preview.af82fa2f.js.gz +0 -0
- package/dist/web/public/styles.8ee12666.css +0 -1
- package/dist/web/public/styles.8ee12666.css.br +0 -0
- package/dist/web/public/styles.8ee12666.css.gz +0 -0
- package/dist/web/public/subagent-windows.e6ca799f.js.br +0 -0
- package/dist/web/public/subagent-windows.e6ca799f.js.gz +0 -0
- package/dist/web/public/tab-layout-browser.065fcba4.js +0 -1
- package/dist/web/public/tab-layout-browser.065fcba4.js.br +0 -0
- package/dist/web/public/tab-layout-browser.065fcba4.js.gz +0 -0
- package/dist/web/public/tab-rail-resize.a5867793.js.br +0 -0
- package/dist/web/public/tab-rail-resize.a5867793.js.gz +0 -0
- package/dist/web/public/terminal-ui.5059b30e.js +0 -2
- package/dist/web/public/terminal-ui.5059b30e.js.br +0 -0
- package/dist/web/public/terminal-ui.5059b30e.js.gz +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.bbb5f84c.js +0 -4
- package/dist/web/public/vendor/xterm-zerolag-input.bbb5f84c.js.br +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.bbb5f84c.js.gz +0 -0
package/dist/remote-files.d.ts
CHANGED
|
@@ -71,6 +71,10 @@ export declare function buildRemoteFileCommand(remote: SessionRemote, shellComma
|
|
|
71
71
|
* `echo` (which land before the script runs) from the records without any "last N
|
|
72
72
|
* lines" guesswork. `realPath` is the last field, so a `|` in a path still parses.
|
|
73
73
|
*
|
|
74
|
+
* A path starting with `~/` is taken relative to the remote user's `$HOME`: this
|
|
75
|
+
* server does not know that home, and a clicked `~/…` link means the host the
|
|
76
|
+
* session runs on. The record's `realPath` is absolute, as for any other path.
|
|
77
|
+
*
|
|
74
78
|
* Symlink resolution is portable AND fails closed. `readlink -f` where available
|
|
75
79
|
* (Linux, macOS >= 12.3); otherwise the fallback canonicalizes the directory chain
|
|
76
80
|
* with `cd -P`/`pwd -P` and then follows the LAST component with plain `readlink`
|
|
@@ -106,6 +110,39 @@ export declare function parseRemoteProbeOutput(stdout: string, paths: readonly s
|
|
|
106
110
|
* costs three connections in sequence rather than 100 at once.
|
|
107
111
|
*/
|
|
108
112
|
export declare function remoteProbePaths(remote: SessionRemote, paths: readonly string[]): Promise<Array<RemoteProbe | null>>;
|
|
113
|
+
/** One entry of a remote folder listing: a file (with size/mtime) or a subfolder. */
|
|
114
|
+
export interface RemoteFolderEntry {
|
|
115
|
+
kind: 'file' | 'directory';
|
|
116
|
+
name: string;
|
|
117
|
+
size: number;
|
|
118
|
+
mtimeMs: number;
|
|
119
|
+
}
|
|
120
|
+
/** A remote folder listing; `dir` is the folder with symlinks resolved on the remote host. */
|
|
121
|
+
export interface RemoteFolderListing {
|
|
122
|
+
dir: string;
|
|
123
|
+
entries: RemoteFolderEntry[];
|
|
124
|
+
truncated: boolean;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* List one remote folder in a SINGLE ssh round trip: its canonical path, then every
|
|
128
|
+
* non-hidden subfolder and every regular file (symlinks followed) whose name ends in
|
|
129
|
+
* one of `extensions` (any case), up to `maxEntries`.
|
|
130
|
+
*
|
|
131
|
+
* Same output discipline as {@link buildRemoteProbeCommand}: a lone NUL first (so rc
|
|
132
|
+
* chatter before it is discarded), then NUL-terminated records — `E|n` (no such
|
|
133
|
+
* folder), `E|x` (cannot be canonicalized), `D|<dir>`, `d|0|0|<name>`,
|
|
134
|
+
* `f|<size>|<mtime>|<name>`, and `T|` when the cap cut the listing. The name is the
|
|
135
|
+
* last field, so a `|` in it still parses, and NUL is the one byte a filename cannot
|
|
136
|
+
* hold. A leading `~/` is the remote user's `$HOME`, as in the probe.
|
|
137
|
+
*/
|
|
138
|
+
export declare function buildRemoteFolderListCommand(dir: string, extensions: readonly string[], maxEntries: number): string;
|
|
139
|
+
/**
|
|
140
|
+
* Parse {@link buildRemoteFolderListCommand} output: null when nothing exists there
|
|
141
|
+
* (or it cannot be resolved), `'not-a-folder'` when it is a file.
|
|
142
|
+
*/
|
|
143
|
+
export declare function parseRemoteFolderListOutput(stdout: string): RemoteFolderListing | 'not-a-folder' | null;
|
|
144
|
+
/** List a remote folder (see {@link buildRemoteFolderListCommand}). */
|
|
145
|
+
export declare function remoteListFolder(remote: SessionRemote, dir: string, extensions: readonly string[], maxEntries: number): Promise<RemoteFolderListing | 'not-a-folder' | null>;
|
|
109
146
|
/** Read a whole remote file into memory, capped by `maxBytes`. */
|
|
110
147
|
export declare function remoteReadFile(remote: SessionRemote, remotePath: string, maxBytes: number): Promise<Buffer>;
|
|
111
148
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-files.d.ts","sourceRoot":"","sources":["../src/remote-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAqDxD,iFAAiF;AACjF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,cAAc,CAAC;IACrB,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAE1F;AAED
|
|
1
|
+
{"version":3,"file":"remote-files.d.ts","sourceRoot":"","sources":["../src/remote-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAqDxD,iFAAiF;AACjF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;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MAAM,EAAE,UAAU,EAAE,SAAS,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CA+BnH;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB,GAAG,cAAc,GAAG,IAAI,CA+BvG;AAED,uEAAuE;AACvE,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,aAAa,EACrB,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,mBAAmB,GAAG,cAAc,GAAG,IAAI,CAAC,CAetD;AAED,kEAAkE;AAClE,wBAAsB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAejH;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAKzG;AAED,MAAM,WAAW,gBAAgB;IAC/B,qEAAqE;IACrE,MAAM,EAAE,QAAQ,CAAC;IACjB;;;;OAIG;IACH,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACrC,gBAAgB,CA6ClB"}
|
package/dist/remote-files.js
CHANGED
|
@@ -108,6 +108,10 @@ export function buildRemoteFileCommand(remote, shellCommand) {
|
|
|
108
108
|
* `echo` (which land before the script runs) from the records without any "last N
|
|
109
109
|
* lines" guesswork. `realPath` is the last field, so a `|` in a path still parses.
|
|
110
110
|
*
|
|
111
|
+
* A path starting with `~/` is taken relative to the remote user's `$HOME`: this
|
|
112
|
+
* server does not know that home, and a clicked `~/…` link means the host the
|
|
113
|
+
* session runs on. The record's `realPath` is absolute, as for any other path.
|
|
114
|
+
*
|
|
111
115
|
* Symlink resolution is portable AND fails closed. `readlink -f` where available
|
|
112
116
|
* (Linux, macOS >= 12.3); otherwise the fallback canonicalizes the directory chain
|
|
113
117
|
* with `cd -P`/`pwd -P` and then follows the LAST component with plain `readlink`
|
|
@@ -139,6 +143,8 @@ export function buildRemoteProbeCommand(paths) {
|
|
|
139
143
|
'probe() {',
|
|
140
144
|
' i=$1',
|
|
141
145
|
' p=$2',
|
|
146
|
+
// `~/…` from a clicked link: THIS host's home (assignment, so no word splitting).
|
|
147
|
+
" case $p in '~/'*) p=$HOME/${p#??} ;; esac",
|
|
142
148
|
` if [ ! -e "$p" ]; then printf '%s|${NOT_FOUND_MARKER}\\0' "$i"; return; fi`,
|
|
143
149
|
` r=$(readlink -f "$p" 2>/dev/null) || r=$(resolve_last "$p") || { printf '%s|${UNRESOLVABLE_MARKER}\\0' "$i"; return; }`,
|
|
144
150
|
` [ -n "$r" ] || { printf '%s|${UNRESOLVABLE_MARKER}\\0' "$i"; return; }`,
|
|
@@ -233,6 +239,103 @@ export async function remoteProbePaths(remote, paths) {
|
|
|
233
239
|
}
|
|
234
240
|
return results;
|
|
235
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* List one remote folder in a SINGLE ssh round trip: its canonical path, then every
|
|
244
|
+
* non-hidden subfolder and every regular file (symlinks followed) whose name ends in
|
|
245
|
+
* one of `extensions` (any case), up to `maxEntries`.
|
|
246
|
+
*
|
|
247
|
+
* Same output discipline as {@link buildRemoteProbeCommand}: a lone NUL first (so rc
|
|
248
|
+
* chatter before it is discarded), then NUL-terminated records — `E|n` (no such
|
|
249
|
+
* folder), `E|x` (cannot be canonicalized), `D|<dir>`, `d|0|0|<name>`,
|
|
250
|
+
* `f|<size>|<mtime>|<name>`, and `T|` when the cap cut the listing. The name is the
|
|
251
|
+
* last field, so a `|` in it still parses, and NUL is the one byte a filename cannot
|
|
252
|
+
* hold. A leading `~/` is the remote user's `$HOME`, as in the probe.
|
|
253
|
+
*/
|
|
254
|
+
export function buildRemoteFolderListCommand(dir, extensions, maxEntries) {
|
|
255
|
+
// `[pP][nN][gG]`: any case, as the local listing compares lowercased (`shot.Png`).
|
|
256
|
+
const patterns = [...new Set(extensions.map((ext) => ext.toLowerCase()))]
|
|
257
|
+
.map((ext) => `*.${ext.replace(/[a-z]/g, (c) => `[${c}${c.toUpperCase()}]`)}`)
|
|
258
|
+
.join('|');
|
|
259
|
+
const script = [
|
|
260
|
+
`d=${shellescape(dir)}`,
|
|
261
|
+
"case $d in '~/'*) d=$HOME/${d#??} ;; esac",
|
|
262
|
+
"printf '\\0'",
|
|
263
|
+
'[ -d "$d" ] || { [ -e "$d" ] && printf \'E|f\\0\' || printf \'E|n\\0\'; exit 0; }',
|
|
264
|
+
'r=$(cd -P "$d" 2>/dev/null && pwd -P) || { printf \'E|x\\0\'; exit 0; }',
|
|
265
|
+
'printf \'D|%s\\0\' "$r"',
|
|
266
|
+
'n=0',
|
|
267
|
+
'for f in "$r"/*; do',
|
|
268
|
+
' [ -e "$f" ] || continue',
|
|
269
|
+
` [ "$n" -lt ${Math.max(1, Math.floor(maxEntries))} ] || { printf 'T|\\0'; break; }`,
|
|
270
|
+
' b=${f##*/}',
|
|
271
|
+
' if [ -d "$f" ]; then n=$((n + 1)); printf \'d|0|0|%s\\0\' "$b"; continue; fi',
|
|
272
|
+
' [ -f "$f" ] || continue',
|
|
273
|
+
` case $b in ${patterns || '*.__none__'}) ;; *) continue ;; esac`,
|
|
274
|
+
" sm=$(stat -L -c '%s %Y' \"$f\" 2>/dev/null || stat -L -f '%z %m' \"$f\" 2>/dev/null) || sm='0 0'",
|
|
275
|
+
' n=$((n + 1))',
|
|
276
|
+
' printf \'f|%s|%s|%s\\0\' "${sm% *}" "${sm#* }" "$b"',
|
|
277
|
+
'done',
|
|
278
|
+
].join('\n');
|
|
279
|
+
// ⚠️ sshd runs the command in the remote user's LOGIN shell, rc aliases included.
|
|
280
|
+
// On Hufflepuff `cd` is an alias that echoes the new directory (`$(cd -P "$d" &&
|
|
281
|
+
// pwd -P)` came back as two lines, then zsh aborted on the glob: "no matches found:
|
|
282
|
+
// /x\n/x/*"), so no folder listing worked over ssh. An explicit `sh` reads no rc
|
|
283
|
+
// file — the same wrapper the transcript read uses.
|
|
284
|
+
return `sh -c ${shellescape(script)}`;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Parse {@link buildRemoteFolderListCommand} output: null when nothing exists there
|
|
288
|
+
* (or it cannot be resolved), `'not-a-folder'` when it is a file.
|
|
289
|
+
*/
|
|
290
|
+
export function parseRemoteFolderListOutput(stdout) {
|
|
291
|
+
const records = stdout.split('\0').slice(1);
|
|
292
|
+
let dir = null;
|
|
293
|
+
let truncated = false;
|
|
294
|
+
const entries = [];
|
|
295
|
+
for (const record of records) {
|
|
296
|
+
if (record === 'E|f')
|
|
297
|
+
return 'not-a-folder';
|
|
298
|
+
if (record.startsWith('E|'))
|
|
299
|
+
return null;
|
|
300
|
+
if (record.startsWith('D|')) {
|
|
301
|
+
dir = record.slice(2);
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
if (record === 'T|') {
|
|
305
|
+
truncated = true;
|
|
306
|
+
continue;
|
|
307
|
+
}
|
|
308
|
+
const match = /^([fd])\|(\d*)\|(\d*)\|([\s\S]+)$/.exec(record);
|
|
309
|
+
if (!match)
|
|
310
|
+
continue;
|
|
311
|
+
const size = Number.parseInt(match[2], 10);
|
|
312
|
+
const mtime = Number.parseInt(match[3], 10);
|
|
313
|
+
entries.push({
|
|
314
|
+
kind: match[1] === 'd' ? 'directory' : 'file',
|
|
315
|
+
name: match[4],
|
|
316
|
+
size: Number.isFinite(size) && size > 0 ? size : 0,
|
|
317
|
+
mtimeMs: Number.isFinite(mtime) && mtime > 0 ? mtime * 1000 : 0,
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
if (!dir) {
|
|
321
|
+
throw new RemoteFileAccessError('remote host returned no usable folder listing');
|
|
322
|
+
}
|
|
323
|
+
return { dir, entries, truncated };
|
|
324
|
+
}
|
|
325
|
+
/** List a remote folder (see {@link buildRemoteFolderListCommand}). */
|
|
326
|
+
export async function remoteListFolder(remote, dir, extensions, maxEntries) {
|
|
327
|
+
assertNotUnderTest();
|
|
328
|
+
const command = buildRemoteFileCommand(remote, buildRemoteFolderListCommand(dir, extensions, maxEntries));
|
|
329
|
+
let stdout;
|
|
330
|
+
try {
|
|
331
|
+
const result = await runWithRemoteSshLimit(() => execAsync(command, { timeout: REMOTE_PROBE_TIMEOUT_MS, maxBuffer: 4 * 1024 * 1024 }));
|
|
332
|
+
stdout = result.stdout;
|
|
333
|
+
}
|
|
334
|
+
catch (err) {
|
|
335
|
+
throw new RemoteFileAccessError(`remote host ${remote.label || remote.host} unreachable: ${describeExecError(err)}`);
|
|
336
|
+
}
|
|
337
|
+
return parseRemoteFolderListOutput(stdout);
|
|
338
|
+
}
|
|
236
339
|
/** Read a whole remote file into memory, capped by `maxBytes`. */
|
|
237
340
|
export async function remoteReadFile(remote, remotePath, maxBytes) {
|
|
238
341
|
assertNotUnderTest();
|
package/dist/remote-files.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-files.js","sourceRoot":"","sources":["../src/remote-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAiB,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAA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AAM,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,YAAY,MAAM,CAAC,IAAI,EAAE,CAAC;QACtE,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,6BAA6B,MAAM,CAAC,IAAI,GAAG,CAAC;IAC1F,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Scrollback of a remote SSH session, read from the REMOTE tmux.
|
|
3
|
+
*
|
|
4
|
+
* A remote session's local pane runs `ssh -t … tmux new-session -A` (or `attach`),
|
|
5
|
+
* so the local tmux only ever sees what the remote tmux CLIENT draws: full-screen
|
|
6
|
+
* repaints, not scrolling output. The local pane therefore keeps a fraction of the
|
|
7
|
+
* history (measured: 48 of 279 lines while output streamed, none after a reattach),
|
|
8
|
+
* while the remote pane, where the shell really runs, keeps all of it. A full-history
|
|
9
|
+
* load of a remote session reads the scrollback from there instead, and the caller
|
|
10
|
+
* splices it above the LOCAL visible frame (`PaneCaptureOptions.scrollbackOverride`):
|
|
11
|
+
* the local pane is what the live stream keeps drawing into, so its frame and caret
|
|
12
|
+
* position are the ones the browser must end up with.
|
|
13
|
+
*
|
|
14
|
+
* ONE ssh round trip reads the remote pane's scrollback rows (`capture-pane -S -<N>
|
|
15
|
+
* -E -1`), its `#{history_size}` and its screen. The size is load-bearing: with no
|
|
16
|
+
* history at all, tmux clamps `-E -1` to the first VISIBLE row and would return it
|
|
17
|
+
* as history. The screen closes the seam between the remote read and the local
|
|
18
|
+
* frame, which is read only after the round trip: rows that scrolled in between,
|
|
19
|
+
* and the top of a remote screen taller than the local pane, are on that screen
|
|
20
|
+
* alone, and the caller keeps the screen rows above where the local frame overlaps
|
|
21
|
+
* it (`joinScrollbackAndFrame`).
|
|
22
|
+
*
|
|
23
|
+
* ⚠️ The three reads are ONE tmux command list (`a \; b \; c`), not three tmux
|
|
24
|
+
* runs. tmux runs a client's command list back to back without reading pane output
|
|
25
|
+
* in between, so the history ends exactly where the screen begins. As separate runs
|
|
26
|
+
* the shell kept writing between them, and the rows that scrolled in those
|
|
27
|
+
* milliseconds were in neither capture (measured on a busy pane: every read lost
|
|
28
|
+
* rows). This rests on how tmux's command queue behaves, not on a documented
|
|
29
|
+
* guarantee. tmux output cannot carry the NUL markers, so a random marker line
|
|
30
|
+
* printed by `display-message` separates the history from the size and screen.
|
|
31
|
+
* tmux before 3.2 prints no newline after `capture-pane -p`, so the marker can be
|
|
32
|
+
* glued onto an unterminated last history row; the parser accepts it there too.
|
|
33
|
+
*
|
|
34
|
+
* Bounded and fail-soft. Any failure (unreachable host, auth, missing session, odd
|
|
35
|
+
* output) returns null and the caller keeps the local capture, so a remote load is
|
|
36
|
+
* never worse than before. A transport failure also starts a short per-host back-off,
|
|
37
|
+
* so a host that is asleep costs one timeout, not one per tab switch. The child runs
|
|
38
|
+
* under the shared remote-ssh limiter (`remote-ssh-limiter.ts`) like every other
|
|
39
|
+
* short-lived remote ssh, but gives up on a slot it waited too long for (`maxWaitMs`,
|
|
40
|
+
* enforced in the queue), and the connection options come from
|
|
41
|
+
* `buildSshConnectionArgs()`.
|
|
42
|
+
*
|
|
43
|
+
* How much history exists is the REMOTE tmux's `history-limit` (2000 lines unless
|
|
44
|
+
* the remote user's tmux.conf raises it); the launch command does not set it.
|
|
45
|
+
*/
|
|
46
|
+
import type { SessionRemote } from './types/session.js';
|
|
47
|
+
/** The remote `tail -c` bound for a configured byte cap; 0 (unbounded) stays 0. */
|
|
48
|
+
export declare function remoteTailBytes(maxBytes: number): number;
|
|
49
|
+
/**
|
|
50
|
+
* A fresh marker line for one read. Random, so no row the pane really holds can be
|
|
51
|
+
* taken for it.
|
|
52
|
+
*/
|
|
53
|
+
export declare function newScrollbackMarker(): string;
|
|
54
|
+
/**
|
|
55
|
+
* The remote shell script. It prints a NUL, the tmux output, then a second NUL:
|
|
56
|
+
* the first separates a login banner or an rc-file `echo` printed before the
|
|
57
|
+
* script runs without guessing (the same marker `buildRemoteProbeCommand` uses),
|
|
58
|
+
* and both are printed whether or not tmux succeeds, so their presence says the
|
|
59
|
+
* script ran on the host. The tmux output is the history rows, `marker`, the
|
|
60
|
+
* history size, then the screen rows.
|
|
61
|
+
*/
|
|
62
|
+
export declare function buildRemoteScrollbackScript(socket: string, sessionName: string, historyLines: number, tailBytes: number, marker: string): string;
|
|
63
|
+
/** The full ssh command line for {@link buildRemoteScrollbackScript}. */
|
|
64
|
+
export declare function buildRemoteScrollbackCommand(remote: SessionRemote, sessionId: string, historyLines: number, tailBytes: number, marker: string): string;
|
|
65
|
+
/** What one round trip read from the remote pane: its scrollback rows, then its screen. */
|
|
66
|
+
export interface RemoteScrollback {
|
|
67
|
+
/** History rows above the screen, oldest first; '' when the pane has none. */
|
|
68
|
+
scrollback: string;
|
|
69
|
+
/** The screen's rows, read in the same tmux command list, so they begin where the scrollback ends. */
|
|
70
|
+
screen: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The scrollback and screen rows from the script's stdout, or null when the
|
|
74
|
+
* output is not the script's or tmux printed nothing usable (no such session,
|
|
75
|
+
* or a byte cap so small it cut into the screen). The marker may end an
|
|
76
|
+
* unterminated history row (tmux before 3.2); when the output reached
|
|
77
|
+
* `tailBytes`, the history's partial first row is dropped.
|
|
78
|
+
*/
|
|
79
|
+
export declare function parseRemoteScrollbackOutput(stdout: string, marker: string, tailBytes: number): RemoteScrollback | null;
|
|
80
|
+
/** Runs the ssh command line and resolves its stdout; rejects like `exec` does. */
|
|
81
|
+
export type RemoteScrollbackRunner = (command: string, opts: {
|
|
82
|
+
timeout: number;
|
|
83
|
+
maxBuffer: number;
|
|
84
|
+
}) => Promise<string>;
|
|
85
|
+
/**
|
|
86
|
+
* Read a remote session's scrollback from the remote tmux, or null to keep the
|
|
87
|
+
* local capture. Never throws.
|
|
88
|
+
*
|
|
89
|
+
* Only a TRANSPORT failure backs the host off (ssh's own exit 255, a timeout, a
|
|
90
|
+
* spawn error, output that is not the script's): those say the host is
|
|
91
|
+
* unreachable for every session on it. A remote command failing (a session
|
|
92
|
+
* that is gone: tmux answers nothing between the NULs, and the closing `printf`
|
|
93
|
+
* hides its exit status) is about this session only, so it returns
|
|
94
|
+
* null and the next session on that host still tries. Same split as
|
|
95
|
+
* `classifyRemoteAliveExit()`.
|
|
96
|
+
*
|
|
97
|
+
* `run` is a test seam: without it nothing runs under vitest, as in
|
|
98
|
+
* remote-files.ts / remote-hosts.ts.
|
|
99
|
+
*/
|
|
100
|
+
export declare function fetchRemoteScrollback(remote: SessionRemote, sessionId: string, historyLines: number, maxBytes: number, run?: RemoteScrollbackRunner): Promise<RemoteScrollback | null>;
|
|
101
|
+
/** Test hook: forget every host back-off. */
|
|
102
|
+
export declare function resetRemoteScrollbackBackoff(): void;
|
|
103
|
+
//# sourceMappingURL=remote-pane-history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-pane-history.d.ts","sourceRoot":"","sources":["../src/remote-pane-history.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAsCxD,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExD;AAWD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,MAAM,CAqBR;AAED,yEAAyE;AACzE,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,MAAM,CAKR;AAED,2FAA2F;AAC3F,MAAM,WAAW,gBAAgB;IAC/B,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,sGAAsG;IACtG,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,gBAAgB,GAAG,IAAI,CAgCzB;AAED,mFAAmF;AACnF,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAKxH;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,sBAAsB,GAC3B,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAuDlC;AAED,6CAA6C;AAC7C,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD"}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Scrollback of a remote SSH session, read from the REMOTE tmux.
|
|
3
|
+
*
|
|
4
|
+
* A remote session's local pane runs `ssh -t … tmux new-session -A` (or `attach`),
|
|
5
|
+
* so the local tmux only ever sees what the remote tmux CLIENT draws: full-screen
|
|
6
|
+
* repaints, not scrolling output. The local pane therefore keeps a fraction of the
|
|
7
|
+
* history (measured: 48 of 279 lines while output streamed, none after a reattach),
|
|
8
|
+
* while the remote pane, where the shell really runs, keeps all of it. A full-history
|
|
9
|
+
* load of a remote session reads the scrollback from there instead, and the caller
|
|
10
|
+
* splices it above the LOCAL visible frame (`PaneCaptureOptions.scrollbackOverride`):
|
|
11
|
+
* the local pane is what the live stream keeps drawing into, so its frame and caret
|
|
12
|
+
* position are the ones the browser must end up with.
|
|
13
|
+
*
|
|
14
|
+
* ONE ssh round trip reads the remote pane's scrollback rows (`capture-pane -S -<N>
|
|
15
|
+
* -E -1`), its `#{history_size}` and its screen. The size is load-bearing: with no
|
|
16
|
+
* history at all, tmux clamps `-E -1` to the first VISIBLE row and would return it
|
|
17
|
+
* as history. The screen closes the seam between the remote read and the local
|
|
18
|
+
* frame, which is read only after the round trip: rows that scrolled in between,
|
|
19
|
+
* and the top of a remote screen taller than the local pane, are on that screen
|
|
20
|
+
* alone, and the caller keeps the screen rows above where the local frame overlaps
|
|
21
|
+
* it (`joinScrollbackAndFrame`).
|
|
22
|
+
*
|
|
23
|
+
* ⚠️ The three reads are ONE tmux command list (`a \; b \; c`), not three tmux
|
|
24
|
+
* runs. tmux runs a client's command list back to back without reading pane output
|
|
25
|
+
* in between, so the history ends exactly where the screen begins. As separate runs
|
|
26
|
+
* the shell kept writing between them, and the rows that scrolled in those
|
|
27
|
+
* milliseconds were in neither capture (measured on a busy pane: every read lost
|
|
28
|
+
* rows). This rests on how tmux's command queue behaves, not on a documented
|
|
29
|
+
* guarantee. tmux output cannot carry the NUL markers, so a random marker line
|
|
30
|
+
* printed by `display-message` separates the history from the size and screen.
|
|
31
|
+
* tmux before 3.2 prints no newline after `capture-pane -p`, so the marker can be
|
|
32
|
+
* glued onto an unterminated last history row; the parser accepts it there too.
|
|
33
|
+
*
|
|
34
|
+
* Bounded and fail-soft. Any failure (unreachable host, auth, missing session, odd
|
|
35
|
+
* output) returns null and the caller keeps the local capture, so a remote load is
|
|
36
|
+
* never worse than before. A transport failure also starts a short per-host back-off,
|
|
37
|
+
* so a host that is asleep costs one timeout, not one per tab switch. The child runs
|
|
38
|
+
* under the shared remote-ssh limiter (`remote-ssh-limiter.ts`) like every other
|
|
39
|
+
* short-lived remote ssh, but gives up on a slot it waited too long for (`maxWaitMs`,
|
|
40
|
+
* enforced in the queue), and the connection options come from
|
|
41
|
+
* `buildSshConnectionArgs()`.
|
|
42
|
+
*
|
|
43
|
+
* How much history exists is the REMOTE tmux's `history-limit` (2000 lines unless
|
|
44
|
+
* the remote user's tmux.conf raises it); the launch command does not set it.
|
|
45
|
+
*/
|
|
46
|
+
import { exec } from 'node:child_process';
|
|
47
|
+
import { randomBytes } from 'node:crypto';
|
|
48
|
+
import { promisify } from 'node:util';
|
|
49
|
+
import { buildSshConnectionArgs, classifyRemoteAliveExit, remoteSshTarget, shellescape } from './remote-hosts.js';
|
|
50
|
+
import { RemoteSshSlotTimeoutError, runWithRemoteSshLimit } from './remote-ssh-limiter.js';
|
|
51
|
+
import { remoteTmuxLocation } from './tmux-manager.js';
|
|
52
|
+
const execAsync = promisify(exec);
|
|
53
|
+
/**
|
|
54
|
+
* Bound on the whole round trip. A full load waits on it, so it is far below the
|
|
55
|
+
* 10 s `ConnectTimeout` the shared ssh options carry: past this the local capture
|
|
56
|
+
* is the better answer.
|
|
57
|
+
*/
|
|
58
|
+
const REMOTE_HISTORY_TIMEOUT_MS = 5_000;
|
|
59
|
+
/**
|
|
60
|
+
* Longest a load waits for a slot in the shared ssh pool, which file previews and
|
|
61
|
+
* attachment probes (20 s each) also hold. Past it the local capture is used.
|
|
62
|
+
*/
|
|
63
|
+
const REMOTE_HISTORY_SLOT_WAIT_MS = 1_500;
|
|
64
|
+
/** After a failed read, skip that host for this long and use the local capture. */
|
|
65
|
+
const REMOTE_HISTORY_BACKOFF_MS = 30_000;
|
|
66
|
+
/**
|
|
67
|
+
* Headroom over the remote `tail -c` bound for what it does not cover: the two NUL
|
|
68
|
+
* markers and anything a login banner or rc file prints before the script.
|
|
69
|
+
*/
|
|
70
|
+
const REMOTE_HISTORY_SLACK_BYTES = 64 * 1024;
|
|
71
|
+
/**
|
|
72
|
+
* Added to the configured byte cap for the remote `tail -c` bound. That bound
|
|
73
|
+
* covers the whole tmux output, and the marker, the size and the screen come last
|
|
74
|
+
* (a wide, tall screen of colored rows runs to a few hundred KB); without this, a
|
|
75
|
+
* small cap would cut into the screen and lose the read. The route trims what it
|
|
76
|
+
* returns to the configured cap anyway, keeping the newest bytes.
|
|
77
|
+
*/
|
|
78
|
+
const REMOTE_SCREEN_ALLOWANCE_BYTES = 1024 * 1024;
|
|
79
|
+
/** The remote `tail -c` bound for a configured byte cap; 0 (unbounded) stays 0. */
|
|
80
|
+
export function remoteTailBytes(maxBytes) {
|
|
81
|
+
return maxBytes > 0 ? Math.trunc(maxBytes) + REMOTE_SCREEN_ALLOWANCE_BYTES : 0;
|
|
82
|
+
}
|
|
83
|
+
/** Read ceiling when the configured byte cap is 0 (unbounded) and no `tail -c` runs. */
|
|
84
|
+
const UNBOUNDED_READ_MAX_BYTES = 64 * 1024 * 1024;
|
|
85
|
+
/**
|
|
86
|
+
* Host id → time the back-off ends. Keyed by HOST, so a sleeping host with five
|
|
87
|
+
* sessions costs one timeout, and the map is bounded by the configured hosts.
|
|
88
|
+
*/
|
|
89
|
+
const backoffUntil = new Map();
|
|
90
|
+
/**
|
|
91
|
+
* A fresh marker line for one read. Random, so no row the pane really holds can be
|
|
92
|
+
* taken for it.
|
|
93
|
+
*/
|
|
94
|
+
export function newScrollbackMarker() {
|
|
95
|
+
return `codeman-history-${randomBytes(8).toString('hex')}`;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The remote shell script. It prints a NUL, the tmux output, then a second NUL:
|
|
99
|
+
* the first separates a login banner or an rc-file `echo` printed before the
|
|
100
|
+
* script runs without guessing (the same marker `buildRemoteProbeCommand` uses),
|
|
101
|
+
* and both are printed whether or not tmux succeeds, so their presence says the
|
|
102
|
+
* script ran on the host. The tmux output is the history rows, `marker`, the
|
|
103
|
+
* history size, then the screen rows.
|
|
104
|
+
*/
|
|
105
|
+
export function buildRemoteScrollbackScript(socket, sessionName, historyLines, tailBytes, marker) {
|
|
106
|
+
// `=name:` is an EXACT session match, then its active pane. A bare name is
|
|
107
|
+
// read as a pane index or window name first, so a discovered session named
|
|
108
|
+
// `0` would capture some other session's pane.
|
|
109
|
+
const target = shellescape(`=${sessionName}:`);
|
|
110
|
+
const lines = Math.max(1, Math.trunc(historyLines));
|
|
111
|
+
// The newest rows are the ones worth keeping, so the byte bound is applied on
|
|
112
|
+
// the remote side (`tail -c`) rather than by killing the read at maxBuffer.
|
|
113
|
+
// It covers the whole tmux output, history first, so with the screen
|
|
114
|
+
// allowance in `remoteTailBytes()` a cut lands in the history. 0 means
|
|
115
|
+
// unbounded, as in the route.
|
|
116
|
+
const bound = tailBytes > 0 ? ` | tail -c ${Math.trunc(tailBytes)}` : '';
|
|
117
|
+
// ONE tmux command list, so no pane output is read between the history and
|
|
118
|
+
// the screen (see the @fileoverview). `\;` reaches tmux as a lone `;`.
|
|
119
|
+
return (`printf '\\0'; tmux -L ${shellescape(socket)} ` +
|
|
120
|
+
`capture-pane -p -e -J -S -${lines} -E -1 -t ${target} \\; ` +
|
|
121
|
+
`display-message -p -t ${target} ${shellescape(marker)} \\; ` +
|
|
122
|
+
`display-message -p -t ${target} '#{history_size}' \\; ` +
|
|
123
|
+
`capture-pane -p -e -J -t ${target}${bound}; printf '\\0'`);
|
|
124
|
+
}
|
|
125
|
+
/** The full ssh command line for {@link buildRemoteScrollbackScript}. */
|
|
126
|
+
export function buildRemoteScrollbackCommand(remote, sessionId, historyLines, tailBytes, marker) {
|
|
127
|
+
const { socket, sessionName } = remoteTmuxLocation(remote, sessionId);
|
|
128
|
+
const script = buildRemoteScrollbackScript(socket, sessionName, historyLines, tailBytes, marker);
|
|
129
|
+
// `exec` so a timeout kill reaches ssh itself, not only the local `sh -c`.
|
|
130
|
+
return ['exec', ...buildSshConnectionArgs(remote), remoteSshTarget(remote), shellescape(script)].join(' ');
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* The scrollback and screen rows from the script's stdout, or null when the
|
|
134
|
+
* output is not the script's or tmux printed nothing usable (no such session,
|
|
135
|
+
* or a byte cap so small it cut into the screen). The marker may end an
|
|
136
|
+
* unterminated history row (tmux before 3.2); when the output reached
|
|
137
|
+
* `tailBytes`, the history's partial first row is dropped.
|
|
138
|
+
*/
|
|
139
|
+
export function parseRemoteScrollbackOutput(stdout, marker, tailBytes) {
|
|
140
|
+
const start = stdout.indexOf('\0');
|
|
141
|
+
if (start === -1)
|
|
142
|
+
return null;
|
|
143
|
+
const end = stdout.indexOf('\0', start + 1);
|
|
144
|
+
if (end === -1)
|
|
145
|
+
return null;
|
|
146
|
+
// The marker ends a row, after the history's last row. Usually it is a row of
|
|
147
|
+
// its own, but tmux before 3.2 prints no newline after `capture-pane -p`, so
|
|
148
|
+
// when the history ends inside a wrapped line (`-J` leaves it unterminated)
|
|
149
|
+
// the marker is glued onto that row. It is random per read, so no row the
|
|
150
|
+
// pane really holds ends with it.
|
|
151
|
+
const markerRow = `${marker}\n`;
|
|
152
|
+
const raw = stdout.slice(start + 1, end);
|
|
153
|
+
const at = raw.indexOf(markerRow);
|
|
154
|
+
if (at === -1)
|
|
155
|
+
return null;
|
|
156
|
+
const sizeStart = at + markerRow.length;
|
|
157
|
+
const sizeEnd = raw.indexOf('\n', sizeStart);
|
|
158
|
+
if (sizeEnd === -1)
|
|
159
|
+
return null;
|
|
160
|
+
const sizeText = raw.slice(sizeStart, sizeEnd).trim();
|
|
161
|
+
if (!/^\d+$/.test(sizeText))
|
|
162
|
+
return null;
|
|
163
|
+
const screen = raw.slice(sizeEnd + 1);
|
|
164
|
+
// With no history at all, tmux clamps `-E -1` to the first visible row.
|
|
165
|
+
if (Number(sizeText) === 0)
|
|
166
|
+
return { scrollback: '', screen };
|
|
167
|
+
// A tail -c cut lands in the history (the bound leaves room for the rest),
|
|
168
|
+
// mid-row and possibly mid-escape, so the first, partial row is dropped. A
|
|
169
|
+
// cut exactly on the marker row leaves no history at all.
|
|
170
|
+
let scrollback = raw.slice(0, at);
|
|
171
|
+
if (tailBytes > 0 && Buffer.byteLength(raw, 'utf-8') >= tailBytes) {
|
|
172
|
+
const newline = scrollback.indexOf('\n');
|
|
173
|
+
scrollback = newline === -1 ? '' : scrollback.slice(newline + 1);
|
|
174
|
+
}
|
|
175
|
+
if (scrollback !== '' && !scrollback.endsWith('\n'))
|
|
176
|
+
scrollback += '\n';
|
|
177
|
+
return { scrollback, screen };
|
|
178
|
+
}
|
|
179
|
+
const execRunner = async (command, opts) => (await execAsync(command, { encoding: 'utf-8', ...opts })).stdout;
|
|
180
|
+
/**
|
|
181
|
+
* Read a remote session's scrollback from the remote tmux, or null to keep the
|
|
182
|
+
* local capture. Never throws.
|
|
183
|
+
*
|
|
184
|
+
* Only a TRANSPORT failure backs the host off (ssh's own exit 255, a timeout, a
|
|
185
|
+
* spawn error, output that is not the script's): those say the host is
|
|
186
|
+
* unreachable for every session on it. A remote command failing (a session
|
|
187
|
+
* that is gone: tmux answers nothing between the NULs, and the closing `printf`
|
|
188
|
+
* hides its exit status) is about this session only, so it returns
|
|
189
|
+
* null and the next session on that host still tries. Same split as
|
|
190
|
+
* `classifyRemoteAliveExit()`.
|
|
191
|
+
*
|
|
192
|
+
* `run` is a test seam: without it nothing runs under vitest, as in
|
|
193
|
+
* remote-files.ts / remote-hosts.ts.
|
|
194
|
+
*/
|
|
195
|
+
export async function fetchRemoteScrollback(remote, sessionId, historyLines, maxBytes, run) {
|
|
196
|
+
if (!run && process.env.VITEST)
|
|
197
|
+
return null;
|
|
198
|
+
const runner = run ?? execRunner;
|
|
199
|
+
const until = backoffUntil.get(remote.hostId);
|
|
200
|
+
if (until !== undefined) {
|
|
201
|
+
if (Date.now() < until)
|
|
202
|
+
return null;
|
|
203
|
+
backoffUntil.delete(remote.hostId);
|
|
204
|
+
}
|
|
205
|
+
const marker = newScrollbackMarker();
|
|
206
|
+
const tailBytes = remoteTailBytes(maxBytes);
|
|
207
|
+
const command = buildRemoteScrollbackCommand(remote, sessionId, historyLines, tailBytes, marker);
|
|
208
|
+
try {
|
|
209
|
+
const stdout = await runWithRemoteSshLimit(() => runner(command, {
|
|
210
|
+
timeout: REMOTE_HISTORY_TIMEOUT_MS,
|
|
211
|
+
maxBuffer: (tailBytes > 0 ? tailBytes : UNBOUNDED_READ_MAX_BYTES) + REMOTE_HISTORY_SLACK_BYTES,
|
|
212
|
+
}),
|
|
213
|
+
// The pool is shared with 20 s file probes; past this the local capture
|
|
214
|
+
// is the better answer than waiting behind them.
|
|
215
|
+
{ maxWaitMs: REMOTE_HISTORY_SLOT_WAIT_MS });
|
|
216
|
+
const parsed = parseRemoteScrollbackOutput(stdout, marker, tailBytes);
|
|
217
|
+
if (parsed === null) {
|
|
218
|
+
// Both NULs arrived, so the script ran on the host and only tmux had
|
|
219
|
+
// nothing to say: no such session. The script's last command is the
|
|
220
|
+
// closing `printf`, so this comes back as exit 0 rather than tmux's
|
|
221
|
+
// exit 1, and it is about this session alone. Output without the NULs
|
|
222
|
+
// is not the script's at all, which says the host is not answering as
|
|
223
|
+
// expected.
|
|
224
|
+
const parts = stdout.split('\0');
|
|
225
|
+
const ranOnHost = parts.length >= 3;
|
|
226
|
+
if (!ranOnHost)
|
|
227
|
+
backoffUntil.set(remote.hostId, Date.now() + REMOTE_HISTORY_BACKOFF_MS);
|
|
228
|
+
// tmux printed something, but not the marker, size and screen in order.
|
|
229
|
+
const unreadable = ranOnHost && parts[1] !== '';
|
|
230
|
+
const what = !ranOnHost
|
|
231
|
+
? 'unexpected output'
|
|
232
|
+
: unreadable
|
|
233
|
+
? 'unreadable remote tmux output'
|
|
234
|
+
: 'no such remote tmux session';
|
|
235
|
+
console.warn(`[remote-history] ${remote.label}: ${what}; using the local capture`);
|
|
236
|
+
return null;
|
|
237
|
+
}
|
|
238
|
+
return parsed;
|
|
239
|
+
}
|
|
240
|
+
catch (err) {
|
|
241
|
+
// A busy pool says nothing about the host.
|
|
242
|
+
if (err instanceof RemoteSshSlotTimeoutError)
|
|
243
|
+
return null;
|
|
244
|
+
const e = err;
|
|
245
|
+
const code = typeof e.code === 'number' ? e.code : null;
|
|
246
|
+
const transport = classifyRemoteAliveExit(code, e.killed === true) === undefined;
|
|
247
|
+
if (transport)
|
|
248
|
+
backoffUntil.set(remote.hostId, Date.now() + REMOTE_HISTORY_BACKOFF_MS);
|
|
249
|
+
const reason = e.killed ? 'timed out' : code !== null ? `exit ${code}` : 'failed';
|
|
250
|
+
console.warn(`[remote-history] ${remote.label}: remote scrollback read ${reason}; using the local capture`);
|
|
251
|
+
return null;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
/** Test hook: forget every host back-off. */
|
|
255
|
+
export function resetRemoteScrollbackBackoff() {
|
|
256
|
+
backoffUntil.clear();
|
|
257
|
+
}
|
|
258
|
+
//# sourceMappingURL=remote-pane-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-pane-history.js","sourceRoot":"","sources":["../src/remote-pane-history.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAClH,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AAElC;;;;GAIG;AACH,MAAM,yBAAyB,GAAG,KAAK,CAAC;AAExC;;;GAGG;AACH,MAAM,2BAA2B,GAAG,KAAK,CAAC;AAE1C,mFAAmF;AACnF,MAAM,yBAAyB,GAAG,MAAM,CAAC;AAEzC;;;GAGG;AACH,MAAM,0BAA0B,G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