@agi-fans/oh-my-dsh 0.21.0 → 0.23.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 CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  **Into the Unknown**
8
8
 
9
- omdsh is the terminal client for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): a focused, keyboard-first DeepSeek coding agent built on its plugin architecture, with interaction quality inspired by [oh-my-pi](https://github.com/can1357/oh-my-pi) and the original [Pi](https://github.com/earendil-works/pi) agent harness.
9
+ oh-my-dsh aims to be the best TUI companion for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness). It brings Harness to the terminal with familiar behavior and interactions, careful visual design, and a focus on making everyday coding feel clear and fluid. Built on the published Harness plugin runtime, it runs as `omdsh`.
10
10
 
11
11
  [![CI](https://github.com/agi-fans/oh-my-dsh/actions/workflows/ci.yml/badge.svg)](https://github.com/agi-fans/oh-my-dsh/actions/workflows/ci.yml) [![npm version](https://img.shields.io/npm/v/%40agi-fans%2Foh-my-dsh?style=flat-square&logo=npm)](https://www.npmjs.com/package/@agi-fans/oh-my-dsh) [![npm downloads](https://img.shields.io/npm/dm/%40agi-fans%2Foh-my-dsh?style=flat-square&logo=npm)](https://www.npmjs.com/package/@agi-fans/oh-my-dsh) [![Node.js ^22.19 or >=24](https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-339933?style=flat-square&logo=node.js)](https://nodejs.org/) [![MIT License](https://img.shields.io/npm/l/%40agi-fans%2Foh-my-dsh?style=flat-square)](https://github.com/agi-fans/oh-my-dsh/blob/main/LICENSE)
12
12
 
@@ -14,9 +14,11 @@ omdsh is the terminal client for [DeepSeek Harness](https://github.com/deepseek-
14
14
 
15
15
  </div>
16
16
 
17
- [![omdsh terminal demo — one real DeepSeek account turn at 150×39](https://raw.githubusercontent.com/agi-fans/oh-my-dsh/main/apps/site/public/omdsh-demo-poster.png)](https://github.com/agi-fans/oh-my-dsh/blob/main/apps/site/public/omdsh-demo.mp4)
17
+ [![omdsh in Kaku — reading the README, replying, and folding completed work](https://raw.githubusercontent.com/agi-fans/oh-my-dsh/main/apps/site/public/omdsh-demo.gif)](https://github.com/agi-fans/oh-my-dsh/blob/main/apps/site/public/omdsh-demo.mp4)
18
18
 
19
- A real Kaku recording at 150×39: one DeepSeek account turn reads a file, fixes it, runs it, and reports the verified result.
19
+ A 26-second terminal recording, captured with v0.22.0, shows omdsh reading the repository README and replying, folding the completed process into `Worked for 7s · Ctrl+O to expand`, then reopening the thinking and tool rows for review. The composer and footer stay at the bottom, showing context usage, cache hits, first-token latency, and token throughput. Click the preview for the full-resolution video.
20
+
21
+ <!-- User-recorded demo from iShot_2026-11-06_19.46.27.mp4, supplied on 2026-11-06. The video shows v0.22.0, deepseek-flash, and high reasoning. Original MP4 preserved at 1810 × 1276, 30 fps, 26.3 seconds. GIF and poster are derived from that recording. -->
20
22
 
21
23
  ## Quick start
22
24
 
@@ -27,69 +29,36 @@ npm install --global @agi-fans/oh-my-dsh
27
29
  omdsh
28
30
  ```
29
31
 
30
- Run `/login` once inside omdsh to sign in with a DeepSeek account or save an API key, then start a conversation. To try it without a global installation, run `npx @agi-fans/oh-my-dsh`.
31
-
32
- ## Highlights
33
-
34
- - **The terminal client for DeepSeek Harness:** a native-scrollback TUI with a docked composer, display-cell layout, and a keyboard path through every flow — built on the published plugin runtime, not a fork.
35
- - **Durable conversations:** search, pin, rename, and resume sessions in `/resume`; rewind, retry, compact, and export complete transcripts as Markdown or standalone HTML.
36
- - **DeepSeek-native auth:** sign in from `/login` through the browser or store a key; a DeepSeek account grant shared with DSH is reused, `/logout` signs it out, and web search/fetch use the same credential.
37
- - **Three real session controls:** choose a Harness Agent preset (Standard, PTC, Minimal, or Cordis), Workflow (Default or Plan), and Access (Read only, Workspace write, or Full access). Each Agent preset owns its tool exposure; PTC uses the generated TypeScript SDK automatically.
38
- - **Rich terminal input:** mention project files and other sessions with `@`, paste clipboard images, reuse persistent prompt history, edit multiline prompts externally, and retrieve queued follow-ups.
39
- - **Readable turns:** follow thinking, replies, and tool previews while the agent works. Completed work folds to a duration summary and the full final answer; `Ctrl+O` restores the process view. Scroll through either view, keep the current prompt pinned, and jump back to the latest message with `End`.
40
- - **Inspectable work:** press `Alt+O` for full tool inputs and results in the current turn, use `/trajectory` for event details, see the files changed by each turn, and let the model search its earlier sessions in the same workspace. Open the Agent Hub with `Alt+A` to follow child agents and steer continuable tasks.
41
- - **Live operational context:** see Agent, Workflow, Access, model, reasoning effort, workspace, Git state, context pressure, tokens, TTFT, throughput, cache, timings, turns, and steps without leaving the composer; use `/context` for an inline projection-backed breakdown that remains in the transcript.
42
- - **Responsive by design:** retain settled transcript layout, coalesce scroll updates, emit row-level terminal diffs, and preserve correct display-cell alignment for CJK text and emoji.
43
-
44
- ## Documentation
45
-
46
- The full documentation is published at [omdsh.agi.fans](https://omdsh.agi.fans/), and the Markdown under `apps/site/content/` is its source of truth.
47
-
48
- **Start here**
49
-
50
- - [Tutorials](https://omdsh.agi.fans/docs/tutorials/) — complete a first task, give the agent precise context, guide queued work, recover long sessions, customize the environment, and write an installable plugin.
51
- - [Commands](https://omdsh.agi.fans/docs/commands/) — every slash command with its arguments and aliases.
52
- - [Keyboard and keys](https://omdsh.agi.fans/docs/keyboard/) — editing, transcript, overlay keys, and `keybindings.json`.
53
-
54
- **Reference**
55
-
56
- - [Sessions and history](https://omdsh.agi.fans/docs/sessions/) — durable logs, the Session Library, and the local data files.
57
- - [Subagents and delegation](https://omdsh.agi.fans/docs/subagents/) — the three transports, the Agent Hub, steering, and background jobs.
58
- - [Observability](https://omdsh.agi.fans/docs/observability/) — `/trajectory`, `/context`, `/diff`, `/tools`, and `/mcp`.
59
- - [Settings](https://omdsh.agi.fans/docs/settings/) — appearance, motion, notifications, and the configurable status line.
60
- - [Permissions and access](https://omdsh.agi.fans/docs/permissions/) — Access presets, sandbox, and approvals.
61
- - [Command line](https://omdsh.agi.fans/docs/cli/) — flags, subcommands, and environment variables.
62
- - [Tools](https://omdsh.agi.fans/docs/tools/) — what the model can use, grouped by capability.
63
- - [Troubleshooting](https://omdsh.agi.fans/docs/troubleshooting/) — exit, color, scrollback, and boot failures.
64
-
65
- **Extend and integrate**
66
-
67
- - [Skills and MCP](https://omdsh.agi.fans/docs/skills-and-mcp/) — reusable instructions and external tools.
68
- - [Language servers](https://omdsh.agi.fans/docs/language-servers/) — configure read-only code intelligence.
69
- - [User plugins](https://omdsh.agi.fans/docs/plugins/) — install DSH bundles into the omdsh Profile with `omdsh plugin`.
70
- - [Plugin internals](https://omdsh.agi.fans/docs/plugin-internals/) — the `ctx.tui` surface and the contribution layer.
32
+ Inside omdsh, run `/login` to sign in with a DeepSeek account or save an API key, then use `/model` to select your model. Account users choose a model under `deepseek-account`. Send a request to begin. You can also try `npx @agi-fans/oh-my-dsh` without a global installation. The [first-task tutorial](https://omdsh.agi.fans/docs/tutorials/first-task/) walks through sign-in and a project inspection.
71
33
 
72
- **Internals**
34
+ ## What makes omdsh different
73
35
 
74
- - [Architecture](https://omdsh.agi.fans/docs/architecture/) — plugin boundaries and runtime data flow.
75
- - [Performance](https://omdsh.agi.fans/docs/performance/) — benchmarks, methodology, and rendering optimizations.
36
+ - **A clear view of the work.** Thinking and tool calls begin as compact rows you can expand with the keyboard or a click on the disclosure arrow. Completed work folds into a duration summary, with replies and failure facts still visible. Full inputs and results are within reach.
37
+ - **Careful terminal design.** Markdown, code, tables, and diffs have deliberate spacing and visual hierarchy. Dark and light palettes adapt Catppuccin Mocha and Latte, with a System option to follow terminal colors. Layout accounts for CJK text and emoji.
38
+ - **Keyboard and mouse together.** Navigate with keys, scroll and open details with the mouse, select and copy text, or quote a selection into your draft. The composer and status footer stay anchored while you read.
39
+ - **Familiar Harness controls.** Sign in with a DeepSeek account or API key, choose a model and reasoning effort, investigate in Plan mode, and set Access for the session. Harness plugins supply the underlying behavior and reusable Skills, MCP tools, and agent presets.
40
+ - **A workflow that lasts beyond one turn.** Attach files and images, queue follow-ups, steer continuable child agents, and search or resume earlier sessions. Rewind, compact, and export as work grows, with native terminal scrollback preserved.
41
+ - **Details when you need them.** Inspect context usage in `/context`, the execution history in `/trajectory`, and changed files in `/diff`. A configurable footer keeps useful telemetry close to the prompt.
76
42
 
77
- [Report a bug or request a feature](https://github.com/agi-fans/oh-my-dsh/issues/new/choose) with a guided form for the version, environment, reproduction steps, and sanitized context.
43
+ ## Find your way through the docs
78
44
 
79
- ## Why oh-my-dsh
45
+ Start with the [tutorial guide](https://omdsh.agi.fans/docs/tutorials/), then follow the route that matches your work.
80
46
 
81
- DeepSeek Harness provides a capable agent runtime and a strong architectural idea: everything is a plugin. oh-my-dsh brings that runtime into a calm, keyboard-driven terminal experience without creating a second agent core or hiding Harness behind a parallel abstraction.
47
+ | You want to | Start here |
48
+ |---|---|
49
+ | Try omdsh and understand the interface | [Complete your first task](https://omdsh.agi.fans/docs/tutorials/first-task/), then [tune the working environment](https://omdsh.agi.fans/docs/tutorials/environment/) |
50
+ | Use it for everyday coding | [Give precise context](https://omdsh.agi.fans/docs/tutorials/precise-context/), [guide an active turn](https://omdsh.agi.fans/docs/tutorials/guide-a-turn/), and [manage long sessions](https://omdsh.agi.fans/docs/tutorials/long-session/) |
51
+ | Look up a control or diagnose a problem | [Commands](https://omdsh.agi.fans/docs/commands/), [keyboard and mouse](https://omdsh.agi.fans/docs/keyboard/), [settings](https://omdsh.agi.fans/docs/settings/), and [troubleshooting](https://omdsh.agi.fans/docs/troubleshooting/) |
52
+ | Add project knowledge or capabilities | [Skills and MCP](https://omdsh.agi.fans/docs/tutorials/skills-and-mcp/), [language servers](https://omdsh.agi.fans/docs/language-servers/), and [user plugins](https://omdsh.agi.fans/docs/plugins/) |
53
+ | Develop an integration | [Write a plugin](https://omdsh.agi.fans/docs/tutorials/write-a-plugin/), [plugin internals](https://omdsh.agi.fans/docs/plugin-internals/), and [architecture](https://omdsh.agi.fans/docs/architecture/) |
82
54
 
83
- The TUI remains a presentation and interaction layer. Sessions, tools, permissions, models, Skills, MCP servers, commands, and telemetry come from Harness services and plugins; omdsh composes them into a terminal application and adds the interface behavior needed to use them comfortably. `/trajectory` opens a keyboard-driven event ledger with Turn/Step grouping, live following, search, folding, timing, token usage, tool payloads, results, and schemas. `/context` reads the same client-visible Harness projections as the status footer and distinguishes provider-anchored occupancy from heuristic prompt composition.
55
+ The bilingual Markdown under `apps/site/content/` is the documentation source of truth. To report a problem or suggest an improvement, use the [issue forms](https://github.com/agi-fans/oh-my-dsh/issues/new/choose).
84
56
 
85
- The project follows four principles:
57
+ ## How it fits with Harness
86
58
 
87
- - **Harness-native:** use published DeepSeek Harness packages as the source of truth for agent behavior, state, and lifecycle.
88
- - **Real plugin boundaries:** create plugins for independently owned lifecycles and contribution points, not for every source file.
89
- - **One terminal owner:** keep raw input, cursor state, viewport management, and atomic rendering inside the local TUI Provider.
90
- - **Progressive disclosure:** keep the default view concise while making tools, telemetry, settings, and session detail discoverable on demand.
59
+ DeepSeek Harness supplies the agent runtime and its “everything is a plugin” architecture. omdsh composes those published packages into a community terminal application. Harness owns sessions, models, tools, permissions, and their lifecycle. omdsh owns how you read, navigate, and interact with that work in a terminal.
91
60
 
92
- Reference checkouts under `refs/` remain read-only research material. Runtime code depends only on published packages and oh-my-dsh workspace packages.
61
+ Alignment means carrying familiar Harness concepts and behavior into the constraints of terminal cells, keyboard input, and native scrollback. omdsh develops its own presentation around those constraints, with progressive disclosure, readable output, and consistent controls as its priorities. Current coverage and limitations are documented in the feature references.
93
62
 
94
63
  ## Architecture
95
64
 
@@ -107,7 +76,7 @@ The TUI package is split into a service definition, local terminal Provider, ses
107
76
 
108
77
  ## Performance
109
78
 
110
- Performance is part of the TUI architecture: durable sessions replay in linear time, Harness Projections avoid repeated history scans, settled transcript blocks retain formatted layout, and the terminal writer emits row-level diffs. The documented Apple M5 Pro measurements from August 2026 recorded a median 2.62 ms for restoring 10,000 conversation turns, 22.71 ms for 10,000 tool calls, and 0.35 ms per cached frame over a 5,000-turn surface. These are historical measurements, not a benchmark of the latest version.
79
+ Performance work covers session replay, cached transcript layout, streaming Markdown, and long-file readers. In the November 6, 2026 Apple M5 Pro CPU benchmarks, a 10,000-turn lifecycle projection took a median 2.567 ms, scrolling a 109,500-character Markdown preview took 0.383 ms, and horizontal panning in a 10,000-line source reader took 0.212 ms. The measurements isolate local processing and exclude model latency, disk I/O, and terminal drawing.
111
80
 
112
81
  See the reproducible [TUI performance report](https://omdsh.agi.fans/docs/performance/) or run `pnpm benchmark:tui` locally.
113
82
 
@@ -115,7 +84,7 @@ See the reproducible [TUI performance report](https://omdsh.agi.fans/docs/perfor
115
84
 
116
85
  Run `/login` to configure a provider. DeepSeek opens the official key dashboard, validates the key, and stores it in the shared Harness credential store under `DEEPSEEK_API_KEY`; an environment-owned value is left untouched. A DeepSeek account can be signed in from `/login`: the TUI listens on a loopback callback for the browser flow and reuses any grant already established by DSH Web/Desktop. The account route (`deepseek-account`) then appears in `/model` beside the API-key route; sign-out is available from `/logout` or the same account prompt. When a mounted provider registers a Harness authorization flow, `/login` lists that flow and its methods and the terminal only renders the notices and prompts the flow asks for. The same command can also activate a catalog API-key provider or add a custom provider with its own id, base URL, protocol, and model ids. `/logout` removes only file-stored credentials and falls back to the environment when available.
117
86
 
118
- Model settings and the rest of the plugin config persist into the active Profile's Cordis patch, `$OMDSH_HOME/profiles/omdsh/cordis.patch.yml`; a `settings.yaml` left by an earlier release is imported once at startup and renamed to `settings.yaml.imported`. Use `/model favorite` and `/model unfavorite` to maintain a small local cycle list, then use `Ctrl+P`/`Alt+P` to move through it and `Ctrl+T` to change reasoning effort. Skills and MCP configuration are documented in [Skills and MCP](https://omdsh.agi.fans/docs/skills-and-mcp/).
87
+ Model settings and the rest of the plugin config persist into the active Profile's Cordis patch, `$OMDSH_HOME/profiles/omdsh/cordis.patch.yml`; a `settings.yaml` left by an earlier release is imported once at startup and renamed to `settings.yaml.imported`. Use `/model favorite` and `/model unfavorite` to maintain a small local cycle list, then use `Ctrl+P`/`Alt+P` to move through it and `Shift+Tab` to change reasoning effort (`Ctrl+T` toggles thinking visibility). Skills and MCP configuration are documented in [Skills and MCP](https://omdsh.agi.fans/docs/skills-and-mcp/).
119
88
 
120
89
  After an upgrade, omdsh can show release notes once at startup. Use `/changelog` for recent entries or `/changelog full` for the complete packaged history. A cached daily npm check reports newer versions without installing anything automatically; both behaviors can be customized in `/settings`. Terminal notifications for completed long turns and human prompts are also configured there and remain off by default. Every setting, its allowed values, and its default are listed in [Settings](https://omdsh.agi.fans/docs/settings/).
121
90
 
package/config/cordis.yml CHANGED
@@ -208,10 +208,8 @@
208
208
  host: 127.0.0.1
209
209
  port: 0
210
210
 
211
- # DeepSeek account grant over the shared credential store. The browser
212
- # callback needs a loopback webServer; this TUI host does not mount one yet,
213
- # so the service reuses a grant established by DSH Web/Desktop and reports
214
- # ACCOUNT_SIGN_IN_REQUIRED otherwise.
211
+ # DeepSeek account grant over the shared credential store. Browser sign-in
212
+ # returns through the loopback webServer; DSH Web/Desktop can share the grant.
215
213
  - id: deepseek-account
216
214
  name: '@deepseek-ai/dsh-deepseek-account-platform'
217
215
 
@@ -249,14 +247,6 @@
249
247
  - id: commands
250
248
  name: '@deepseek-ai/dsh-commands'
251
249
 
252
- # `/rate` stores one judgment per finalized assistant reply. The service owns
253
- # the canonical Session events and compare-and-set versions; the TUI only
254
- # renders the picker and never puts feedback into model context.
255
- - id: message-feedback
256
- name: '@deepseek-ai/dsh-message-feedback'
257
- config:
258
- maxNoteBytes: 8192
259
-
260
250
  - id: user-questions
261
251
  name: '@deepseek-ai/dsh-user-questions'
262
252
 
@@ -350,8 +340,16 @@
350
340
 
351
341
  - id: tools
352
342
  name: '@deepseek-ai/dsh-tools'
353
- config:
354
- mode: native
343
+
344
+ # Execution moved out of the tool registry into executor plugins. Native is the
345
+ # deployment default; a preset that wants PTC mounts the PTC executor in its own
346
+ # scope, and the disabled row here keeps startup's required entry present.
347
+ - id: tool-executor-native
348
+ name: '@deepseek-ai/dsh-tool-executor-native'
349
+
350
+ - id: tool-executor-ptc
351
+ name: '@deepseek-ai/dsh-tool-executor-ptc'
352
+ disabled: true
355
353
 
356
354
  - id: skill
357
355
  name: '@deepseek-ai/dsh-skill'
@@ -461,13 +459,13 @@
461
459
 
462
460
  Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
463
461
 
464
- The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
462
+ Tool availability does not grant permission to execute the plan. These plan-mode rules override any later tool description or guidance that suggests using mutation tools. Harness admits exit_plan_mode on the first plan-mode entry and retains it for the rest of the session; it can only be used while plan mode is active. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
465
463
 
466
464
  Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
467
465
 
468
466
  Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public interface, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
469
467
 
470
- When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
468
+ When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. A dismissed review ends this turn and leaves plan mode active; wait for the user's next message. If the review channel is unavailable or interrupted, stay in plan mode; when conversation resumes, explain the failure and let the user retry or switch modes manually. Never treat cancellation or interruption as approval.
471
469
 
472
470
  - id: tool-fs
473
471
  name: '@deepseek-ai/dsh-tool-fs'
@@ -494,17 +492,12 @@
494
492
  - id: tool-present
495
493
  name: '@deepseek-ai/dsh-tool-present'
496
494
 
497
- # Web tools: the model can fetch public pages for free, and search the web
498
- # through DeepSeek's hosted search. Search is on by default because the
499
- # official provider ships with the base and speaks the same Messages protocol
500
- # as the conversation route, so it needs no extra credential setup: the key
501
- # resolves through the credentials service at each search. A search is a full
502
- # auxiliary model request, so its cost is bounded by `maxUses` (and the
503
- # provider's own settings section tunes model, token cap, and endpoint); a
504
- # deployment that wants no search disables `tool-web`'s `search` in its own
505
- # overlay.
495
+ # Hosted search and fetch avoid local fake-IP resolution and auxiliary model
496
+ # turns. Direct HTTP and Messages search remain selectable alternatives.
497
+ # The adapter projects public provider registrations for the settings list;
498
+ # execution and provider selection remain in the published web service.
506
499
  - id: web
507
- name: '@deepseek-ai/dsh-web'
500
+ name: '@agi-fans/oh-my-dsh/web-runtime'
508
501
  config:
509
502
  # The DeepSeek API providers retrieve directly, so a local fake-IP resolver
510
503
  # or an auxiliary Messages turn cannot block search and fetch. The older
@@ -591,12 +584,6 @@
591
584
  - id: subagent
592
585
  name: '@deepseek-ai/dsh-subagent'
593
586
 
594
- - id: advisor
595
- name: '@agi-fans/oh-my-dsh/advisor'
596
-
597
- - id: tui-command-advisor
598
- name: '@agi-fans/dsh-tui/command-advisor'
599
-
600
587
  - id: btw
601
588
  name: '@agi-fans/dsh-tui/btw'
602
589
  config:
@@ -649,12 +636,11 @@
649
636
  OMDSH_HOME: !!js process.env.OMDSH_HOME || process.env.DSH_HOME || undefined
650
637
  DEEPSEEK_API_KEY: !!js process.env.DEEPSEEK_API_KEY || undefined
651
638
 
639
+ # One row now registers send_message, interrupt_agent, and list_agents; the
640
+ # former `/list-agents` subpath is no longer an entry point.
652
641
  - id: subagent-control
653
642
  name: '@deepseek-ai/dsh-tool-subagent-control'
654
643
 
655
- - id: subagent-list
656
- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
657
-
658
644
  - id: tool-subagent
659
645
  name: '@deepseek-ai/dsh-tool-subagent'
660
646
  config:
@@ -692,17 +678,14 @@
692
678
  # is the same isolation the ACP subagent transport buys for delegation.
693
679
  # Mounting `dsh-workflow` as well would double-register `workflowEngine`, so
694
680
  # it stays a dependency the engine resolves rather than a composition row.
681
+ # The model-facing `workflow_run` tool sits in the native presets instead of
682
+ # here: it registers into an Agent's scope, so only a preset can decide whether
683
+ # its agents see a second way to author orchestration.
695
684
  - id: workflow-ptc
696
685
  name: '@deepseek-ai/dsh-workflow-ptc'
697
686
  config:
698
687
  provider: spawn
699
688
 
700
- # Keep the explicit execution name stable for existing sessions and tool policies.
701
- - id: tool-workflow
702
- name: '@deepseek-ai/dsh-tool-workflow'
703
- config:
704
- toolName: workflow_run
705
-
706
689
  # Ralph iterates fresh agents over a build-time-fixed script; it reuses the
707
690
  # continuable in-process `spawn` provider, so it depends on that transport
708
691
  # staying mounted. Off by default, matching the upstream base bundle: the
@@ -745,18 +728,9 @@
745
728
  - id: tui-command-session
746
729
  name: '@agi-fans/dsh-tui/command-session'
747
730
 
748
- - id: tui-command-worktree
749
- name: '@agi-fans/dsh-tui/command-worktree'
750
-
751
731
  - id: tui-command-session-configuration
752
732
  name: '@agi-fans/dsh-tui/command-session-configuration'
753
733
 
754
- - id: tui-command-steer
755
- name: '@agi-fans/dsh-tui/command-steer'
756
-
757
- - id: tui-command-loop
758
- name: '@agi-fans/dsh-tui/command-loop'
759
-
760
734
  - id: tui-command-model
761
735
  name: '@agi-fans/dsh-tui/command-model'
762
736
 
@@ -772,21 +746,23 @@
772
746
  - id: tui-command-trajectory
773
747
  name: '@agi-fans/dsh-tui/command-trajectory'
774
748
 
775
- - id: tui-command-integrations
776
- name: '@agi-fans/dsh-tui/command-integrations'
749
+ # Plugin index sources; empty until the reader configures one, so a profile
750
+ # with no `indexes` pays no fetch.
751
+ - id: plugin-market
752
+ name: '@deepseek-ai/dsh-plugin-market'
777
753
 
778
754
  - id: tui-command-plugins
779
755
  name: '@agi-fans/dsh-tui/command-plugins'
780
756
 
781
- - id: tui-command-jobs
782
- name: '@agi-fans/dsh-tui/command-jobs'
783
-
784
- - id: tui-command-rate
785
- name: '@agi-fans/dsh-tui/command-rate'
786
-
787
757
  - id: tui-command-schedule
788
758
  name: '@agi-fans/dsh-tui/command-schedule'
789
759
 
760
+ - id: tui-command-integrations
761
+ name: '@agi-fans/dsh-tui/command-integrations'
762
+
763
+ - id: tui-command-jobs
764
+ name: '@agi-fans/dsh-tui/command-jobs'
765
+
790
766
  - id: tui-startup-notices
791
767
  name: '@agi-fans/dsh-tui/startup-notices'
792
768
 
@@ -19,28 +19,19 @@
19
19
  prefix: >-
20
20
  You are a coding agent powered by the {{model}} model. Prefer programmatic tool calling for multi-step operations when the generated tools SDK is available.
21
21
 
22
- # PTC presents the tool registry as a generated SDK over `run_code`, so the
23
- # general-purpose `workflow_run` tool would be a second model-authored
24
- # orchestration surface beside it. The upstream `ptc` preset disables its own
25
- # workflow rows for that reason; a preset cannot disable a host row, so the
26
- # restriction does it here. `ralph` needs no entry: the deployment ships it
27
- # disabled, and `tools.restrict()` rejects a name that no global tool owns — a
28
- # home overlay that restores it accepts a second surface in this preset.
29
- - id: profile
30
- name: '@agi-fans/dsh-tui/agent-profile'
31
- config:
32
- tools:
33
- deny:
34
- - workflow_run
22
+ # PTC presents the tool registry as a generated SDK over `run_code`, so a
23
+ # general-purpose `workflow_run` would be a second model-authored
24
+ # orchestration surface beside it. Nothing has to be denied here: the
25
+ # workflow tool is mounted by the native presets, and an Agent sees only
26
+ # the tools its own preset registers. `ralph` needs no entry either — the
27
+ # deployment ships it disabled.
35
28
 
36
29
  # PTC for this preset alone; `standard`, `minimal`, and `cordis` inherit the
37
- # deployment default (`native`) from the host `tools` row. The row fails the
38
- # mount when no PTC runtime is composed, which is the point: the session does
39
- # not choose its presentation at runtime any more.
40
- - id: tool-presentation
41
- name: '@deepseek-ai/dsh-agent-tool-presentation'
42
- config:
43
- mode: ptc
30
+ # deployment's native executor. The row fails the mount when no PTC runtime is
31
+ # composed, which is the point: the session does not choose its executor at
32
+ # runtime any more.
33
+ - id: tool-executor-ptc
34
+ name: '@deepseek-ai/dsh-tool-executor-ptc'
44
35
 
45
36
  # Upstream Standard/Cordis/PTC presets carry a clock reading at least
46
37
  # every ten minutes; the TUI process zone is the fallback display zone.
@@ -6,8 +6,8 @@
6
6
  name: '@deepseek-ai/dsh-agent-preset'
7
7
  config:
8
8
  id: cordis
9
- name: Cordis
10
- description: Coding agent with runtime inspection, development skills, and plugin management for Harness compositions.
9
+ name: Creator
10
+ description: Create and configure Harness plugins with runtime inspection, development skills, and plugin management.
11
11
  order: 4
12
12
  plugins:
13
13
  - id: subagent-model-selection
@@ -35,6 +35,14 @@
35
35
  - id: tool-plugin-manager
36
36
  name: '@deepseek-ai/dsh-plugin-manager/tools'
37
37
 
38
+ # Model-authored orchestration. The engine is mounted deployment-wide;
39
+ # the tool registers per Agent scope, so each preset decides whether its
40
+ # agents can author a workflow beside their own tools.
41
+ - id: tool-workflow
42
+ name: '@deepseek-ai/dsh-tool-workflow'
43
+ config:
44
+ toolName: workflow_run
45
+
38
46
  # Upstream Standard/Cordis/PTC presets carry a clock reading at least
39
47
  # every ten minutes; the TUI process zone is the fallback display zone.
40
48
  - id: time-context
@@ -19,6 +19,14 @@
19
19
  prefix: >-
20
20
  You are a coding agent powered by the {{model}} model.
21
21
 
22
+ # Model-authored orchestration. The engine is mounted deployment-wide;
23
+ # the tool registers per Agent scope, so each preset decides whether its
24
+ # agents can author a workflow beside their own tools.
25
+ - id: tool-workflow
26
+ name: '@deepseek-ai/dsh-tool-workflow'
27
+ config:
28
+ toolName: workflow_run
29
+
22
30
  # Upstream Standard/Cordis/PTC presets carry a clock reading at least
23
31
  # every ten minutes; the TUI process zone is the fallback display zone.
24
32
  - id: time-context
@@ -13,19 +13,19 @@ export declare const AGENT_BEHAVIOR_ENTRY = "agent-behavior";
13
13
  export declare const AGENT_BEHAVIOR_SECTION = "omdsh:agent-behavior";
14
14
  export declare const AGENT_BEHAVIOR_ORDER = 30;
15
15
  export declare const AGENT_BEHAVIOR_VARIABLE = "omdsh_agent_behavior";
16
- export declare const AGENT_LANGUAGES: readonly ["auto", "zh-CN", "en"];
16
+ export declare const AGENT_LANGUAGES: readonly ["auto", "follow-ui", "zh-CN", "en"];
17
17
  export type AgentLanguage = typeof AGENT_LANGUAGES[number];
18
18
  /** Live language setting; a settings form edit commits into this reference. */
19
19
  export interface Config {
20
20
  language: Volatile<AgentLanguage>;
21
21
  }
22
22
  export declare const Config: z<Schemastery.ObjectS<NoInfer<{
23
- language: z<"auto" | "zh-CN" | "en", "auto" | "zh-CN" | "en", "volatile-defined">;
23
+ language: z<"auto" | "follow-ui" | "zh-CN" | "en", "auto" | "follow-ui" | "zh-CN" | "en", "volatile-defined">;
24
24
  }>>, Schemastery.ObjectT<NoInfer<{
25
- language: z<"auto" | "zh-CN" | "en", "auto" | "zh-CN" | "en", "volatile-defined">;
25
+ language: z<"auto" | "follow-ui" | "zh-CN" | "en", "auto" | "follow-ui" | "zh-CN" | "en", "volatile-defined">;
26
26
  }>>, "plain">;
27
27
  /** Stable model instruction for one accepted language setting. */
28
- export declare function agentLanguageFragment(language: AgentLanguage): string;
28
+ export declare function agentLanguageFragment(language: AgentLanguage, uiLanguage?: 'en' | 'zh-CN'): string;
29
29
  /** Freeze live user settings at a turn boundary while keeping direct assemblies useful. */
30
30
  export declare class AgentBehaviorPrompt {
31
31
  #private;
@@ -3,6 +3,7 @@
3
3
  * @module @agi-fans/oh-my-dsh/agent-behavior
4
4
  */
5
5
  import z from '@deepseek-ai/schemastery';
6
+ import { resolveUiLanguage } from '@agi-fans/dsh-tui';
6
7
  export const name = 'omdsh-agent-behavior';
7
8
  export const inject = ['settings', 'systemPrompt'];
8
9
  /** Profile entry id whose volatile config carries the language preference. */
@@ -10,17 +11,17 @@ export const AGENT_BEHAVIOR_ENTRY = 'agent-behavior';
10
11
  export const AGENT_BEHAVIOR_SECTION = 'omdsh:agent-behavior';
11
12
  export const AGENT_BEHAVIOR_ORDER = 30;
12
13
  export const AGENT_BEHAVIOR_VARIABLE = 'omdsh_agent_behavior';
13
- export const AGENT_LANGUAGES = ['auto', 'zh-CN', 'en'];
14
+ export const AGENT_LANGUAGES = ['auto', 'follow-ui', 'zh-CN', 'en'];
14
15
  export const Config = z.object({
15
16
  language: z.union([...AGENT_LANGUAGES]).default('auto').volatile(),
16
17
  });
17
18
  const LANGUAGE_FRAGMENTS = {
18
- 'zh-CN': '主要使用简体中文进行推理和面向用户的沟通,包括回复、提问、计划、待办文字和子 Agent 简报。代码、标识符、命令、Tool 参数、日志、引用、文件内容和惯用技术术语在准确性需要时保留原文或标准写法。项目指令中明确规定语言时,遵循项目指令;若用户明确要求当前任务使用其他语言,以该要求为准。',
19
- en: 'Use English as the primary language for reasoning and user-facing communication, including replies, questions, plans, todo text, and subagent summaries. Preserve code, identifiers, commands, tool arguments, logs, quotations, file contents, and conventional technical terms in their original or standard form when accuracy requires. Follow explicit language requirements in project instructions; if the user explicitly requests another language for the current task, follow that request.',
19
+ 'zh-CN': '主要使用简体中文进行面向用户的沟通,包括回复、提问、计划、待办文字和子 Agent 简报。代码、标识符、命令、Tool 参数、日志、引用、文件内容和惯用技术术语在准确性需要时保留原文或标准写法。项目指令中明确规定语言时,遵循项目指令;若用户明确要求当前任务使用其他语言,以该要求为准。',
20
+ en: 'Use English as the primary language for user-facing communication, including replies, questions, plans, todo text, and subagent summaries. Preserve code, identifiers, commands, tool arguments, logs, quotations, file contents, and conventional technical terms in their original or standard form when accuracy requires. Follow explicit language requirements in project instructions; if the user explicitly requests another language for the current task, follow that request.',
20
21
  };
21
22
  /** Stable model instruction for one accepted language setting. */
22
- export function agentLanguageFragment(language) {
23
- return language === 'auto' ? '' : LANGUAGE_FRAGMENTS[language];
23
+ export function agentLanguageFragment(language, uiLanguage = 'en') {
24
+ return language === 'auto' ? '' : LANGUAGE_FRAGMENTS[language === 'follow-ui' ? uiLanguage : language];
24
25
  }
25
26
  /** Freeze live user settings at a turn boundary while keeping direct assemblies useful. */
26
27
  export class AgentBehaviorPrompt {
@@ -47,8 +48,10 @@ export class AgentBehaviorPrompt {
47
48
  }
48
49
  export function apply(ctx, config) {
49
50
  const prompt = new AgentBehaviorPrompt();
51
+ const language = () => config.language.get() === 'follow-ui'
52
+ ? resolveUiLanguage(ctx.get('tui')?.prefs().uiLanguage) : config.language.get();
50
53
  ctx.on('agent/pre-step', async (payload, next) => {
51
- prompt.snapshot(payload.agent, payload.turn, config.language.get());
54
+ prompt.snapshot(payload.agent, payload.turn, language());
52
55
  return next();
53
56
  });
54
57
  ctx.on('agent/status', ({ agent, status }) => {
@@ -59,9 +62,9 @@ export function apply(ctx, config) {
59
62
  ctx.effect(() => ctx.systemPrompt.section({
60
63
  name: AGENT_BEHAVIOR_SECTION,
61
64
  order: AGENT_BEHAVIOR_ORDER,
62
- text: context => prompt.fragment(context, config.language.get()),
65
+ text: context => prompt.fragment(context, language()),
63
66
  }), 'omdsh Agent behavior prompt section');
64
- ctx.effect(() => ctx.systemPrompt.variable(AGENT_BEHAVIOR_VARIABLE, context => prompt.variable(context, config.language.get())), 'omdsh Agent behavior prompt variable');
67
+ ctx.effect(() => ctx.systemPrompt.variable(AGENT_BEHAVIOR_VARIABLE, context => prompt.variable(context, language())), 'omdsh Agent behavior prompt variable');
65
68
  ctx.inject(['tui'], (tuiCtx) => {
66
69
  const binding = {
67
70
  get: () => ({ language: config.language.get() }),
package/lib/boot.js CHANGED
@@ -32,6 +32,9 @@ export async function runOmdsh(prompt, resume) {
32
32
  // keypress the tui provider handles); SIGTERM is the supervisor's stop.
33
33
  process.on('SIGTERM', () => { interrupt(0); });
34
34
  process.on('SIGINT', () => { interrupt(130); });
35
+ // Closing the terminal window delivers SIGHUP; shut down cleanly like SIGTERM.
36
+ if (process.platform !== 'win32')
37
+ process.on('SIGHUP', () => { interrupt(129); });
35
38
  installFailLoud(NAME, process, async () => { await app.current?.fiber.dispose(); });
36
39
  const ctx = await mountOmdsh({ args: resume === undefined ? prompt : ['--resume', resume], exit: code => { void shutdown.shutdown(code); },
37
40
  onContext: hostCtx => { app.current = hostCtx; } });
@@ -44,12 +47,15 @@ export async function mountOmdsh(options) {
44
47
  const composed = composeLaunch();
45
48
  const home = omdshHome();
46
49
  // Headless exec keeps the host runtime but disables TUI commands and the
47
- // loopback OAuth callback host they own.
50
+ // loopback OAuth callback host they own. Module watching goes too: a one-shot
51
+ // run never observes a reload, and an unsettled first-boot refresh keeps the
52
+ // Harness loader waiting on the timer service that is itself waiting for that
53
+ // refresh to drain, so shutdown would never settle.
48
54
  const frontendPatches = options.mode === 'exec' ? composeEntries([composed.patches]).filter(entry => entry.name === '@agi-fans/dsh-tui' || entry.name === '@agi-fans/dsh-tui/provider-local'
49
55
  || entry.name === '@agi-fans/dsh-tui/runner' || entry.name === '@agi-fans/dsh-tui/session-runtime'
50
56
  || entry.name === '@agi-fans/dsh-tui/human-interaction' || entry.name === '@agi-fans/dsh-tui/startup-notices'
51
57
  || entry.name === '@agi-fans/dsh-tui/tool-presentation' || entry.name === '@agi-fans/dsh-tui/hook-settings'
52
- || entry.name === '@deepseek-ai/dsh-host-webserver'
58
+ || entry.name === '@deepseek-ai/dsh-host-webserver' || entry.name === '@deepseek-ai/dsh-hmr'
53
59
  || entry.name?.startsWith('@agi-fans/dsh-tui/command-')).map(entry => ({ id: entry.id, disabled: true })) : [];
54
60
  // The Profile facts every profile-scoped plugin reads: `dsh-settings` and
55
61
  // `config-editor` persist edits into `patchPath`, and the composition
package/lib/doctor.js CHANGED
@@ -4,6 +4,7 @@ import { delimiter, join, resolve } from 'node:path';
4
4
  import { pathToFileURL } from 'node:url';
5
5
  import { bundlePatchPaths, composeEntries, createRuntimeResolution, evaluatePluginCompatibility, loadLayeredEnv, loadOptionalPatches, loadOverlayPatches, readProfileCompatibility, readProfileManifest, resolveBundleDir, resolvePluginResource, resolveProfileDir, PROFILE_PATCH_FILENAME, } from '@deepseek-ai/dsh-app-boot';
6
6
  import { CREDENTIALS_FILENAME, parseCredentialsDocument } from '@deepseek-ai/dsh-credentials-local';
7
+ import { imageProtocol } from '@agi-fans/dsh-tui';
7
8
  import { omdshHome } from "./config-paths.js";
8
9
  import { INSTALL_ANCHOR, NAME, PRODUCT_BUNDLE, PROFILE_NAME } from "./profile.js";
9
10
  import { loadLspPatches } from "./lsp-config.js";
@@ -261,6 +262,10 @@ export async function runDoctor(options) {
261
262
  add('model-auth', 'not-checked', 'No model request or native-agent login check was performed. Configure and verify the selected provider in /model or /auth.');
262
263
  add('terminal', (options.tty ?? (process.stdin.isTTY === true && process.stdout.isTTY === true)) ? 'ok' : 'not-checked', (options.tty ?? (process.stdin.isTTY === true && process.stdout.isTTY === true)) ? 'Interactive stdin and stdout are attached.' : 'No interactive terminal attached.');
263
264
  add('terminal-capabilities', 'not-checked', 'Program status, images and clipboard require interactive terminal checks. No terminal probes were sent.');
265
+ const images = imageProtocol(process.env);
266
+ add('terminal-images', images === undefined ? 'not-configured' : 'ok', images === undefined
267
+ ? 'No inline image protocol was detected for this terminal.'
268
+ : `Inline images use the ${images} protocol.`, images === undefined ? 'Set OMDSH_IMAGE_PROTOCOL=kitty (or iterm2) when the terminal supports inline images.' : undefined);
264
269
  return { schemaVersion: 1, version: options.version, checks };
265
270
  }
266
271
  export function formatDoctorReport(report) {
@@ -88,11 +88,10 @@ export async function executeAgent(ctx, request, output, signal) {
88
88
  try {
89
89
  lifetime.throwIfAborted();
90
90
  const selectedModel = defaults.currentSelection();
91
- const selection = { current: selectedModel, assembled: undefined };
92
91
  const setup = async (agentCtx, agent) => {
93
92
  root = agent;
94
93
  owned.add(agent);
95
- await configureAgentContext(agentCtx, agent, selection);
94
+ await configureAgentContext(agentCtx, agent);
96
95
  };
97
96
  if (request.resume !== undefined) {
98
97
  const persistence = ctx.get('sessionPersistence');
@@ -112,7 +111,7 @@ export async function executeAgent(ctx, request, output, signal) {
112
111
  }
113
112
  const agent = handle.agent;
114
113
  root = agent;
115
- output.emit(request.resume === undefined ? 'session.created' : 'session.resumed', { sessionId: String(agent.id), model: selection.current,
114
+ output.emit(request.resume === undefined ? 'session.created' : 'session.resumed', { sessionId: String(agent.id), model: agent.model.current() ?? selectedModel,
116
115
  cwd: agent.session.header.cwd });
117
116
  lifetime.throwIfAborted();
118
117
  agent.followup(createUserMessage({ content: [{ type: 'text', text: request.prompt }], source: { kind: 'user' } }));
package/lib/exec.js CHANGED
@@ -49,13 +49,16 @@ export async function runExec(invocation, version) {
49
49
  signalExit = code;
50
50
  stopped.abort(new Error(code === 130 ? 'SIGINT' : 'SIGTERM'));
51
51
  };
52
- const sigint = () => { interrupt(130); }, sigterm = () => { interrupt(143); };
52
+ const sigint = () => { interrupt(130); }, sigterm = () => { interrupt(143); }, sighup = () => { interrupt(129); };
53
53
  const onFatal = (error) => {
54
54
  fatal = error instanceof Error ? error : new Error(String(error));
55
55
  stopped.abort(fatal);
56
56
  };
57
57
  process.on('SIGINT', sigint);
58
58
  process.on('SIGTERM', sigterm);
59
+ // Closing the terminal window delivers SIGHUP; shut down cleanly like SIGTERM.
60
+ if (process.platform !== 'win32')
61
+ process.on('SIGHUP', sighup);
59
62
  process.on('uncaughtException', onFatal);
60
63
  process.on('unhandledRejection', onFatal);
61
64
  process.stdout.on('error', onFatal);
@@ -107,6 +110,8 @@ export async function runExec(invocation, version) {
107
110
  }
108
111
  process.off('SIGINT', sigint);
109
112
  process.off('SIGTERM', sigterm);
113
+ if (process.platform !== 'win32')
114
+ process.off('SIGHUP', sighup);
110
115
  process.off('uncaughtException', onFatal);
111
116
  process.off('unhandledRejection', onFatal);
112
117
  }
package/lib/profile.js CHANGED
@@ -49,8 +49,13 @@ export function ensureProductBundleFirst(dir) {
49
49
  */
50
50
  export function ensureOmdshProfile(home) {
51
51
  const dir = resolveProfileDir(PROFILE_NAME, home);
52
- if (!existsSync(join(dir, 'package.json')))
52
+ if (!existsSync(join(dir, 'package.json'))) {
53
+ // Only fresh profiles adopt Follow UI. An existing patch may predate its manifest.
54
+ const hasPatch = existsSync(join(dir, PROFILE_PATCH_FILENAME));
53
55
  initProfile(dir, [PRODUCT_BUNDLE]);
56
+ if (!hasPatch)
57
+ writeFileSync(join(dir, PROFILE_PATCH_FILENAME), '# Response language for this profile; UI language is configured separately.\n- id: agent-behavior\n config:\n language: follow-ui\n');
58
+ }
54
59
  ensureProductBundleFirst(dir);
55
60
  return dir;
56
61
  }