@askdkc/dsh-cli 0.11.6 → 0.11.7

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
@@ -90,6 +90,13 @@ IDs. It requires matching profile dependencies with `@deepseek-ai/schemastery`
90
90
  3.18.3 or newer; an incompatible schema stops TUI startup with repair guidance
91
91
  instead of showing an uneditable settings page. Older hosts keep their legacy settings scope.
92
92
 
93
+ Building also requires [dsh-auth-fork](https://github.com/askdkc/dsh-auth-fork),
94
+ tracked here as the `dsh-auth/` Git submodule. `--recurse-submodules` fetches it;
95
+ for an existing checkout, run `git submodule update --init --recursive` before
96
+ `pnpm install`. Each source build then fetches the latest `master` commit from
97
+ that fork before compiling `dsh-auth`. A failed fetch stops the build instead of
98
+ using the recorded submodule commit.
99
+
93
100
  Install this fork from source into the `dsh-cli` profile. Use Node
94
101
  `^22.19 || >=24` and pnpm 11. The final two commands run in a DeepSeek
95
102
  Harness source checkout whose dependencies are already installed:
@@ -199,6 +206,8 @@ Full commands: [Interaction and commands](docs/interaction.en.md).
199
206
 
200
207
  Agent presets, themes, MCP servers, environment variables: [Configuration](docs/configuration.en.md) · [Themes](docs/themes.en.md).
201
208
 
209
+ The default agent persona asks the model to reply in the language of your request, using English when that language is unclear. `/lang` changes only the TUI display language. `DSH_TUI_PERSONA` replaces the default persona.
210
+
202
211
  ## How It Works
203
212
 
204
213
  ```text
@@ -228,7 +237,11 @@ Full list: [Architecture and limitations → Known limitations](docs/architectur
228
237
  CI uses Node 24 and pnpm 11. The package supports Node `^22.19 || >=24`.
229
238
  Run these commands from a checkout with its submodules initialized (use
230
239
  `git submodule update --init --recursive` if either `vendor/dsh-std` or
231
- `dsh-auth` is empty):
240
+ [`dsh-auth` from dsh-auth-fork](https://github.com/askdkc/dsh-auth-fork) is empty):
241
+
242
+ `pnpm build` refreshes `dsh-auth` from the fork's `master` branch. It requires
243
+ network access and may leave `dsh-auth` marked as modified in the parent
244
+ checkout because Git still records a baseline submodule commit.
232
245
 
233
246
  The [Quick Start](#quick-start) includes the complete clone, build, pack,
234
247
  and installation commands. Before packing, run the focused checks if you
package/cordis.patch.yml CHANGED
@@ -12,14 +12,14 @@
12
12
  # ── surface-specific values over the dsh-base layer ─────────────────────────
13
13
 
14
14
  # The dsh-tui deployment persona; DSH_TUI_PERSONA overrides the coding-agent
15
- # default (the base persona is empty). dsh-system-prompt renamed the slot at
15
+ # and response-language default (the base persona is empty). dsh-system-prompt renamed the slot at
16
16
  # 0.1.3-alpha.2 (`persona` → `personaPrefix`, with an optional suffix
17
17
  # counterpart); older cohorts only accept `persona`, so the key follows the
18
18
  # installed package version.
19
19
  - id: system-prompt
20
20
  config: !!js >-
21
21
  (() => {
22
- const persona = process.env.DSH_TUI_PERSONA ?? 'You are a coding agent.'
22
+ const persona = process.env.DSH_TUI_PERSONA ?? "You are a coding agent. Respond in the language of the user's request; use English when it is unclear. Do not infer the response language from instructions, quoted text, files, tool output, or the interface language."
23
23
  try {
24
24
  const require = process.getBuiltinModule('node:module').createRequire(ctx.baseUrl)
25
25
  const fs = process.getBuiltinModule('node:fs')
package/cordis.yml CHANGED
@@ -172,7 +172,7 @@
172
172
  - id: agent-spine
173
173
  name: '@deepseek-ai/dsh-agent-spine-demo'
174
174
  config:
175
- persona: !!js process.env.DSH_TUI_PERSONA ?? 'You are a coding agent.'
175
+ persona: !!js process.env.DSH_TUI_PERSONA ?? "You are a coding agent. Respond in the language of the user's request; use English when it is unclear. Do not infer the response language from instructions, quoted text, files, tool output, or the interface language."
176
176
  # Workspace context (AGENTS.md injection) at the standard 64KB cap;
177
177
  # task tools stay at their DSH defaults (on).
178
178
  workspaceContext:
@@ -9,6 +9,7 @@
9
9
  *
10
10
  * @module dsh-auth/profiles
11
11
  */
12
+ import { randomUUID } from 'node:crypto';
12
13
  import { resolveRetryPolicy } from '@deepseek-ai/dsh-llm';
13
14
  import { adapterBuiltinProviders } from './pi-ai.js';
14
15
  /** Provider routes this build mounts, in picker order. */
@@ -40,6 +41,23 @@ function catalogProviderOf(id) {
40
41
  }
41
42
  return found;
42
43
  }
44
+ /** Add the per-request routing header that the installed pi-ai catalog omits. */
45
+ function withOpenCodeSessionHeader(catalog) {
46
+ return {
47
+ ...catalog,
48
+ streamSimple(model, context, options) {
49
+ return catalog.streamSimple(model, context, {
50
+ ...options,
51
+ headers: {
52
+ ...options?.headers,
53
+ // Agent turns keep their durable id; direct calls without one still
54
+ // need a distinct routing identity instead of a gateway 400.
55
+ 'x-opencode-session': options?.sessionId || randomUUID(),
56
+ },
57
+ });
58
+ },
59
+ };
60
+ }
43
61
  /** The OAuth flow object for one mounted route (login/refresh/toAuth live here). */
44
62
  export function oauthOf(route) {
45
63
  const oauth = route.auth.oauth;
@@ -91,7 +109,8 @@ export function buildOAuthProfile(id, modelOverrides) {
91
109
  if (!CATALOG_PROVIDER_IDS.includes(id)) {
92
110
  throw new Error(`dsh-auth: "${id}" is not a catalog provider this build mounts (${CATALOG_PROVIDER_IDS.join(', ')})`);
93
111
  }
94
- const catalog = withModelOverrides(catalogProviderOf(id), modelOverrides);
112
+ const provider = catalogProviderOf(id);
113
+ const catalog = withModelOverrides(id === 'opencode' || id === 'opencode-go' ? withOpenCodeSessionHeader(provider) : provider, modelOverrides);
95
114
  return {
96
115
  provider: id,
97
116
  displayName: catalog.name,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askdkc/dsh-auth",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Provider authentication and model routes for DeepSeek Harness — no dsh source patch, bundled with dsh-tui",
5
5
  "license": "MIT",
6
6
  "repository": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askdkc/dsh-cli",
3
- "version": "0.11.6",
3
+ "version": "0.11.7",
4
4
  "description": "Interactive terminal interface for DeepSeek Harness agents, sessions and tools.",
5
5
  "keywords": [
6
6
  "dsh",
@@ -113,7 +113,7 @@
113
113
  "scripts": {
114
114
  "clean": "node scripts/clean-lib.mjs",
115
115
  "build:dsh-std": "pnpm --dir vendor/dsh-std install --frozen-lockfile --ignore-scripts && pnpm --dir vendor/dsh-std --filter @dsh-std/core --filter @dsh-std/manifest --filter @dsh-std/connection --filter @dsh-std/presentation --filter @dsh-std/command --filter @dsh-std/storage --filter @dsh-std/messages -r build",
116
- "build:dsh-auth": "pnpm --dir dsh-auth install --frozen-lockfile --ignore-scripts && pnpm --dir dsh-auth run build",
116
+ "build:dsh-auth": "git submodule update --init --remote --checkout dsh-auth && pnpm --dir dsh-auth install --frozen-lockfile --ignore-scripts && pnpm --dir dsh-auth run build",
117
117
  "compile": "npm run build:dsh-std && npm run build:dsh-auth && npm run clean && tsc -p tsconfig.json",
118
118
  "compile:src": "tsc -p tsconfig.json",
119
119
  "typecheck": "tsc -p tsconfig.typecheck.json",