aicodeman 1.34.0 → 1.40.0
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 +11 -0
- package/README.zh-CN.md +8 -0
- package/dist/attachment-registry.d.ts +6 -0
- package/dist/attachment-registry.d.ts.map +1 -1
- package/dist/attachment-registry.js +9 -3
- package/dist/attachment-registry.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/config/cli-registry/patterns.d.ts +6 -0
- package/dist/config/cli-registry/patterns.d.ts.map +1 -1
- package/dist/config/cli-registry/patterns.js +13 -0
- package/dist/config/cli-registry/patterns.js.map +1 -1
- package/dist/config/cli-registry/schema.d.ts +13 -0
- package/dist/config/cli-registry/schema.d.ts.map +1 -1
- package/dist/config/cli-registry/schema.js +60 -2
- 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 +175 -7
- package/dist/config/cli-registry/stock.js.map +1 -1
- package/dist/config/cli-registry/types.d.ts +93 -6
- package/dist/config/cli-registry/types.d.ts.map +1 -1
- package/dist/config/dependency-registry.d.ts +7 -0
- package/dist/config/dependency-registry.d.ts.map +1 -1
- package/dist/config/dependency-registry.js +15 -0
- package/dist/config/dependency-registry.js.map +1 -1
- package/dist/config/path-probe.d.ts +37 -0
- package/dist/config/path-probe.d.ts.map +1 -0
- package/dist/config/path-probe.js +43 -0
- package/dist/config/path-probe.js.map +1 -0
- package/dist/deepseek-route-config.d.ts +110 -0
- package/dist/deepseek-route-config.d.ts.map +1 -0
- package/dist/deepseek-route-config.js +477 -0
- package/dist/deepseek-route-config.js.map +1 -0
- package/dist/git-workspace-status.d.ts +246 -0
- package/dist/git-workspace-status.d.ts.map +1 -0
- package/dist/git-workspace-status.js +626 -0
- package/dist/git-workspace-status.js.map +1 -0
- package/dist/hooks-config.d.ts.map +1 -1
- package/dist/hooks-config.js +83 -13
- package/dist/hooks-config.js.map +1 -1
- package/dist/model-config-resolvers.d.ts +29 -0
- package/dist/model-config-resolvers.d.ts.map +1 -0
- package/dist/model-config-resolvers.js +34 -0
- package/dist/model-config-resolvers.js.map +1 -0
- package/dist/session-display-model.d.ts +110 -0
- package/dist/session-display-model.d.ts.map +1 -0
- package/dist/session-display-model.js +154 -0
- package/dist/session-display-model.js.map +1 -0
- package/dist/session.d.ts +145 -8
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +280 -35
- package/dist/session.js.map +1 -1
- package/dist/types/api.d.ts +7 -0
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/api.js.map +1 -1
- package/dist/types/session.d.ts +28 -1
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js.map +1 -1
- package/dist/types/tools.d.ts +1 -1
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/utils/bounded-path-probe.d.ts +99 -0
- package/dist/utils/bounded-path-probe.d.ts.map +1 -0
- package/dist/utils/bounded-path-probe.js +228 -0
- package/dist/utils/bounded-path-probe.js.map +1 -0
- package/dist/utils/cli-executable-resolver.d.ts +2 -0
- package/dist/utils/cli-executable-resolver.d.ts.map +1 -1
- package/dist/utils/cli-executable-resolver.js +2 -1
- package/dist/utils/cli-executable-resolver.js.map +1 -1
- package/dist/utils/deepseek-cli-resolver.d.ts +8 -0
- package/dist/utils/deepseek-cli-resolver.d.ts.map +1 -1
- package/dist/utils/deepseek-cli-resolver.js +18 -2
- package/dist/utils/deepseek-cli-resolver.js.map +1 -1
- package/dist/utils/dependency-checker.d.ts +2 -0
- package/dist/utils/dependency-checker.d.ts.map +1 -1
- package/dist/utils/dependency-checker.js +37 -9
- package/dist/utils/dependency-checker.js.map +1 -1
- package/dist/utils/index.d.ts +2 -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/web/case-path.d.ts +58 -0
- package/dist/web/case-path.d.ts.map +1 -0
- package/dist/web/case-path.js +182 -0
- package/dist/web/case-path.js.map +1 -0
- package/dist/web/launch-defaults.d.ts +22 -0
- package/dist/web/launch-defaults.d.ts.map +1 -0
- package/dist/web/launch-defaults.js +46 -0
- package/dist/web/launch-defaults.js.map +1 -0
- 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.abadc970.js +43 -0
- package/dist/web/public/app.abadc970.js.br +0 -0
- package/dist/web/public/app.abadc970.js.gz +0 -0
- package/dist/web/public/approvals-ui.js.gz +0 -0
- package/dist/web/public/{constants.d95fade9.js → constants.c0f8f9de.js} +1009 -127
- package/dist/web/public/constants.c0f8f9de.js.br +0 -0
- package/dist/web/public/constants.c0f8f9de.js.gz +0 -0
- package/dist/web/public/cron-ui.js.gz +0 -0
- package/dist/web/public/entrance-animations.js +1 -0
- package/dist/web/public/entrance-animations.js.br +0 -0
- package/dist/web/public/entrance-animations.js.gz +0 -0
- package/dist/web/public/git-status-ui.js +719 -0
- package/dist/web/public/git-status-ui.js.br +0 -0
- package/dist/web/public/git-status-ui.js.gz +0 -0
- package/dist/web/public/home-sessions.js +12 -9
- 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.a31747a9.js +2 -0
- 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.a216cf9e.js → image-input.898a538b.js} +18 -8
- 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/index.html +205 -42
- 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.gz +0 -0
- package/dist/web/public/{mobile-handlers.23a85db1.js → mobile-handlers.0ef9c311.js} +20 -0
- package/dist/web/public/mobile-handlers.0ef9c311.js.br +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.gz +0 -0
- package/dist/web/public/mobile.111b187d.css +1 -0
- 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.gz +0 -0
- package/dist/web/public/orchestrator-panel.js.gz +0 -0
- package/dist/web/public/{panels-ui.6a5898d9.js → panels-ui.4735dfc2.js} +4 -4
- package/dist/web/public/panels-ui.4735dfc2.js.br +0 -0
- package/dist/web/public/{panels-ui.6a5898d9.js.gz → panels-ui.4735dfc2.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 +229 -86
- package/dist/web/public/session-lineage.js.br +0 -0
- package/dist/web/public/session-lineage.js.gz +0 -0
- package/dist/web/public/session-ui.f731602c.js +100 -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 +97 -0
- 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-worker.js +290 -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 +555 -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/spreadsheet-xlsx-core.js +1006 -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.8ee12666.css +1 -0
- 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.gz +0 -0
- package/dist/web/public/sw.js +2 -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.065fcba4.js +1 -0
- 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.dcdc5772.js → tab-rail-resize.a5867793.js} +1 -1
- 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-keycode229-recovery.af09f99a.js +1 -0
- package/dist/web/public/terminal-keycode229-recovery.af09f99a.js.br +0 -0
- package/dist/web/public/terminal-keycode229-recovery.af09f99a.js.gz +0 -0
- package/dist/web/public/terminal-split.js +146 -649
- package/dist/web/public/terminal-split.js.br +0 -0
- package/dist/web/public/terminal-split.js.gz +0 -0
- package/dist/web/public/terminal-tile.js +1611 -0
- 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.5059b30e.js +2 -0
- 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/tile-grid.js +2684 -0
- 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.gz +0 -0
- package/dist/web/public/vendor/dompurify.min.js.gz +0 -0
- package/dist/web/public/vendor/exceljs.min.js +44 -0
- package/dist/web/public/vendor/exceljs.min.js.br +0 -0
- package/dist/web/public/vendor/exceljs.min.js.gz +0 -0
- package/dist/web/public/vendor/fflate.min.js +1 -0
- package/dist/web/public/vendor/fflate.min.js.br +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.bbb5f84c.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.c4b51eb6.js → voice-input.2342c37b.js} +64 -10
- package/dist/web/public/voice-input.2342c37b.js.br +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 +9 -1
- package/dist/web/public/webview-tabs.js.br +0 -0
- package/dist/web/public/webview-tabs.js.gz +0 -0
- package/dist/web/routes/case-routes.d.ts.map +1 -1
- package/dist/web/routes/case-routes.js +136 -18
- package/dist/web/routes/case-routes.js.map +1 -1
- package/dist/web/routes/cli-registry-routes.d.ts.map +1 -1
- package/dist/web/routes/cli-registry-routes.js +3 -1
- package/dist/web/routes/cli-registry-routes.js.map +1 -1
- package/dist/web/routes/doctor-routes.d.ts +23 -0
- package/dist/web/routes/doctor-routes.d.ts.map +1 -0
- package/dist/web/routes/doctor-routes.js +83 -0
- package/dist/web/routes/doctor-routes.js.map +1 -0
- package/dist/web/routes/file-routes.d.ts +7 -0
- package/dist/web/routes/file-routes.d.ts.map +1 -1
- package/dist/web/routes/file-routes.js +34 -4
- package/dist/web/routes/file-routes.js.map +1 -1
- package/dist/web/routes/git-status-routes.d.ts +16 -0
- package/dist/web/routes/git-status-routes.d.ts.map +1 -0
- package/dist/web/routes/git-status-routes.js +98 -0
- package/dist/web/routes/git-status-routes.js.map +1 -0
- package/dist/web/routes/index.d.ts +2 -0
- package/dist/web/routes/index.d.ts.map +1 -1
- package/dist/web/routes/index.js +2 -0
- package/dist/web/routes/index.js.map +1 -1
- package/dist/web/routes/session-routes.d.ts +18 -0
- package/dist/web/routes/session-routes.d.ts.map +1 -1
- package/dist/web/routes/session-routes.js +106 -42
- package/dist/web/routes/session-routes.js.map +1 -1
- package/dist/web/routes/status-telemetry-routes.d.ts +3 -0
- package/dist/web/routes/status-telemetry-routes.d.ts.map +1 -1
- package/dist/web/routes/status-telemetry-routes.js +12 -0
- package/dist/web/routes/status-telemetry-routes.js.map +1 -1
- package/dist/web/routes/system-routes.d.ts.map +1 -1
- package/dist/web/routes/system-routes.js +13 -0
- package/dist/web/routes/system-routes.js.map +1 -1
- package/dist/web/schemas.d.ts +28 -0
- package/dist/web/schemas.d.ts.map +1 -1
- package/dist/web/schemas.js +41 -0
- package/dist/web/schemas.js.map +1 -1
- package/dist/web/server.d.ts +5 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +35 -12
- package/dist/web/server.js.map +1 -1
- package/dist/web/session-listener-wiring.d.ts +1 -0
- package/dist/web/session-listener-wiring.d.ts.map +1 -1
- package/dist/web/session-listener-wiring.js +11 -0
- package/dist/web/session-listener-wiring.js.map +1 -1
- package/package.json +3 -1
- package/scripts/postinstall.js +16 -0
- package/skills/codeman/reference/verbs.md +3 -0
- package/dist/web/public/app.cf0db8ce.js +0 -43
- package/dist/web/public/app.cf0db8ce.js.br +0 -0
- package/dist/web/public/app.cf0db8ce.js.gz +0 -0
- package/dist/web/public/constants.d95fade9.js.br +0 -0
- package/dist/web/public/constants.d95fade9.js.gz +0 -0
- package/dist/web/public/i18n.398b8331.js +0 -1
- package/dist/web/public/i18n.398b8331.js.br +0 -0
- package/dist/web/public/i18n.398b8331.js.gz +0 -0
- package/dist/web/public/image-input.a216cf9e.js.br +0 -0
- package/dist/web/public/image-input.a216cf9e.js.gz +0 -0
- package/dist/web/public/mobile-handlers.23a85db1.js.br +0 -0
- package/dist/web/public/mobile-handlers.23a85db1.js.gz +0 -0
- package/dist/web/public/mobile.1aa4952d.css +0 -1
- package/dist/web/public/mobile.1aa4952d.css.br +0 -0
- package/dist/web/public/mobile.1aa4952d.css.gz +0 -0
- package/dist/web/public/panels-ui.6a5898d9.js.br +0 -0
- package/dist/web/public/session-ui.bf66c13b.js +0 -89
- package/dist/web/public/session-ui.bf66c13b.js.br +0 -0
- package/dist/web/public/session-ui.bf66c13b.js.gz +0 -0
- package/dist/web/public/settings-ui.331d3b1d.js +0 -97
- package/dist/web/public/settings-ui.331d3b1d.js.br +0 -0
- package/dist/web/public/settings-ui.331d3b1d.js.gz +0 -0
- package/dist/web/public/styles.8c485d26.css +0 -1
- package/dist/web/public/styles.8c485d26.css.br +0 -0
- package/dist/web/public/styles.8c485d26.css.gz +0 -0
- package/dist/web/public/tab-layout-browser.4e0ed50c.js +0 -1
- package/dist/web/public/tab-layout-browser.4e0ed50c.js.br +0 -0
- package/dist/web/public/tab-layout-browser.4e0ed50c.js.gz +0 -0
- package/dist/web/public/tab-rail-resize.dcdc5772.js.br +0 -0
- package/dist/web/public/tab-rail-resize.dcdc5772.js.gz +0 -0
- package/dist/web/public/terminal-keycode229-recovery.fb91b25b.js +0 -1
- package/dist/web/public/terminal-keycode229-recovery.fb91b25b.js.br +0 -0
- package/dist/web/public/terminal-keycode229-recovery.fb91b25b.js.gz +0 -0
- package/dist/web/public/terminal-ui.a4535311.js +0 -2
- package/dist/web/public/terminal-ui.a4535311.js.br +0 -0
- package/dist/web/public/terminal-ui.a4535311.js.gz +0 -0
- package/dist/web/public/upload.html +0 -155
- package/dist/web/public/upload.html.br +0 -0
- package/dist/web/public/upload.html.gz +0 -0
- package/dist/web/public/voice-input.c4b51eb6.js.br +0 -0
- package/dist/web/public/voice-input.c4b51eb6.js.gz +0 -0
|
@@ -113,6 +113,15 @@ export interface CliVariant {
|
|
|
113
113
|
}
|
|
114
114
|
/** The newline chord a CLI's composer reads as "insert a line break" (see `CliCapabilities.newline`). */
|
|
115
115
|
export type NewlineSequence = 'line-feed' | 'esc-enter';
|
|
116
|
+
/** The config readers `capabilities.modelDetect.configResolver` may name (src/model-config-resolvers.ts). */
|
|
117
|
+
export type ModelConfigResolverName = 'deepseek-route';
|
|
118
|
+
/**
|
|
119
|
+
* The synced App Settings keys `capabilities.launchDefaults` may name (src/web/launch-defaults.ts).
|
|
120
|
+
* A closed list rather than any settings key, so a clis.json override cannot feed an
|
|
121
|
+
* arbitrary setting onto a command line; each name must also be a `SettingsUpdateSchema`
|
|
122
|
+
* key, which the resolver's typing enforces.
|
|
123
|
+
*/
|
|
124
|
+
export type LaunchDefaultSettingKey = 'codexModel' | 'codexReasoningEffort';
|
|
116
125
|
/** The MCP config dialects `src/mcp-sync.ts` has an adapter for. */
|
|
117
126
|
export type McpConfigFormat = 'claude-json' | 'gemini-json' | 'codex-toml' | 'opencode-json' | 'antigravity-json';
|
|
118
127
|
export interface CliLaunch {
|
|
@@ -382,8 +391,8 @@ export interface CliCapabilities {
|
|
|
382
391
|
/**
|
|
383
392
|
* How many rows at the FOOT of the screen that row can appear in, counting non-blank
|
|
384
393
|
* rows only. Claude writes its chip on the last row and keeps the default; Codex pins
|
|
385
|
-
* its own above the composer, which puts it third from the bottom
|
|
386
|
-
* more. Keep each number as small as that CLI's layout allows: every extra row is
|
|
394
|
+
* its own above the composer, which puts it third or fourth from the bottom (its hint
|
|
395
|
+
* row comes and goes), so it declares more. Keep each number as small as that CLI's layout allows: every extra row is
|
|
387
396
|
* another row an agent might be able to write, and the label is what silences an
|
|
388
397
|
* alert. See `watchingLabel()` in `session-activity.ts`.
|
|
389
398
|
*/
|
|
@@ -456,11 +465,40 @@ export interface CliCapabilities {
|
|
|
456
465
|
*/
|
|
457
466
|
transcript: 'claude-jsonl' | 'codex-rollout' | 'deepseek-zstd' | 'omp-jsonl' | 'none';
|
|
458
467
|
/**
|
|
459
|
-
*
|
|
460
|
-
*
|
|
461
|
-
*
|
|
468
|
+
* What the server strips from this CLI's output stream before the browser sees it.
|
|
469
|
+
* The value encodes three independent choices (predicates in session.ts):
|
|
470
|
+
*
|
|
471
|
+
* | value | alt-screen toggles | `3J` (erase scrollback) | mouse DECSETs |
|
|
472
|
+
* |-----------------------|---------------------|-------------------------|---------------------|
|
|
473
|
+
* | `strip-full` | stripped | stripped | stripped |
|
|
474
|
+
* | `strip-mux-and-mouse` | stripped under tmux | kept | stripped under tmux |
|
|
475
|
+
* | `strip-mux-only` | stripped under tmux | kept | kept |
|
|
476
|
+
* | `preserve` | stripped under tmux | kept | kept |
|
|
477
|
+
*
|
|
478
|
+
* `strip-full` is `isAltScreenStripMode`; `strip-mux-and-mouse` is `isMuxMouseStripMode`;
|
|
479
|
+
* every other value takes `isMuxAltScreenOnlyStripMode`, so at runtime `preserve` and
|
|
480
|
+
* `strip-mux-only` are the same row — `preserve` only says what such a CLI's pane
|
|
481
|
+
* holds (terminal-owned scrollback: a shell, pi), not a different strip.
|
|
482
|
+
*
|
|
483
|
+
* - alt-screen: the tmux CLIENT emits `smcup` as its first bytes at attach, parking
|
|
484
|
+
* xterm in the scrollback-less alternate buffer; a pane program's own toggles never
|
|
485
|
+
* reach the client (tmux repaints instead). "Under tmux" means `useMux`: on a
|
|
486
|
+
* direct-PTY fallback the `?1049h` is the program's own and must stay.
|
|
487
|
+
* - `3J`: a user's `clear` is a deliberate scrollback wipe; only an Ink TUI's
|
|
488
|
+
* redraw-driven `3J` (strip-full) is noise.
|
|
489
|
+
* - mouse DECSETs: stripping them keeps a drag a local selection instead of a report
|
|
490
|
+
* to the TUI. The browser then hand-encodes clicks (`_sendSyntheticSgrTap`), gated
|
|
491
|
+
* on the `cliMouseTracking` the server records as it strips. Kept where a program's
|
|
492
|
+
* own mouse support must work in the pane (htop/vim in a shell).
|
|
493
|
+
*
|
|
494
|
+
* Stock CLIs: `strip-full` = claude, codex, gemini (Ink TUIs); `strip-mux-and-mouse` =
|
|
495
|
+
* opencode (a full-screen TUI that enables tracking itself); `strip-mux-only` =
|
|
496
|
+
* antigravity, grok, deepseek, omp; `preserve` = shell, pi.
|
|
497
|
+
*
|
|
498
|
+
* A fourth combination is the point to split this into flags; three is still cheaper
|
|
499
|
+
* as an enum.
|
|
462
500
|
*/
|
|
463
|
-
altScreen: 'strip-full' | 'strip-mux-only' | 'preserve';
|
|
501
|
+
altScreen: 'strip-full' | 'strip-mux-only' | 'strip-mux-and-mouse' | 'preserve';
|
|
464
502
|
echo: {
|
|
465
503
|
policy: 'buffer' | 'predict' | 'off';
|
|
466
504
|
/** How the local-echo overlay locates the composer row. */
|
|
@@ -496,6 +534,55 @@ export interface CliCapabilities {
|
|
|
496
534
|
source: 'flag' | 'claude-settings-file' | 'none';
|
|
497
535
|
param?: string;
|
|
498
536
|
};
|
|
537
|
+
/**
|
|
538
|
+
* Where this CLI draws the model it is running, so a session header can name it
|
|
539
|
+
* (`SessionState.displayModel`, src/session-display-model.ts).
|
|
540
|
+
*
|
|
541
|
+
* `screenLine` is the source of a regex with exactly ONE capture group, the model. It
|
|
542
|
+
* runs over the last `screenLines` non-blank rows of the pane capture the idle/working
|
|
543
|
+
* probe already takes (rows joined with `\n`, so a pattern may span them), which costs no
|
|
544
|
+
* extra tmux call and re-reads the footer at every turn transition, so an in-session
|
|
545
|
+
* `/model` switch is followed.
|
|
546
|
+
*
|
|
547
|
+
* ⚠ The rows are pane text and the agent writes most of a pane, so a pattern must anchor
|
|
548
|
+
* on chrome only this CLI draws (the row under its own composer, an effort word in its
|
|
549
|
+
* own footer format), never on a shape the agent could print in its transcript. Measured
|
|
550
|
+
* on a live pane per CLI; absent means the CLI's screen is never read for a model and
|
|
551
|
+
* the session shows its launch model, if any.
|
|
552
|
+
*
|
|
553
|
+
* `configResolver` names a reader (src/model-config-resolvers.ts) that resolves the
|
|
554
|
+
* model the CLI's own config pins, the way that CLI resolves it for the session, for
|
|
555
|
+
* while the screen names none (its status line switched off, or not drawn yet). Read
|
|
556
|
+
* once per pane start, attach or relaunch, bounded and read-only; the screen still
|
|
557
|
+
* wins whenever it names a model. A NAMED reader, like a launcher profile, so the
|
|
558
|
+
* per-CLI behaviour stays data here and code in one module.
|
|
559
|
+
*/
|
|
560
|
+
modelDetect?: {
|
|
561
|
+
screenLine?: string;
|
|
562
|
+
screenLines?: number;
|
|
563
|
+
/**
|
|
564
|
+
* Words the `screenLine` field can show when it is NOT the model (a footer whose model
|
|
565
|
+
* field is switched off shows the next field there), compared lower-cased. A field
|
|
566
|
+
* equal to the session's own working-directory basename is never the model either,
|
|
567
|
+
* for every CLI; that rule is the shared reader's, not data.
|
|
568
|
+
*/
|
|
569
|
+
rejectWords?: string[];
|
|
570
|
+
configResolver?: ModelConfigResolverName;
|
|
571
|
+
};
|
|
572
|
+
/**
|
|
573
|
+
* Synced App Settings that seed this CLI's launch params when the caller left them unset,
|
|
574
|
+
* keyed by LAUNCH PARAM name (`{ model: 'codexModel' }`), never the legacy wire name; the
|
|
575
|
+
* resolver translates through `launch.legacyConfigAliases` like every other `param`.
|
|
576
|
+
*
|
|
577
|
+
* Filled into the entry's `launch.legacyConfigField` object at create time by
|
|
578
|
+
* `applyLaunchDefaults()` (src/web/launch-defaults.ts), which re-validates each value
|
|
579
|
+
* with `SettingsUpdateSchema` and never overwrites a value the caller sent. Which
|
|
580
|
+
* launches get it is the CALLER's decision (local ones only: never remote, Docker or a
|
|
581
|
+
* custom model endpoint). `schema.ts` refuses an undeclared param, and an entry without
|
|
582
|
+
* a `legacyConfigField`, whose params would otherwise be read off the request body itself.
|
|
583
|
+
* Absent = no launch defaults.
|
|
584
|
+
*/
|
|
585
|
+
launchDefaults?: Record<string, LaunchDefaultSettingKey>;
|
|
499
586
|
/**
|
|
500
587
|
* Params a non-granted multi-user owner may not set freely, and what they are forced to.
|
|
501
588
|
* Data-driven so a CUSTOM CLI's bypass flag is clampable exactly like codex's.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/config/cli-registry/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,MAAM,CAAA;CAAE,CAAC;AAMjE,4FAA4F;AAC5F,MAAM,MAAM,WAAW,GACnB,WAAW,GACX,aAAa,GACb,SAAS,GACT,aAAa,GACb,oBAAoB;AACtB,wFAAwF;GACtF,0BAA0B;AAC5B;;;;GAIG;GACD,uBAAuB,CAAC;AAE5B;;;GAGG;AACH,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,CAAC;AAE5C,4CAA4C;AAC5C,MAAM,MAAM,IAAI,GACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GACvC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAA;CAAE,GACzC;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AAE,CAAC;IACzE;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC;CAC1B;AAMD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,mFAAmF;IACnF,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACxB,SAAS,EAAE,YAAY,CAAC;IACxB,MAAM,EAAE,SAAS,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,eAAe,CAAC;IAC9B,QAAQ,EAAE,WAAW,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,oFAAoF;IACpF,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B"}
|
|
@@ -24,6 +24,13 @@ export interface PathResolver {
|
|
|
24
24
|
* there and a false "installed" contradicts the run mode's own resolver.
|
|
25
25
|
*/
|
|
26
26
|
requireVersionMatch?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Absolute directories to probe (`<dir>/<bin>`) when `which` misses. A service (systemd,
|
|
29
|
+
* launchd) runs with a minimal PATH, so a CLI installed under `~/.local/bin` or an npm/nvm
|
|
30
|
+
* prefix is invisible to `which` while the run mode, which falls back to the registry's
|
|
31
|
+
* `discovery.searchDirs`, still finds it. Carries those dirs so the doctor agrees.
|
|
32
|
+
*/
|
|
33
|
+
searchDirs?: string[];
|
|
27
34
|
}
|
|
28
35
|
/** Resolve a Windows-installed app reachable from win32 or WSL. */
|
|
29
36
|
export interface WindowsSideResolver {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-registry.d.ts","sourceRoot":"","sources":["../../src/config/dependency-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"dependency-registry.d.ts","sourceRoot":"","sources":["../../src/config/dependency-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AAEpE;2CAC2C;AAC3C,eAAO,MAAM,eAAe,sCAAuC,CAAC;AACpE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,yDAAyD;AACzD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAaD,mEAAmE;AACnE,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,QAAQ,EAAE,YAAY,GAAG,mBAAmB,CAAC;CAC9C;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC;CACzD;AAwFD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,IAAI,cAAc,EAAE,CAoErD"}
|
|
@@ -6,11 +6,25 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module config/dependency-registry
|
|
8
8
|
*/
|
|
9
|
+
import { homedir } from 'node:os';
|
|
10
|
+
import { join } from 'node:path';
|
|
9
11
|
import { enabledClis } from './cli-registry/registry.js';
|
|
10
12
|
import { compileVersionRegex } from './cli-registry/patterns.js';
|
|
11
13
|
/** The valid `--category` filter values; single source of truth for the type, the CLI
|
|
12
14
|
* help text, and CLI input validation. */
|
|
13
15
|
export const TOOL_CATEGORIES = ['core', 'office', 'other'];
|
|
16
|
+
/**
|
|
17
|
+
* Expand a leading `~` (the only form registry `searchDirs` use). Twin of `expandHome()` in
|
|
18
|
+
* src/utils/cli-resolver.ts, copied rather than imported because importing it from config/
|
|
19
|
+
* would pull in the whole resolver chain; keep the two in step.
|
|
20
|
+
*/
|
|
21
|
+
function expandSearchDir(dir) {
|
|
22
|
+
if (dir === '~')
|
|
23
|
+
return homedir();
|
|
24
|
+
if (dir.startsWith('~/'))
|
|
25
|
+
return join(homedir(), dir.slice(2));
|
|
26
|
+
return dir;
|
|
27
|
+
}
|
|
14
28
|
const ALL = ['linux', 'darwin', 'wsl', 'win32'];
|
|
15
29
|
/**
|
|
16
30
|
* The doctor's ROW IDENTITY for a CLI, where it differs from the registry id.
|
|
@@ -84,6 +98,7 @@ function cliDependencyEntries() {
|
|
|
84
98
|
// (pi, grok, dsh): a bare `which` hit there is not evidence of the right
|
|
85
99
|
// program, so a version mismatch means MISSING rather than unknown-version.
|
|
86
100
|
requireVersionMatch: version?.requireVersionMatch,
|
|
101
|
+
searchDirs: cli.discovery.searchDirs.map(expandSearchDir),
|
|
87
102
|
},
|
|
88
103
|
},
|
|
89
104
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-registry.js","sourceRoot":"","sources":["../../src/config/dependency-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAIjE;2CAC2C;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"dependency-registry.js","sourceRoot":"","sources":["../../src/config/dependency-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAIjE;2CAC2C;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AAyBpE;;;;GAIG;AACH,SAAS,eAAe,CAAC,GAAW;IAClC,IAAI,GAAG,KAAK,GAAG;QAAE,OAAO,OAAO,EAAE,CAAC;IAClC,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/D,OAAO,GAAG,CAAC;AACb,CAAC;AAyBD,MAAM,GAAG,GAAuB,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAEpE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,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE;aACxG;YACD,WAAW,EAAE;gBACX,KAAK,EAAE,gCAAgC;gBACvC,MAAM,EAAE,sBAAsB;gBAC9B,GAAG,EAAE,gCAAgC;aACtC;SACF;QACD;YACE,EAAE,EAAE,UAAU;YACd,KAAK,EAAE,WAAW;YAClB,QAAQ,EAAE,QAAQ;YAClB,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,CAAC,kBAAkB,EAAE,YAAY,CAAC;YAC1C,SAAS,EAAE;gBACT;oBACE,KAAK,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC;oBACvB,QAAQ,EAAE;wBACR,IAAI,EAAE,cAAc;wBACpB,OAAO,EAAE,CAAC,gCAAgC,CAAC;wBAC3C,IAAI,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,WAAW,CAAC;qBACnD;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Limits for the bounded path probe (`src/utils/bounded-path-probe.ts`).
|
|
3
|
+
*
|
|
4
|
+
* A linked case can live on a network mount, and a hard mount that went away makes
|
|
5
|
+
* `stat()` wait until the mount comes back. The probe gives up on such a path after
|
|
6
|
+
* `PATH_PROBE_TIMEOUT_MS` and answers "unknown", and it stops starting new probes
|
|
7
|
+
* once `MAX_STALLED_PATH_PROBES` timed-out stats are still holding libuv threadpool
|
|
8
|
+
* workers (the pool is shared by every `fs`, `dns.lookup` and `crypto` call in the
|
|
9
|
+
* process, and holds 4 workers unless `UV_THREADPOOL_SIZE` says otherwise).
|
|
10
|
+
*
|
|
11
|
+
* Both are env-overridable, in the same style as the other config modules. A slow
|
|
12
|
+
* but healthy mount (an sshfs that needs a couple of seconds on first touch) may want
|
|
13
|
+
* a longer timeout. The stall limits follow `UV_THREADPOOL_SIZE` on their own, so a
|
|
14
|
+
* server started with a larger pool gets a higher ceiling without further setup.
|
|
15
|
+
*
|
|
16
|
+
* @module config/path-probe
|
|
17
|
+
*/
|
|
18
|
+
/** How long a caller waits for one path probe before the answer is "unknown". */
|
|
19
|
+
export declare const PATH_PROBE_TIMEOUT_MS: number;
|
|
20
|
+
/**
|
|
21
|
+
* Hard ceiling on timed-out probes left pending, for every caller, `pastCap` ones
|
|
22
|
+
* included: the threadpool size minus one, so a dead mount can never take the last
|
|
23
|
+
* worker. libuv sizes the pool from `UV_THREADPOOL_SIZE` (4 when unset). A pool of
|
|
24
|
+
* one cannot keep a worker free at all, so the ceiling never drops below one.
|
|
25
|
+
*/
|
|
26
|
+
export declare const PATH_PROBE_STALL_CEILING: number;
|
|
27
|
+
/**
|
|
28
|
+
* Timed-out probes allowed to stay pending before new BULK probes are refused
|
|
29
|
+
* (answered "unknown" without a stat). This is a backstop, not the main defence: a
|
|
30
|
+
* stalled path on a network or FUSE mount already takes the rest of that mount out
|
|
31
|
+
* of probing (a stall anywhere else takes out only the stalled path), so the cap
|
|
32
|
+
* only engages once that many UNRELATED places have stopped answering. It defaults
|
|
33
|
+
* to one below {@link PATH_PROBE_STALL_CEILING} (2 with the default pool), leaving a
|
|
34
|
+
* slot a `pastCap` probe may still use, and is never allowed above the ceiling.
|
|
35
|
+
*/
|
|
36
|
+
export declare const MAX_STALLED_PATH_PROBES: number;
|
|
37
|
+
//# sourceMappingURL=path-probe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-probe.d.ts","sourceRoot":"","sources":["../../src/config/path-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAQH,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,QAA8D,CAAC;AAEjG;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,QAAiE,CAAC;AAEvG;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,QAGnC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Limits for the bounded path probe (`src/utils/bounded-path-probe.ts`).
|
|
3
|
+
*
|
|
4
|
+
* A linked case can live on a network mount, and a hard mount that went away makes
|
|
5
|
+
* `stat()` wait until the mount comes back. The probe gives up on such a path after
|
|
6
|
+
* `PATH_PROBE_TIMEOUT_MS` and answers "unknown", and it stops starting new probes
|
|
7
|
+
* once `MAX_STALLED_PATH_PROBES` timed-out stats are still holding libuv threadpool
|
|
8
|
+
* workers (the pool is shared by every `fs`, `dns.lookup` and `crypto` call in the
|
|
9
|
+
* process, and holds 4 workers unless `UV_THREADPOOL_SIZE` says otherwise).
|
|
10
|
+
*
|
|
11
|
+
* Both are env-overridable, in the same style as the other config modules. A slow
|
|
12
|
+
* but healthy mount (an sshfs that needs a couple of seconds on first touch) may want
|
|
13
|
+
* a longer timeout. The stall limits follow `UV_THREADPOOL_SIZE` on their own, so a
|
|
14
|
+
* server started with a larger pool gets a higher ceiling without further setup.
|
|
15
|
+
*
|
|
16
|
+
* @module config/path-probe
|
|
17
|
+
*/
|
|
18
|
+
function envInt(name, fallback, min, max) {
|
|
19
|
+
const raw = parseInt(process.env[name] || '', 10);
|
|
20
|
+
if (!Number.isFinite(raw) || raw <= 0)
|
|
21
|
+
return fallback;
|
|
22
|
+
return Math.max(min, Math.min(max, raw));
|
|
23
|
+
}
|
|
24
|
+
/** How long a caller waits for one path probe before the answer is "unknown". */
|
|
25
|
+
export const PATH_PROBE_TIMEOUT_MS = envInt('CODEMAN_PATH_PROBE_TIMEOUT_MS', 1_500, 100, 60_000);
|
|
26
|
+
/**
|
|
27
|
+
* Hard ceiling on timed-out probes left pending, for every caller, `pastCap` ones
|
|
28
|
+
* included: the threadpool size minus one, so a dead mount can never take the last
|
|
29
|
+
* worker. libuv sizes the pool from `UV_THREADPOOL_SIZE` (4 when unset). A pool of
|
|
30
|
+
* one cannot keep a worker free at all, so the ceiling never drops below one.
|
|
31
|
+
*/
|
|
32
|
+
export const PATH_PROBE_STALL_CEILING = Math.max(1, (Number(process.env.UV_THREADPOOL_SIZE) || 4) - 1);
|
|
33
|
+
/**
|
|
34
|
+
* Timed-out probes allowed to stay pending before new BULK probes are refused
|
|
35
|
+
* (answered "unknown" without a stat). This is a backstop, not the main defence: a
|
|
36
|
+
* stalled path on a network or FUSE mount already takes the rest of that mount out
|
|
37
|
+
* of probing (a stall anywhere else takes out only the stalled path), so the cap
|
|
38
|
+
* only engages once that many UNRELATED places have stopped answering. It defaults
|
|
39
|
+
* to one below {@link PATH_PROBE_STALL_CEILING} (2 with the default pool), leaving a
|
|
40
|
+
* slot a `pastCap` probe may still use, and is never allowed above the ceiling.
|
|
41
|
+
*/
|
|
42
|
+
export const MAX_STALLED_PATH_PROBES = Math.min(PATH_PROBE_STALL_CEILING, envInt('CODEMAN_PATH_PROBE_MAX_STALLED', Math.max(1, PATH_PROBE_STALL_CEILING - 1), 1, 64));
|
|
43
|
+
//# sourceMappingURL=path-probe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-probe.js","sourceRoot":"","sources":["../../src/config/path-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,SAAS,MAAM,CAAC,IAAY,EAAE,QAAgB,EAAE,GAAW,EAAE,GAAW;IACtE,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;QAAE,OAAO,QAAQ,CAAC;IACvD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAC3C,CAAC;AAED,iFAAiF;AACjF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,+BAA+B,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;AAEjG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAEvG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC,GAAG,CAC7C,wBAAwB,EACxB,MAAM,CAAC,gCAAgC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,wBAAwB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAC3F,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The model a DeepSeek Harness (`dsh`) session's TUI is configured to
|
|
3
|
+
* use, read from its route config, for a session header whose screen names no model
|
|
4
|
+
* yet (the status bar's model field switched off, or not drawn yet). See
|
|
5
|
+
* `SessionState.displayModel` (src/session-display-model.ts): the screen still wins
|
|
6
|
+
* whenever it names a model, since it is what the running TUI actually uses.
|
|
7
|
+
*
|
|
8
|
+
* ## How dsh-TUI resolves its route (dsh 0.1.1-rc.2, dsh-TUI 0.10.0-beta.1)
|
|
9
|
+
*
|
|
10
|
+
* A profile is a stack of loader patch layers over an empty root, in this order
|
|
11
|
+
* (`@deepseek-ai/dsh` profile-boot): every bundle's patch layer, the profile's own
|
|
12
|
+
* `$DSH_HOME/profiles/<profile>/cordis.patch.yml`, the home-level
|
|
13
|
+
* `$DSH_HOME/cordis.patch.yml` (it outranks the profile layer), then `--patch`
|
|
14
|
+
* overlays (Codeman passes none). A patch targets a row by `id`; one whose `name`
|
|
15
|
+
* does not match the row's is skipped; every other key REPLACES the row's field
|
|
16
|
+
* whole (`applyEntryPatches`), so the last layer carrying `config` for the `dsh-tui`
|
|
17
|
+
* row defines all of it.
|
|
18
|
+
*
|
|
19
|
+
* dsh-TUI then takes its model route from that config only when it names BOTH
|
|
20
|
+
* `provider` and `model` (`lib/types/modelRoute.js`, issue #67). Anything less is
|
|
21
|
+
* dropped whole and the TUI falls back to the persisted `/model` choice, then to its
|
|
22
|
+
* own default: neither is in the config, so neither is answered here. The bundle's
|
|
23
|
+
* own row pins `provider: deepseek-official` alone, by design, so only the two user
|
|
24
|
+
* layers can pin a route; the bundle layers are not read (they resolve through the dsh
|
|
25
|
+
* installation, outside the dsh home). `settings.yaml`'s `agent-default-model` is the
|
|
26
|
+
* HEADLESS default, not the TUI's, and is never read.
|
|
27
|
+
*
|
|
28
|
+
* ## Answer nothing rather than a guess
|
|
29
|
+
*
|
|
30
|
+
* Every doubt answers null: a profile that does not compose dsh-TUI, a half-pinned
|
|
31
|
+
* route, a layer that cannot be read (unreadable, a symlink out of the dsh home, too
|
|
32
|
+
* big, a mount that does not answer), and a file this reader does not fully
|
|
33
|
+
* understand. The YAML reader below is deliberately narrow (the repo carries no YAML
|
|
34
|
+
* dependency): a top-level block sequence of patch items, plain keys, single-line
|
|
35
|
+
* plain or quoted string scalars for the values it needs, and null for anything else
|
|
36
|
+
* that could change the answer (an anchor, alias or tag such as `!!js` on such a value,
|
|
37
|
+
* a merge key, a multi-line scalar, flow or block-scalar config, duplicate keys, a
|
|
38
|
+
* scalar YAML would type as a number, boolean or null, a second document, a nested
|
|
39
|
+
* row redefining dsh-TUI).
|
|
40
|
+
*
|
|
41
|
+
* ## Never block, never write, never leak
|
|
42
|
+
*
|
|
43
|
+
* Every path is probed with the bounded `probePathKind()` before it is touched, read
|
|
44
|
+
* asynchronously with a size cap, and must resolve (realpath) inside the dsh home.
|
|
45
|
+
* Nothing is written. Only the model id leaves this module: never the provider, a
|
|
46
|
+
* base URL, a key or any other config value.
|
|
47
|
+
*
|
|
48
|
+
* Tests: `test/deepseek-route-config.test.ts`.
|
|
49
|
+
*
|
|
50
|
+
* @module deepseek-route-config
|
|
51
|
+
*/
|
|
52
|
+
/** The dsh-TUI bundle a profile must compose for its route to be read here. */
|
|
53
|
+
export declare const DSH_TUI_PACKAGE = "@deepseek-harness-tui/dsh-tui";
|
|
54
|
+
/** The loader row dsh-TUI's own config lives on. */
|
|
55
|
+
export declare const DSH_TUI_ROW_ID = "dsh-tui";
|
|
56
|
+
/** Largest file read: a patch layer is a few dozen lines. */
|
|
57
|
+
export declare const MAX_ROUTE_FILE_BYTES: number;
|
|
58
|
+
/** What one patch item does to the dsh-TUI row. */
|
|
59
|
+
export interface DshTuiRowPatch {
|
|
60
|
+
/** `name` on the patch; a mismatch makes dsh skip it. */
|
|
61
|
+
name?: string;
|
|
62
|
+
/** `disabled` on the patch, when present. */
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* `config` on the patch, when present: the provider and model it names (absent when
|
|
66
|
+
* it does not name one), or `{}` for a config that is empty or not a mapping.
|
|
67
|
+
*/
|
|
68
|
+
config?: {
|
|
69
|
+
provider?: string;
|
|
70
|
+
model?: string;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* What a cordis patch-list file (a top-level YAML array of loader patches) does to the
|
|
75
|
+
* dsh-TUI row, in order. An empty list when the file does not touch it. Null when the
|
|
76
|
+
* file is beyond this reader's subset, or when it could re-insert the row.
|
|
77
|
+
*
|
|
78
|
+
* @param text the file's content
|
|
79
|
+
*/
|
|
80
|
+
export declare function parseDshTuiPatches(text: string): DshTuiRowPatch[] | null;
|
|
81
|
+
/**
|
|
82
|
+
* The model dsh-TUI's route config pins, given what the user layers do to its row in
|
|
83
|
+
* application order (profile layer first, then the home layer). Null unless the last
|
|
84
|
+
* `config` that applies names both a provider and a model, and the row is not
|
|
85
|
+
* disabled. Pure.
|
|
86
|
+
*
|
|
87
|
+
* @param layers each layer's patches for the row, or null for a layer that could not be read
|
|
88
|
+
*/
|
|
89
|
+
export declare function resolveDshTuiRouteModel(layers: Array<DshTuiRowPatch[] | null>): string | null;
|
|
90
|
+
/**
|
|
91
|
+
* The dsh home a session runs against: its own `DSH_HOME` (already clamped for a
|
|
92
|
+
* non-granted owner), else the server's, else `~/.dsh`, as the `dsh` wrapper's
|
|
93
|
+
* `${DSH_HOME:-...}` resolves it. Null for a relative value, which names no place.
|
|
94
|
+
*/
|
|
95
|
+
export declare function effectiveDshHome(env: (key: string) => string | undefined): string | null;
|
|
96
|
+
/** What the reader needs to know about one session. */
|
|
97
|
+
export interface DeepSeekRouteContext {
|
|
98
|
+
/** The session's `deepSeekConfig.profile`, if any. */
|
|
99
|
+
profile?: unknown;
|
|
100
|
+
/** The session's dsh home (see {@link effectiveDshHome}). */
|
|
101
|
+
home: string | null;
|
|
102
|
+
/** The server's own dsh home, which names the default profile (as the launch does). */
|
|
103
|
+
serverHome: string | null;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The model the session's dsh-TUI route config pins, or null when it pins none or the
|
|
107
|
+
* answer is in any doubt. Read-only and bounded; see the module comment.
|
|
108
|
+
*/
|
|
109
|
+
export declare function readDeepSeekRouteModel(ctx: DeepSeekRouteContext): Promise<string | null>;
|
|
110
|
+
//# sourceMappingURL=deepseek-route-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deepseek-route-config.d.ts","sourceRoot":"","sources":["../src/deepseek-route-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAaH,+EAA+E;AAC/E,eAAO,MAAM,eAAe,kCAAkC,CAAC;AAC/D,oDAAoD;AACpD,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,6DAA6D;AAC7D,eAAO,MAAM,oBAAoB,QAAY,CAAC;AAM9C,mDAAmD;AACnD,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC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