@agi-fans/oh-my-dsh 0.20.0 → 0.22.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 a focused, keyboard-first DeepSeek coding agent built on the plugin architecture of [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) and inspired by the interaction quality of [oh-my-pi](https://github.com/can1357/oh-my-pi) and the original [Pi](https://github.com/earendil-works/pi) agent harness.
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.
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,26 +14,30 @@ omdsh is a focused, keyboard-first DeepSeek coding agent built on the plugin arc
14
14
 
15
15
  </div>
16
16
 
17
- [![Hello Oh My DSH — v0.19.0 terminal recording](https://raw.githubusercontent.com/agi-fans/oh-my-dsh/main/apps/site/public/screenshot.webp)](https://github.com/agi-fans/oh-my-dsh/blob/main/apps/site/public/hello-oh-my-dsh.mp4)
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)
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.
18
20
 
19
21
  ## Quick start
20
22
 
21
- Requirements: Node.js 22.19 or later in the 22.x line, or Node.js 24 or newer, plus a DeepSeek API key for live model turns.
23
+ Requirements: Node.js 22.19 or later in the 22.x line, or Node.js 24 or newer, plus a DeepSeek account or API key for live model turns.
22
24
 
23
25
  ```sh
24
26
  npm install --global @agi-fans/oh-my-dsh
25
27
  omdsh
26
28
  ```
27
29
 
28
- Run `/login` once inside omdsh to validate and save your DeepSeek API key, then start a conversation. To try it without a global installation, run `npx @agi-fans/oh-my-dsh`.
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`.
29
31
 
30
32
  ## Highlights
31
33
 
32
- - **Durable conversations:** search, pin, rename, and resume sessions in `/sessions`; rewind, retry, compact, and export complete transcripts as Markdown or standalone HTML.
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.
33
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.
34
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.
35
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`.
36
- - **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.
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. Press `↓` on an empty composer to select a child agent in the roster and `Enter` to open its transcript, where a continuable task can be steered.
37
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.
38
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.
39
43
 
@@ -50,7 +54,7 @@ The full documentation is published at [omdsh.agi.fans](https://omdsh.agi.fans/)
50
54
  **Reference**
51
55
 
52
56
  - [Sessions and history](https://omdsh.agi.fans/docs/sessions/) — durable logs, the Session Library, and the local data files.
53
- - [Subagents and delegation](https://omdsh.agi.fans/docs/subagents/) — the three transports, the Agent Hub, steering, and background jobs.
57
+ - [Subagents and delegation](https://omdsh.agi.fans/docs/subagents/) — the three transports, the roster that opens a child's transcript, steering, and background jobs.
54
58
  - [Observability](https://omdsh.agi.fans/docs/observability/) — `/trajectory`, `/context`, `/diff`, `/tools`, and `/mcp`.
55
59
  - [Settings](https://omdsh.agi.fans/docs/settings/) — appearance, motion, notifications, and the configurable status line.
56
60
  - [Permissions and access](https://omdsh.agi.fans/docs/permissions/) — Access presets, sandbox, and approvals.
@@ -109,7 +113,7 @@ See the reproducible [TUI performance report](https://omdsh.agi.fans/docs/perfor
109
113
 
110
114
  ## Configuration
111
115
 
112
- Run `/login` to configure a provider. DeepSeek still opens the official key dashboard, validates the key, and prefers the stored credential over an inherited `DEEPSEEK_API_KEY`. 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. `/model` then lists every live route. `/logout` removes an omdsh-managed choice and, for DeepSeek, falls back to the environment when available.
116
+ 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.
113
117
 
114
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/).
115
119
 
package/config/cordis.yml CHANGED
@@ -1,7 +1,8 @@
1
1
  # omdsh product bundle — one insert over an empty Profile root.
2
- # TUI coding agent over the DeepSeek Harness core runtime. No Host, no HTTP, no
3
- # browser layer: local executors, the executor-less agent spine, the DeepSeek
4
- # adapter, and the omdsh TUI seam (provider + interactive runner).
2
+ # TUI coding agent over the DeepSeek Harness core runtime. No public Host or
3
+ # browser layer: one loopback HTTP listener exists only to receive the DeepSeek
4
+ # account OAuth callback. Local executors, the executor-less agent spine, the
5
+ # DeepSeek adapter, and the omdsh TUI seam (provider + interactive runner).
5
6
  #
6
7
  # Model/provider rows read the CLI/environment overrides through the
7
8
  # harness's sanctioned dynamic-config mechanism (!!js under plugin config).
@@ -36,6 +37,14 @@
36
37
  # and omitting models keeps future adapter additions visible.
37
38
  maxTokens: 384000
38
39
 
40
+ # The account route shares the same transport but resolves only the DeepSeek
41
+ # account grant; it never falls back to an API key. Hosts that sign in through
42
+ # the shared credential store (DSH Web/Desktop) expose `deepseek-account` here.
43
+ - id: llm-deepseek-account
44
+ name: '@deepseek-ai/dsh-llm-deepseek-account'
45
+ config:
46
+ maxTokens: 384000
47
+
39
48
  - id: session
40
49
  name: '@deepseek-ai/dsh-session'
41
50
 
@@ -87,7 +96,7 @@
87
96
 
88
97
  # Model-facing session history: five read-only tools that let the agent find
89
98
  # work it did in an earlier session. Without them a model that solved
90
- # something three sessions ago can only be told again, because `/sessions`
99
+ # something three sessions ago can only be told again, because `/resume`
91
100
  # and `/resume` are human affordances it cannot reach. Cross-session reads
92
101
  # are authorized only when the target session's cwd exactly matches the
93
102
  # caller's, so the model cannot read another workspace's history.
@@ -119,6 +128,14 @@
119
128
  config:
120
129
  backend: json
121
130
 
131
+ # Durable reminders. Delivery resolves its Session through the background
132
+ # controller below; a cold Session is resumed without touching the TUI.
133
+ - id: schedule
134
+ name: '@deepseek-ai/dsh-schedule'
135
+ config:
136
+ deliveryHistoryDays: 30
137
+ deliveryHistoryRecords: 200
138
+
122
139
  # Durable projection checkpoints — the piece that lets a cold session
123
140
  # answer its title without reading its log. Without it the `@` session
124
141
  # menu and the recent-session list can only label cold sessions by id.
@@ -177,6 +194,27 @@
177
194
  - id: authorization
178
195
  name: '@deepseek-ai/dsh-authorization'
179
196
 
197
+ # Move the retired product credential into the upstream DeepSeek slot before
198
+ # any model or web request reads it. Idempotent; no network.
199
+ - id: credential-migration
200
+ name: '@agi-fans/oh-my-dsh/credential-migration'
201
+
202
+ # Loopback-only callback host for the DeepSeek account browser sign-in. It
203
+ # binds 127.0.0.1 on an OS-assigned port and serves only the exact
204
+ # /oauth/callback route registered while an attempt is running.
205
+ - id: web-server
206
+ name: '@deepseek-ai/dsh-host-webserver'
207
+ config:
208
+ host: 127.0.0.1
209
+ port: 0
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.
215
+ - id: deepseek-account
216
+ name: '@deepseek-ai/dsh-deepseek-account-platform'
217
+
180
218
  # Dormant multi-provider twin: zero extra picker routes until a `llm-pi-ai:`
181
219
  # settings section supplies profiles. /login writes those profiles; /model
182
220
  # lists whatever routes become live. Keep llm-deepseek as the official
@@ -202,15 +240,15 @@
202
240
  config:
203
241
  default: standard
204
242
 
243
+ # Background Session resolution for plugins that deliver without a client,
244
+ # currently Schedule. It exposes only `resolveAgent`; the visible Session is
245
+ # never activated or replaced.
246
+ - id: session-controller
247
+ name: '@agi-fans/oh-my-dsh/session-controller'
248
+
205
249
  - id: commands
206
250
  name: '@deepseek-ai/dsh-commands'
207
251
 
208
- # `/feedback <text>` records one log-only `feedback/record` event: immediate,
209
- # model-invisible, and no report leaves the machine. The Web feedback dialog
210
- # behind the same service stays a host-plane surface omdsh does not mount.
211
- - id: command-feedback
212
- name: '@deepseek-ai/dsh-command-feedback'
213
-
214
252
  - id: user-questions
215
253
  name: '@deepseek-ai/dsh-user-questions'
216
254
 
@@ -219,6 +257,11 @@
219
257
  config:
220
258
  policy: !!js "(process.env.OMDSH_PERMISSION_MODE || 'workspace-write') === 'danger-full-access' ? 'never' : 'ask'"
221
259
 
260
+ - id: approval-rules
261
+ name: '@agi-fans/dsh-tui/approval-rules'
262
+ config:
263
+ stateDir: !!js (process.env.OMDSH_HOME || process.env.DSH_HOME || process.env.HOME + '/.dsh') + '/omdsh/approval-rules'
264
+
222
265
  # Every session starts with one explicit access preset. The environment is a
223
266
  # deployment override; the TUI switches it later through the /permission picker.
224
267
  - id: sandbox
@@ -236,6 +279,12 @@
236
279
  - id: fs-observation-policy
237
280
  name: '@deepseek-ai/dsh-fs-observation-policy'
238
281
 
282
+ - id: file-recovery
283
+ name: '@agi-fans/dsh-tui/file-recovery-local'
284
+ config:
285
+ enabled: false
286
+ stateDir: !!js (process.env.OMDSH_HOME || process.env.DSH_HOME || process.env.HOME + '/.dsh') + '/omdsh/file-recovery'
287
+
239
288
  - id: subprocess
240
289
  name: '@deepseek-ai/dsh-subprocess-local'
241
290
 
@@ -337,12 +386,23 @@
337
386
  config:
338
387
  maxBytes: 65536
339
388
 
389
+ - id: working-directory
390
+ name: '@deepseek-ai/dsh-working-directory'
391
+
392
+ - id: tool-working-directory
393
+ name: '@deepseek-ai/dsh-tool-working-directory'
394
+
340
395
  - id: tool-skill
341
396
  name: '@deepseek-ai/dsh-tool-skill'
342
397
 
343
398
  - id: tool-jobs
344
399
  name: '@deepseek-ai/dsh-tool-jobs'
345
400
 
401
+ # Reminder management tools bind to the calling Session and disappear in
402
+ # minimal through its allow list; delegated children are refused by the tool.
403
+ - id: tool-schedule
404
+ name: '@deepseek-ai/dsh-tool-schedule'
405
+
346
406
  # Persistent, owner-scoped terminal sessions for interactive stdin and
347
407
  # cross-call state (REPLs, debuggers, a shell to return to). The one-shot
348
408
  # bash/pwsh tools remain the default for bounded commands.
@@ -437,6 +497,17 @@
437
497
  # overlay.
438
498
  - id: web
439
499
  name: '@deepseek-ai/dsh-web'
500
+ config:
501
+ # The DeepSeek API providers retrieve directly, so a local fake-IP resolver
502
+ # or an auxiliary Messages turn cannot block search and fetch. The older
503
+ # Messages search and local HTTP fetch stay mounted as selectable fallbacks.
504
+ searchProvider: deepseek-search-api
505
+ fetchProvider: deepseek-fetch-api
506
+
507
+ - id: web-deepseek-api
508
+ name: '@deepseek-ai/dsh-web-deepseek-api'
509
+ config:
510
+ apiKeyEnv: DEEPSEEK_API_KEY
440
511
 
441
512
  - id: web-search-deepseek
442
513
  name: '@deepseek-ai/dsh-web-search-deepseek'
@@ -512,6 +583,14 @@
512
583
  - id: subagent
513
584
  name: '@deepseek-ai/dsh-subagent'
514
585
 
586
+ - id: btw
587
+ name: '@agi-fans/dsh-tui/btw'
588
+ config:
589
+ stateDir: !!js "(process.env.OMDSH_HOME || process.env.DSH_HOME || process.env.HOME + '/.dsh') + '/omdsh/btw'"
590
+
591
+ - id: tui-command-btw
592
+ name: '@agi-fans/dsh-tui/command-btw'
593
+
515
594
  - id: subagent-model-selection-settings
516
595
  name: '@deepseek-ai/dsh-tool-subagent/model-selection-settings'
517
596
 
@@ -536,10 +615,10 @@
536
615
  # transport: `spawn`/`fork` stay mounted and keep their parent-shared
537
616
  # features, which ACP cannot honour.
538
617
  #
539
- # ACP advertises no start-time capabilities and implements no continuable
540
- # runs, so `providerName: acp` must not be selected by a tool that needs
541
- # `agentOptions`, `persona`, `toolFilter`, a numeric `maxDepth`, or
542
- # `backgroundMode: continuable`.
618
+ # ACP advertises no parent-controlled start-time capabilities or follow-ups.
619
+ # Do not select `providerName: acp` for a tool that needs `agentOptions`,
620
+ # `persona`, `toolFilter`, or a numeric `maxDepth`. Local continuable
621
+ # children are managed by the subagent runtime.
543
622
  - id: subagent-acp
544
623
  name: '@deepseek-ai/dsh-subagent-acp'
545
624
  config:
@@ -554,8 +633,7 @@
554
633
  env:
555
634
  DSH_HOME: !!js (process.env.OMDSH_HOME || process.env.DSH_HOME || process.env.HOME + '/.dsh') + '/acp-child'
556
635
  OMDSH_HOME: !!js process.env.OMDSH_HOME || process.env.DSH_HOME || undefined
557
- OMDSH_DEEPSEEK_API_KEY: !!js process.env.OMDSH_DEEPSEEK_API_KEY || undefined
558
- DEEPSEEK_API_KEY: !!js process.env.DEEPSEEK_API_KEY || process.env.OMDSH_DEEPSEEK_API_KEY || undefined
636
+ DEEPSEEK_API_KEY: !!js process.env.DEEPSEEK_API_KEY || undefined
559
637
 
560
638
  - id: subagent-control
561
639
  name: '@deepseek-ai/dsh-tool-subagent-control'
@@ -568,25 +646,21 @@
568
646
  config:
569
647
  provider: spawn
570
648
  toolName: subagent
571
- backgroundMode: continuable
572
649
 
573
650
  - id: tool-subagent-fork
574
651
  name: '@deepseek-ai/dsh-tool-subagent'
575
652
  config:
576
653
  provider: fork
577
654
  toolName: subagent_fork
578
- backgroundMode: continuable
579
655
 
580
656
  # The isolated delegation tool. It is a second `dsh-tool-subagent` over the
581
657
  # out-of-process backend, so a caller chooses isolation per delegation
582
658
  # instead of trading the parent-shared features away globally.
583
659
  #
584
- # Three settings are forced by ACP's absent capabilities, not preferences:
660
+ # ACP's absent capabilities constrain the isolated tool:
585
661
  # - `maxDepth: provider-managed` — a numeric cap is refused because the
586
662
  # provider cannot enforce recursion depth across a process boundary, and
587
663
  # the child's own composition already bounds it.
588
- # - `backgroundMode: one-shot` — the published ACP provider implements no
589
- # `prepareContinuable`, so a continuable run is refused at mount.
590
664
  # - no `agentOptions`/`persona`/`toolFilter` — all three are refused.
591
665
  # The consequence is user-visible: an isolated child cannot be steered or
592
666
  # followed up after dispatch. Use `subagent` when that matters.
@@ -595,7 +669,6 @@
595
669
  config:
596
670
  provider: acp
597
671
  toolName: subagent_isolated
598
- backgroundMode: one-shot
599
672
  maxDepth: provider-managed
600
673
 
601
674
  # Workflow and Ralph, as the upstream base bundle mounts them.
@@ -610,10 +683,7 @@
610
683
  config:
611
684
  provider: spawn
612
685
 
613
- # `toolName` is renamed because omdsh already owns a `/workflow` slash command
614
- # that switches the Default/Plan workflow. The two live in different
615
- # namespaces (tool vs command) and never collide at runtime, but a bare
616
- # `workflow` entry in `/tools` would read as that command.
686
+ # Keep the explicit execution name stable for existing sessions and tool policies.
617
687
  - id: tool-workflow
618
688
  name: '@deepseek-ai/dsh-tool-workflow'
619
689
  config:
@@ -640,7 +710,7 @@
640
710
  model: !!js process.env.OMDSH_MODEL || 'deepseek-flash'
641
711
  # The settings overlay edits the Profile patch for optional features;
642
712
  # `disabled` is a Loader option the settings service cannot write, so
643
- # this row carries the home whose patch the Features section owns.
713
+ # this row carries the home whose patch the Tools feature controls own.
644
714
  dshHome: !!js process.env.OMDSH_HOME || process.env.DSH_HOME || process.env.HOME + '/.dsh'
645
715
 
646
716
  - id: agent-behavior
@@ -652,9 +722,7 @@
652
722
  - id: tui-session-runtime
653
723
  name: '@agi-fans/dsh-tui/session-runtime'
654
724
  config:
655
- # Product state this runtime owns: Session Library rows reused across
656
- # launches (without them a cold process reads every stored log again) and
657
- # the marker that upgrades stored sessions once per session format.
725
+ # Session Library rows reused across launches without rewriting old logs.
658
726
  stateDir: !!js "(process.env.OMDSH_HOME || process.env.DSH_HOME || process.env.HOME + '/.dsh') + '/omdsh'"
659
727
 
660
728
  - id: tui-human-interaction
@@ -666,12 +734,6 @@
666
734
  - id: tui-command-session-configuration
667
735
  name: '@agi-fans/dsh-tui/command-session-configuration'
668
736
 
669
- - id: tui-command-steer
670
- name: '@agi-fans/dsh-tui/command-steer'
671
-
672
- - id: tui-command-loop
673
- name: '@agi-fans/dsh-tui/command-loop'
674
-
675
737
  - id: tui-command-model
676
738
  name: '@agi-fans/dsh-tui/command-model'
677
739
 
@@ -687,12 +749,20 @@
687
749
  - id: tui-command-trajectory
688
750
  name: '@agi-fans/dsh-tui/command-trajectory'
689
751
 
690
- - id: tui-command-integrations
691
- name: '@agi-fans/dsh-tui/command-integrations'
752
+ # Plugin index sources; empty until the reader configures one, so a profile
753
+ # with no `indexes` pays no fetch.
754
+ - id: plugin-market
755
+ name: '@deepseek-ai/dsh-plugin-market'
692
756
 
693
757
  - id: tui-command-plugins
694
758
  name: '@agi-fans/dsh-tui/command-plugins'
695
759
 
760
+ - id: tui-command-schedule
761
+ name: '@agi-fans/dsh-tui/command-schedule'
762
+
763
+ - id: tui-command-integrations
764
+ name: '@agi-fans/dsh-tui/command-integrations'
765
+
696
766
  - id: tui-command-jobs
697
767
  name: '@agi-fans/dsh-tui/command-jobs'
698
768
 
@@ -0,0 +1,20 @@
1
+ # Internal composition for durable side consultations, including after resume.
2
+ - insert:
3
+ - id: preset-btw
4
+ name: '@deepseek-ai/dsh-agent-preset'
5
+ config:
6
+ id: btw
7
+ name: Side consultation
8
+ description: Answer from a fixed conversation snapshot without tools.
9
+ order: 100
10
+ plugins:
11
+ - id: persona
12
+ name: '@deepseek-ai/dsh-persona'
13
+ config:
14
+ prefix: >-
15
+ You are answering a separate side question about the copied conversation. Answer the current question briefly and directly using that context. Do not execute tasks, use tools, or ask follow-up questions. Your answer is independent advice and is not sent to the primary agent.{{omdsh_agent_behavior}}
16
+ complete: true
17
+ includeRuntimeContext: false
18
+
19
+ - id: policy
20
+ name: '@agi-fans/dsh-tui/btw-policy'
@@ -17,7 +17,7 @@
17
17
  name: '@deepseek-ai/dsh-persona'
18
18
  config:
19
19
  prefix: >-
20
- You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}. Prefer programmatic tool calling for multi-step operations when the generated tools SDK is available.
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
22
  # PTC presents the tool registry as a generated SDK over `run_code`, so the
23
23
  # general-purpose `workflow_run` tool would be a second model-authored
@@ -41,3 +41,8 @@
41
41
  name: '@deepseek-ai/dsh-agent-tool-presentation'
42
42
  config:
43
43
  mode: ptc
44
+
45
+ # Upstream Standard/Cordis/PTC presets carry a clock reading at least
46
+ # every ten minutes; the TUI process zone is the fallback display zone.
47
+ - id: time-context
48
+ name: '@deepseek-ai/dsh-time-context'
@@ -17,7 +17,7 @@
17
17
  name: '@deepseek-ai/dsh-persona'
18
18
  config:
19
19
  prefix: |-
20
- You are a coding agent powered by the {{model}} model, running on the DeepSeek Harness. Your working directory is {{cwd}}.
20
+ You are a coding agent powered by the {{model}} model, running on the DeepSeek Harness.
21
21
 
22
22
  You can inspect the live Cordis runtime while authoring compositions and plugins. Host composition owns shared registries and backends; an Agent preset owns one session's tools, persona, prompt sections, and isolated services. Use cordis_inspect_list to discover providers, then cordis_inspect_query to read exact Service, Event, and Tool APIs. Use the development skills for composition and plugin authoring. The plugin_manager tool manages this profile; it requires full host access or explicit approval, and dependency scripts require separate approval.
23
23
 
@@ -34,3 +34,8 @@
34
34
 
35
35
  - id: tool-plugin-manager
36
36
  name: '@deepseek-ai/dsh-plugin-manager/tools'
37
+
38
+ # Upstream Standard/Cordis/PTC presets carry a clock reading at least
39
+ # every ten minutes; the TUI process zone is the fallback display zone.
40
+ - id: time-context
41
+ name: '@deepseek-ai/dsh-time-context'
@@ -17,4 +17,9 @@
17
17
  name: '@deepseek-ai/dsh-persona'
18
18
  config:
19
19
  prefix: >-
20
- You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}.
20
+ You are a coding agent powered by the {{model}} model.
21
+
22
+ # Upstream Standard/Cordis/PTC presets carry a clock reading at least
23
+ # every ten minutes; the TUI process zone is the fallback display zone.
24
+ - id: time-context
25
+ name: '@deepseek-ai/dsh-time-context'
package/lib/args.d.ts CHANGED
@@ -10,6 +10,12 @@ export declare const OMDSH_CLI_COMMANDS: readonly [{
10
10
  }, {
11
11
  readonly name: "completions";
12
12
  readonly description: "Generate shell completion scripts";
13
+ }, {
14
+ readonly name: "doctor";
15
+ readonly description: "Check configuration and local prerequisites";
16
+ }, {
17
+ readonly name: "exec";
18
+ readonly description: "Run a prompt with versioned JSON output";
13
19
  }];
14
20
  export declare const OMDSH_CLI_OPTIONS: readonly [{
15
21
  readonly names: readonly ["--model"];
@@ -55,6 +61,14 @@ export interface OmdshInvocation {
55
61
  completions: CompletionShell | undefined;
56
62
  /** --help requested. */
57
63
  help: boolean;
64
+ /** Read-only diagnostics; no application or plugin is mounted. */
65
+ doctor?: {
66
+ json: boolean;
67
+ };
68
+ /** Independent machine-output execution, without the interactive frontend. */
69
+ exec?: {
70
+ json: true;
71
+ };
58
72
  }
59
73
  /**
60
74
  * Parse the omdsh command line.
package/lib/args.js CHANGED
@@ -6,6 +6,8 @@
6
6
  export const OMDSH_CLI_COMMANDS = [
7
7
  { name: 'plugin', description: 'Manage profile plugins' },
8
8
  { name: 'completions', description: 'Generate shell completion scripts' },
9
+ { name: 'doctor', description: 'Check configuration and local prerequisites' },
10
+ { name: 'exec', description: 'Run a prompt with versioned JSON output' },
9
11
  ];
10
12
  export const OMDSH_CLI_OPTIONS = [
11
13
  { names: ['--model'], description: 'Model route', takesValue: true },
@@ -24,6 +26,8 @@ Usage:
24
26
  omdsh plugin remove <package>
25
27
  omdsh plugin <pnpm-args...>
26
28
  omdsh completions bash|zsh|fish
29
+ omdsh doctor [--json]
30
+ omdsh exec --json [--resume <id>] [prompt...]
27
31
 
28
32
  Options:
29
33
  --model <name> model route (default deepseek-flash)
@@ -43,6 +47,55 @@ Environment:
43
47
  * @returns the invocation, or prints help/version and exits.
44
48
  */
45
49
  export function parseOmdshArgs(argv, version) {
50
+ if (argv[0] === 'exec') {
51
+ let json = false, model, provider, resume;
52
+ const prompt = [];
53
+ for (let index = 1; index < argv.length; index++) {
54
+ const arg = argv[index];
55
+ if (arg === '--help' || arg === '-h') {
56
+ console.log('Usage: omdsh exec --json [--model <route>] [--provider <route>] [--resume <id>] [--] [prompt...]\nUse - or omit the prompt to read one UTF-8 prompt from stdin through EOF.\nExit codes: 0 completed; 1 failed; 2 invalid input; 3 requires human input; 130 SIGINT; 143 SIGTERM.');
57
+ process.exit(0);
58
+ }
59
+ if (arg === '--') {
60
+ prompt.push(...argv.slice(index + 1));
61
+ break;
62
+ }
63
+ if (arg === '--json') {
64
+ json = true;
65
+ continue;
66
+ }
67
+ if (arg === '--model' || arg === '--provider' || arg === '--resume' || arg === '-r') {
68
+ const value = argv[++index];
69
+ if (value === undefined || value.startsWith('-'))
70
+ usageError(`${arg} requires a value`);
71
+ if (arg === '--model')
72
+ model = value;
73
+ else if (arg === '--provider')
74
+ provider = value;
75
+ else
76
+ resume = value;
77
+ }
78
+ else if (arg === '-' || !arg.startsWith('-'))
79
+ prompt.push(arg);
80
+ else
81
+ usageError('unknown exec option ' + arg);
82
+ }
83
+ if (!json)
84
+ usageError('exec requires --json');
85
+ return { prompt, model, provider, resume, dumpConfig: false, plugin: false, pluginArgs: [], completions: undefined, help: false, exec: { json: true } };
86
+ }
87
+ if (argv[0] === 'doctor') {
88
+ if (argv.slice(1).some(arg => arg !== '--json' && arg !== '--help' && arg !== '-h'))
89
+ usageError('doctor accepts only --json or --help');
90
+ if (argv.includes('--help') || argv.includes('-h')) {
91
+ console.log('Usage: omdsh doctor [--json]\nRead-only diagnostics. No plugins, servers or model requests are started.\nExit codes: 0 = no failed checks; 1 = failed checks; 2 = invalid arguments.');
92
+ process.exit(0);
93
+ }
94
+ return {
95
+ prompt: [], model: undefined, provider: undefined, resume: undefined, dumpConfig: false,
96
+ plugin: false, pluginArgs: [], completions: undefined, help: false, doctor: { json: argv.includes('--json') },
97
+ };
98
+ }
46
99
  if (argv[0] === 'plugin') {
47
100
  return {
48
101
  prompt: [],
package/lib/bin.js CHANGED
@@ -20,7 +20,18 @@ if (invocation.model !== undefined)
20
20
  process.env.OMDSH_MODEL = invocation.model;
21
21
  if (invocation.provider !== undefined)
22
22
  process.env.OMDSH_PROVIDER = invocation.provider;
23
- if (invocation.completions !== undefined) {
23
+ if (invocation.exec !== undefined) {
24
+ const { runExec } = await import("./exec.js");
25
+ process.exitCode = await runExec(invocation, readVersion());
26
+ }
27
+ else if (invocation.doctor !== undefined) {
28
+ const { runDoctor, formatDoctorReport } = await import("./doctor.js");
29
+ const { writeAll } = await import("./composition.js");
30
+ const report = await runDoctor({ version: readVersion() });
31
+ await writeAll(process.stdout, invocation.doctor.json ? JSON.stringify(report) + '\n' : formatDoctorReport(report));
32
+ process.exitCode = report.checks.some(check => check.status === 'failed') ? 1 : 0;
33
+ }
34
+ else if (invocation.completions !== undefined) {
24
35
  const { generateCompletions } = await import("./completions.js");
25
36
  process.stdout.write(generateCompletions(invocation.completions));
26
37
  }
package/lib/boot.d.ts CHANGED
@@ -17,3 +17,10 @@ export declare function runOmdsh(prompt: readonly string[], resume?: string): Pr
17
17
  ctx: Context;
18
18
  shutdown: ProcessShutdown;
19
19
  }>;
20
+ /** Mount the shared Profile for one frontend; callers own process lifetime. */
21
+ export declare function mountOmdsh(options: {
22
+ args: readonly string[];
23
+ exit(code: number): void;
24
+ mode?: 'interactive' | 'exec';
25
+ onContext?(ctx: Context): void;
26
+ }): Promise<Context>;