@norman-else/dsh-claude 0.1.35 → 0.1.37
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/INSTALL.md +55 -55
- package/LICENSE +21 -21
- package/README.md +196 -195
- package/cordis.patch.yml +12 -12
- package/legacy-preset/agent.cordis.yml +11 -11
- package/legacy-preset/preset.yml +4 -4
- package/lib/bin.mjs +1 -1
- package/lib/bin.mjs.map +1 -1
- package/lib/client.d.ts +13 -0
- package/lib/client.js +1176 -810
- package/lib/client.js.map +1 -1
- package/lib/{events-Doid-tq7.mjs → events-OhBoFNKO.mjs} +7 -2
- package/lib/events-OhBoFNKO.mjs.map +1 -0
- package/lib/index.d.mts +5 -0
- package/lib/index.mjs +256 -48
- package/lib/index.mjs.map +1 -1
- package/lib/{presenters-CXtE8qve.mjs → presenters-BBoM1Ju1.mjs} +2 -2
- package/lib/presenters-BBoM1Ju1.mjs.map +1 -0
- package/lib/{preset-installer-BMyKr5eQ.mjs → preset-installer-loenwnLS.mjs} +2 -2
- package/lib/preset-installer-loenwnLS.mjs.map +1 -0
- package/lib/preset-route.mjs +2 -2
- package/lib/preset-route.mjs.map +1 -1
- package/package.json +195 -189
- package/preset/claude/agent.cordis.yml +11 -11
- package/preset/claude/preset.yml +4 -4
- package/lib/events-Doid-tq7.mjs.map +0 -1
- package/lib/presenters-CXtE8qve.mjs.map +0 -1
- package/lib/preset-installer-BMyKr5eQ.mjs.map +0 -1
package/cordis.patch.yml
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# dsh-claude host bundle. The preset stays inside this package as a system
|
|
2
|
-
# preset, so removing the profile dependency removes the complete integration.
|
|
3
|
-
- id: agent-presets
|
|
4
|
-
config:
|
|
5
|
-
default: standard
|
|
6
|
-
roots:
|
|
7
|
-
- path: !!js "process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(ctx.baseUrl).resolve('@norman-else/dsh-claude/package.json')), 'preset')"
|
|
8
|
-
trust: system
|
|
9
|
-
|
|
10
|
-
- insert:
|
|
11
|
-
- id: llm-claude
|
|
12
|
-
name: '@norman-else/dsh-claude'
|
|
1
|
+
# dsh-claude host bundle. The preset stays inside this package as a system
|
|
2
|
+
# preset, so removing the profile dependency removes the complete integration.
|
|
3
|
+
- id: agent-presets
|
|
4
|
+
config:
|
|
5
|
+
default: standard
|
|
6
|
+
roots:
|
|
7
|
+
- path: !!js "process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(ctx.baseUrl).resolve('@norman-else/dsh-claude/package.json')), 'preset')"
|
|
8
|
+
trust: system
|
|
9
|
+
|
|
10
|
+
- insert:
|
|
11
|
+
- id: llm-claude
|
|
12
|
+
name: '@norman-else/dsh-claude'
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# Shipped by dsh-claude. Claude Code owns the inner agent loop and tools;
|
|
2
|
-
# this system preset contributes only the request-route override. DSH resolves
|
|
3
|
-
# the bare package specifier from the host profile when mounting system roots.
|
|
4
|
-
- id: claude-code-route
|
|
5
|
-
name: '@norman-else/dsh-claude/preset-route'
|
|
6
|
-
# Entry-local isolate realm: each session's preset mount gets its own
|
|
7
|
-
# claudeCommands service instance (keeps mountPreset's leaked-service check
|
|
8
|
-
# happy and prevents cross-session collisions). The host reads it through
|
|
9
|
-
# dsh-agent-presets' serviceForAgent().
|
|
10
|
-
isolate:
|
|
11
|
-
claudeCommands: true
|
|
1
|
+
# Shipped by dsh-claude. Claude Code owns the inner agent loop and tools;
|
|
2
|
+
# this system preset contributes only the request-route override. DSH resolves
|
|
3
|
+
# the bare package specifier from the host profile when mounting system roots.
|
|
4
|
+
- id: claude-code-route
|
|
5
|
+
name: '@norman-else/dsh-claude/preset-route'
|
|
6
|
+
# Entry-local isolate realm: each session's preset mount gets its own
|
|
7
|
+
# claudeCommands service instance (keeps mountPreset's leaked-service check
|
|
8
|
+
# happy and prevents cross-session collisions). The host reads it through
|
|
9
|
+
# dsh-agent-presets' serviceForAgent().
|
|
10
|
+
isolate:
|
|
11
|
+
claudeCommands: true
|
package/legacy-preset/preset.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Shipped by dsh-claude. Copy this system preset under a new id to customize it.
|
|
2
|
-
name: Claude
|
|
3
|
-
description: Use the local Claude Code as the complete agent runtime inside DSH.
|
|
4
|
-
order: 10
|
|
1
|
+
# Shipped by dsh-claude. Copy this system preset under a new id to customize it.
|
|
2
|
+
name: Claude
|
|
3
|
+
description: Use the local Claude Code as the complete agent runtime inside DSH.
|
|
4
|
+
order: 10
|
package/lib/bin.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as parseClaudeVersion, n as ensureManagedPreset, r as removeManagedPreset } from "./preset-installer-
|
|
2
|
+
import { i as parseClaudeVersion, n as ensureManagedPreset, r as removeManagedPreset } from "./preset-installer-loenwnLS.mjs";
|
|
3
3
|
import { access } from "node:fs/promises";
|
|
4
4
|
import { delimiter, isAbsolute, join } from "node:path";
|
|
5
5
|
import { constants } from "node:fs";
|
package/lib/bin.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.mjs","names":[],"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\
|
|
1
|
+
{"version":3,"file":"bin.mjs","names":[],"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { access } from 'node:fs/promises'\nimport { constants } from 'node:fs'\nimport { homedir } from 'node:os'\nimport { delimiter, isAbsolute, join } from 'node:path'\nimport { spawnSync } from 'node:child_process'\nimport { scrubbedParentEnv } from '@deepseek-ai/dsh-subprocess'\nimport { parseClaudeVersion } from './executable.ts'\nimport { ensureManagedPreset, removeManagedPreset } from './preset-installer.ts'\n\nfunction option(name: string): string | undefined {\n const index = process.argv.indexOf(name)\n return index < 0 ? undefined : process.argv[index + 1]\n}\n\nasync function executable(configured?: string): Promise<string | undefined> {\n const candidates: string[] = []\n if (configured !== undefined) candidates.push(configured)\n else {\n for (const directory of (process.env.PATH ?? '').split(delimiter)) {\n if (directory.length > 0) candidates.push(join(directory, 'claude'))\n }\n candidates.push(join(homedir(), '.local', 'bin', 'claude'), '/opt/homebrew/bin/claude', '/usr/local/bin/claude')\n }\n for (const candidate of [...new Set(candidates)]) {\n if (!isAbsolute(candidate)) continue\n try {\n await access(candidate, constants.X_OK)\n return candidate\n } catch {\n // Continue to the next documented candidate.\n }\n }\n return undefined\n}\n\nfunction run(executablePath: string, args: string[]) {\n return spawnSync(executablePath, args, {\n encoding: 'utf8',\n env: scrubbedParentEnv(),\n timeout: 15_000,\n windowsHide: true,\n })\n}\n\nasync function doctor(): Promise<number> {\n const configured = option('--executable') ?? process.env.DSH_CLAUDE_CODE_EXECUTABLE\n const path = await executable(configured)\n if (path === undefined) {\n process.stdout.write(`${JSON.stringify({\n executable: { status: 'missing', searched: configured === undefined ? ['claude', '~/.local/bin/claude', '/opt/homebrew/bin/claude', '/usr/local/bin/claude'] : [configured] },\n version: { status: 'not-run' },\n authentication: { status: 'not-run' },\n message: 'Set executablePath to an absolute Claude Code CLI path',\n }, null, 2)}\\n`)\n return 1\n }\n const versionProbe = run(path, ['--version'])\n const version = parseClaudeVersion(`${versionProbe.stdout ?? ''}\\n${versionProbe.stderr ?? ''}`)\n const authProbe = run(path, ['auth', 'status', '--json'])\n let authentication: Record<string, unknown> = { status: 'unknown' }\n if (authProbe.status === 0) {\n try {\n const value = JSON.parse(authProbe.stdout) as Record<string, unknown>\n authentication = {\n status: value.loggedIn === true ? 'signed-in' : 'signed-out',\n ...(typeof value.authMethod === 'string' ? { method: value.authMethod } : {}),\n ...(typeof value.apiProvider === 'string' ? { provider: value.apiProvider } : {}),\n ...(typeof value.subscriptionType === 'string' ? { subscription: value.subscriptionType } : {}),\n }\n } catch {\n authentication = { status: 'unknown', message: 'Authentication status was not valid JSON' }\n }\n }\n process.stdout.write(`${JSON.stringify({\n executable: { status: 'found', path },\n version: version === undefined ? { status: 'error' } : { status: 'ok', value: version },\n authentication,\n handshake: 'not-run',\n }, null, 2)}\\n`)\n return version === undefined ? 1 : 0\n}\n\nasync function main(): Promise<number> {\n const command = process.argv[2] ?? 'doctor'\n if (command === 'doctor') return doctor()\n if (command === 'install-preset') {\n process.stdout.write(`${await ensureManagedPreset()}\\n`)\n return 0\n }\n if (command === 'remove-preset') {\n process.stdout.write(`${await removeManagedPreset()}\\n`)\n return 0\n }\n process.stderr.write(`Usage: dsh-claude [doctor [--executable PATH] | install-preset | remove-preset]\\n`)\n return 2\n}\n\ntry {\n process.exitCode = await main()\n} catch (error) {\n process.stderr.write(`${error instanceof Error ? error.message : String(error)}\\n`)\n process.exitCode = 1\n}\n"],"mappings":";;;;;;;;;AAWA,SAAS,OAAO,MAAkC;CAChD,MAAM,QAAQ,QAAQ,KAAK,QAAQ,IAAI;CACvC,OAAO,QAAQ,IAAI,KAAA,IAAY,QAAQ,KAAK,QAAQ;AACtD;AAEA,eAAe,WAAW,YAAkD;CAC1E,MAAM,aAAuB,CAAC;CAC9B,IAAI,eAAe,KAAA,GAAW,WAAW,KAAK,UAAU;MACnD;EACH,KAAK,MAAM,cAAc,QAAQ,IAAI,QAAQ,GAAA,CAAI,MAAM,SAAS,GAC9D,IAAI,UAAU,SAAS,GAAG,WAAW,KAAK,KAAK,WAAW,QAAQ,CAAC;EAErE,WAAW,KAAK,KAAK,QAAQ,GAAG,UAAU,OAAO,QAAQ,GAAG,4BAA4B,uBAAuB;CACjH;CACA,KAAK,MAAM,aAAa,CAAC,GAAG,IAAI,IAAI,UAAU,CAAC,GAAG;EAChD,IAAI,CAAC,WAAW,SAAS,GAAG;EAC5B,IAAI;GACF,MAAM,OAAO,WAAW,UAAU,IAAI;GACtC,OAAO;EACT,QAAQ,CAER;CACF;AAEF;AAEA,SAAS,IAAI,gBAAwB,MAAgB;CACnD,OAAO,UAAU,gBAAgB,MA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pC,SAAS,YAAY,KAAA,IAAY,EAAE,QAAQ,QAAQ,IAAI;GAAE,QAAQ;GAAM,OAAO;EAAQ;EACtF;EACA,WAAW;CACb,GAAG,MAAM,CAAC,EAAE,GAAG;CACf,OAAO,YAAY,KAAA,IAAY,IAAI;AACrC;AAEA,eAAe,OAAwB;CACrC,MAAM,UAAU,QAAQ,KAAK,MAAM;CACnC,IAAI,YAAY,UAAU,OAAO,OAAO;CACxC,IAAI,YAAY,kBAAkB;EAChC,QAAQ,OAAO,MAAM,GAAG,MAAM,oBAAoB,EAAE,GAAG;EACvD,OAAO;CACT;CACA,IAAI,YAAY,iBAAiB;EAC/B,QAAQ,OAAO,MAAM,GAAG,MAAM,oBAAoB,EAAE,GAAG;EACvD,OAAO;CACT;CACA,QAAQ,OAAO,MAAM,mFAAmF;CACxG,OAAO;AACT;AAEA,IAAI;CACF,QAAQ,WAAW,MAAM,KAAK;AAChC,SAAS,OAAO;CACd,QAAQ,OAAO,MAAM,GAAG,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAE,GAAG;CAClF,QAAQ,WAAW;AACrB"}
|
package/lib/client.d.ts
CHANGED
|
@@ -50,6 +50,10 @@ declare const en: {
|
|
|
50
50
|
readonly rendererPlugin: "Plugin renderer";
|
|
51
51
|
readonly rendererNative: "DSH native renderer";
|
|
52
52
|
readonly rendererEffect: "The plugin renderer keeps this package’s own transcript: interleaved prose, grouped tool cards, and activity rows. The DSH native renderer hands the same turn to DSH itself — prose as ordinary assistant text blocks, thinking as reasoning blocks, and root Claude tools mirrored into native tool cards. A change applies from the next turn; turns already recorded keep the renderer they were recorded with and are not redrawn.";
|
|
53
|
+
readonly prose: "Markdown colour highlighting";
|
|
54
|
+
readonly prosePlain: "Off";
|
|
55
|
+
readonly proseEnhanced: "On";
|
|
56
|
+
readonly proseEffect: "Gives headings, bold, italics, inline code, list markers, quotes and links their own colours, and paints the code block on a dark outlined surface. This overrides the Claude-desktop palette this package matches by default. Only applies under the plugin renderer, and takes effect immediately rather than on the next turn.";
|
|
53
57
|
readonly worktreeBranchPrefix: "Worktree branch prefix";
|
|
54
58
|
readonly worktreeBranchPrefixEffect: "Prefix changes apply to subsequently generated Worktree branches. Explicit full branch names remain unchanged.";
|
|
55
59
|
readonly maxProcessesSetting: "Claude process limit";
|
|
@@ -144,6 +148,7 @@ declare const en: {
|
|
|
144
148
|
readonly repositoryProgressDismiss: "Dismiss Worktree progress";
|
|
145
149
|
readonly repositoryProgress_inspecting: "Checking repository and branch";
|
|
146
150
|
readonly repositoryProgress_fetching: "Refreshing remote references";
|
|
151
|
+
readonly repositoryProgress_summarizing: "Naming the branch after the request";
|
|
147
152
|
readonly 'repositoryProgress_creating-worktree': "Creating branch and Worktree";
|
|
148
153
|
readonly 'repositoryProgress_saving-worktree': "Saving Worktree state";
|
|
149
154
|
readonly 'repositoryProgress_switching-branch': "Switching local branch";
|
|
@@ -201,6 +206,9 @@ declare const en: {
|
|
|
201
206
|
readonly diffCommentNext: "Next comment";
|
|
202
207
|
readonly diffCommentPosition: "Comment {index} of {total}";
|
|
203
208
|
readonly diffCommentCounter: "{index}/{total}";
|
|
209
|
+
readonly diffCardExpand: "Show {count} more lines";
|
|
210
|
+
readonly diffCardCollapse: "Show less";
|
|
211
|
+
readonly diffCardFiles: "{count} files";
|
|
204
212
|
readonly diffExpandAll: "Expand all files";
|
|
205
213
|
readonly diffCollapseAll: "Collapse all files";
|
|
206
214
|
readonly diffRestore: "Restore diff panel";
|
|
@@ -363,6 +371,11 @@ declare const en: {
|
|
|
363
371
|
readonly rewindFailed: "The rewind failed ({code}).";
|
|
364
372
|
readonly rewindBusy: "This session is running; wait for the turn to finish before rewinding.";
|
|
365
373
|
readonly rewindStale: "The Host process is still running the previous plugin build, which has no rewind route. Restart DSH and try again.";
|
|
374
|
+
readonly turnUsage: "Turn usage";
|
|
375
|
+
readonly turnUsageTokens: "{count} tok";
|
|
376
|
+
readonly turnUsageCache: "Cache hit {percent}%";
|
|
377
|
+
readonly turnUsageTtft: "TTFT {duration}";
|
|
378
|
+
readonly turnUsageCost: "${cost} total";
|
|
366
379
|
};
|
|
367
380
|
type ClaudeCodeSettingsKey = keyof typeof en;
|
|
368
381
|
//#endregion
|