@crazyhappyone/dsh-tui 0.1.0-alpha.49 → 0.1.0-alpha.50

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/bin/dsh-tui.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  /** Command-line entry for the dsh-tui source-runtime launcher. */
3
3
 
4
- import { lstatSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'
4
+ import { lstatSync, mkdirSync, readFileSync } from 'node:fs'
5
5
  import { constants, homedir } from 'node:os'
6
6
  import { fileURLToPath } from 'node:url'
7
7
  import { spawnSync } from 'node:child_process'
@@ -32,7 +32,9 @@ function run(command, args, options = {}) {
32
32
  shell: false,
33
33
  timeout: options.timeoutMs,
34
34
  killSignal: 'SIGKILL',
35
- stdio: options.stdio === 'inherit' ? 'inherit' : capture ? ['ignore', 'pipe', 'pipe'] : 'inherit',
35
+ stdio: options.stdio === 'inherit' ? 'inherit'
36
+ : options.stdio === 'output' ? ['ignore', 'inherit', 'inherit']
37
+ : capture ? ['ignore', 'pipe', 'pipe'] : 'inherit',
36
38
  })
37
39
  if (result.error !== undefined) {
38
40
  return { status: 1, stdout: '', stderr: result.error.message }
@@ -78,7 +80,6 @@ try {
78
80
  inspectPath,
79
81
  makeDirectory: path => mkdirSync(path, { recursive: true, mode: 0o700 }),
80
82
  readText: path => readFileSync(path, 'utf8'),
81
- writeText: (path, content) => writeFileSync(path, content, 'utf8'),
82
83
  run,
83
84
  writeOut: text => process.stdout.write(text),
84
85
  writeError: text => process.stderr.write(text),
package/cordis.patch.yml CHANGED
@@ -1,20 +1,24 @@
1
1
  # yaml-language-server: $schema=none
2
- # The deepseek-tui bundle patch: terminal-surface mode directly over dsh-base.
2
+ # The dsh-tui bundle layer: a terminal surface over @deepseek-ai/dsh-base.
3
3
  # It mounts no Host, HTTP server, Web runtime, or browser plugin. An ordinary
4
- # provider plugin parses --resume/--cwd and the task positional, then the
5
- # terminal driver creates an Agent through the core registry and prints its
6
- # durable result. Unlike the web surface, the agent plane stays process-wide:
7
- # dsh-base keeps tool-bash/tool-fs/tool-todo and friends because the TUI is
8
- # single-session and composes its agent process-wide. Insert and config rows
9
- # resolve through the 0.1.6-alpha.2 runtime Loader; this file is not a
10
- # compile-time plugin graph.
11
-
4
+ # provider plugin parses --resume/--cwd and the task positional; the terminal
5
+ # driver then creates an Agent through the core registry. The UI displays one
6
+ # Session; scheduled reminders can activate other Sessions in the same process.
7
+ #
8
+ # Install it as a bundle so user settings (written to the profile layer)
9
+ # apply after this layer:
10
+ # dsh plugin --profile tui add @crazyhappyone/dsh-tui
11
+ # dsh --profile tui
12
+ # Rows target the dsh 0.2 Loader and name plugins through this package's
13
+ # exports, so profile-layer edits record a portable row name.
14
+
15
+ # The working directory reaches the model through the runtime-context
16
+ # message; dsh 0.2.1 registers no cwd prompt variable.
12
17
  - id: system-prompt
13
18
  config:
14
- persona: >-
19
+ personaPrefix: >-
15
20
  You are a coding agent powered by the {{model}} model.
16
- Your working directory is {{cwd}}.
17
- You are interacting with the user through the deepseek-tui
21
+ You are interacting with the user through the dsh-tui
18
22
  terminal interface.
19
23
 
20
24
  # HMR stays disabled. Profile and home patch edits apply on the next
@@ -25,16 +29,7 @@
25
29
  - id: tools
26
30
  config:
27
31
  # Keep the same temporary process-wide Code Mode opt-in as the Web surface.
28
- # pi-lens-ignore: YAML:0
29
- mode: !!js process.env.DSH_TOOLS_MODE
30
-
31
- - id: approval
32
- # pi-lens-ignore: YAML:0
33
- config:
34
- policy: !!js >-
35
- (process.env.DSH_PERMISSION_MODE ?? 'workspace-write')
36
- === 'danger-full-access'
37
- ? 'never' : 'ask'
32
+ mode: native
38
33
 
39
34
  # Full-text session search stays disabled until the first Ctrl+K search (the
40
35
  # base row's `openAt: never`). The TUI has no browser-latency concern, so the
@@ -44,25 +39,8 @@
44
39
  path: ':memory:'
45
40
  openAt: first-search
46
41
 
47
- # Inherit the 0.1.6-alpha.2 llm-deepseek DEFAULT_MODELS catalog
48
- # (`deepseek-flash`, `deepseek-v4-pro`). Do not re-list removed V4 Flash
49
- # / V4 Flash Vision Exp ids here. Protocol stays Messages unless a PTY
50
- # snapshot sets DSH_LLM_PROTOCOL=chat-completions for the mock server.
51
- - id: llm-deepseek
52
- config:
53
- # pi-lens-ignore: YAML:0
54
- protocol: !!js "process.env.DSH_LLM_PROTOCOL ?? 'messages'"
55
-
56
- - id: agent-default-model
57
- config:
58
- # pi-lens-ignore: YAML:0
59
- provider: deepseek-official
60
- # pi-lens-ignore: YAML:0
61
- model: !!js "process.env.DSH_MODEL ?? 'deepseek-flash'"
62
-
63
- # pi-lens-ignore: YAML:0
42
+ # The first-prompt title gets the whole first prompt, not the base 4 KiB.
64
43
  - id: session-title-llm
65
- name: "@deepseek-ai/dsh-session-title-first-prompt-llm"
66
44
  config:
67
45
  targetWords: 5
68
46
  targetCjkCharacters: 10
@@ -71,6 +49,27 @@
71
49
  timeoutMs: 60000
72
50
 
73
51
  - insert:
52
+ # Official task storage/runtime over the terminal's shared cold-Session
53
+ # activation owner. No browser Session API or upload transport is mounted.
54
+ - id: schedule
55
+ name: '@crazyhappyone/dsh-tui/schedule'
56
+
57
+ - id: tool-schedule
58
+ name: '@deepseek-ai/dsh-tool-schedule'
59
+
60
+ # Durable current-time context uses the process time zone and refreshes
61
+ # at most once per ten minutes, matching the official provider defaults.
62
+ - id: time-context
63
+ name: '@deepseek-ai/dsh-time-context'
64
+ config:
65
+ refreshIntervalMs: 600000
66
+
67
+ # Explicit file deliveries stay in the owning Session log.
68
+ - id: tool-present
69
+ name: '@deepseek-ai/dsh-tool-present'
70
+ config:
71
+ maxFiles: 8
72
+
74
73
  # Per-round token/duration stats for the terminal status line.
75
74
  - id: session-stats
76
75
  name: "@deepseek-ai/dsh-session-stats"
@@ -86,17 +85,13 @@
86
85
  name: "@deepseek-ai/dsh-tool-ask-user"
87
86
 
88
87
  - id: tui-startup
89
- name: "./dist/startup.js"
88
+ name: "@crazyhappyone/dsh-tui/startup"
90
89
 
91
- # Zero-config official OpenAI/Anthropic routes. They register
92
- # openai-official / anthropic-official so they do not collide with the
93
- # dormant llm-pi-ai catalog keys openai / anthropic that the Web Models
94
- # page already owns.
95
- - id: llm-openai
96
- name: "@deepseek-ai/dsh-llm-openai"
97
-
98
- - id: llm-anthropic
99
- name: "@deepseek-ai/dsh-llm-anthropic"
90
+ # TUI presentation preferences (locale, Enter behavior, notifications,
91
+ # scrollbar, thinking visibility). Every field is volatile, so /settings
92
+ # edits land in the profile layer and apply without a remount.
93
+ - id: tui
94
+ name: "@crazyhappyone/dsh-tui/settings"
100
95
 
101
96
  # In-process OpenCode Zen header proxy (vendored from
102
97
  # zhangyang-crazy-one/dsh-zen-proxy, MIT). Listens on localhost
@@ -104,11 +99,21 @@
104
99
  # http://127.0.0.1:4097/v1 to reach the Zen free tier.
105
100
  # Remove this row to disable the listener.
106
101
  - id: zen-proxy
107
- name: "./dist/zen-proxy.js"
102
+ name: "@crazyhappyone/dsh-tui/zen-proxy"
108
103
  config:
109
104
  host: 127.0.0.1
110
105
  port: 4097
111
106
 
107
+ # Loopback route carrier for the DeepSeek account browser callback
108
+ # (/login). Port 0 takes a free port from the OS; pin a port here when
109
+ # an SSH session forwards it. Only routes registered by mounted plugins
110
+ # are served, and the address must stay a loopback literal.
111
+ - id: webserver
112
+ name: '@deepseek-ai/dsh-host-webserver'
113
+ config:
114
+ host: 127.0.0.1
115
+ port: 0
116
+
112
117
  # Records each top-level turn's changed files from git working-tree
113
118
  # snapshots; the TUI projects a bounded transcript card from Host
114
119
  # summaries. Bounds match the plugin Config defaults.
@@ -123,22 +128,18 @@
123
128
 
124
129
  # Reads its task from the ordinary tuiStartup provider.
125
130
  - id: tui-runtime
126
- # pi-lens-ignore: YAML:0
127
- name: "./dist/index.js"
131
+ name: "@crazyhappyone/dsh-tui/runtime"
128
132
  inject: [tuiStartup]
129
- # pi-lens-ignore: YAML:0
130
133
  config:
131
- # pi-lens-ignore: YAML:0
132
134
  task: !!js ctx.tuiStartup.task
133
135
  resume: !!js ctx.tuiStartup.resume
134
- # pi-lens-ignore: YAML:0
135
136
  cwd: !!js ctx.tuiStartup.cwd
136
137
  model: !!js ctx.tuiStartup.model
137
138
  frameStats: !!js ctx.tuiStartup.frameStats
138
139
  # Render policy (overscan, stream pacing, scroll pacing, cache).
139
- # Loaded by the runtime Config schema; the values below mirror the
140
- # schema defaults so the deployment layer owns the tunables. Override
141
- # here to retune without touching the plugin.
140
+ # The values mirror the runtime Config schema defaults so the
141
+ # deployment layer owns the tunables; override in the profile patch
142
+ # to retune without touching the plugin.
142
143
  renderPolicy:
143
144
  transcriptOverscan: 16
144
145
  stream:
@@ -159,3 +160,8 @@
159
160
  cache:
160
161
  maxRows: 4096
161
162
  maxBytes: 4194304
163
+
164
+ # Terminal marketplace catalog uses the Host service; installs retain plugin-manager approval.
165
+ - insert:
166
+ - id: plugin-market
167
+ name: "@deepseek-ai/dsh-plugin-market"