dsh-edge 0.1.0 → 0.1.1
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/LICENSE +1 -1
- package/README.i18n.yaml +2 -2
- package/README.md +2 -0
- package/README.zh.md +2 -0
- package/THIRD_PARTY_NOTICES.md +40 -12
- package/dist/index.html +1 -1
- package/dist/plugins/@deepseek-ai/dsh-client-locale/client.js +7 -7
- package/dist/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js +61 -61
- package/dist/plugins/@deepseek-ai/dsh-client-ui-commands/client.js +14 -14
- package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +287 -287
- package/dist/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js +10 -10
- package/dist/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js +11 -11
- package/dist/plugins/@deepseek-ai/dsh-client-ui-jobs/client.js +15 -15
- package/dist/plugins/@deepseek-ai/dsh-client-ui-layout/client.js +8 -8
- package/dist/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js +27 -27
- package/dist/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js +8 -8
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js +31 -31
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +23 -23
- package/dist/plugins/@deepseek-ai/dsh-client-ui-skill/client.js +19 -19
- package/dist/plugins/@deepseek-ai/dsh-client-ui-subagent/client.js +29 -29
- package/dist/plugins/@deepseek-ai/dsh-client-ui-theme/client.js +7 -7
- package/dist/plugins/@deepseek-ai/dsh-client-ui-tool/client.js +64 -64
- package/dist/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js +183 -183
- package/dist/plugins/@deepseek-ai/dsh-client-ui-user-questions/client.js +44 -44
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js +24 -24
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +79 -79
- package/dist/plugins/{@deepseek-ai/dsh-client-ui-edge → dsh-edge-client-ui}/client.js +12 -12
- package/package.json +13 -11
- package/scripts/assemble-web.mjs +1 -1
- package/scripts/legal-files.mjs +65 -7
- package/scripts/verify-packed.d.mts +24 -0
- package/scripts/verify-packed.mjs +76 -23
package/scripts/assemble-web.mjs
CHANGED
|
@@ -23,7 +23,7 @@ const deploymentPatches = [
|
|
|
23
23
|
]
|
|
24
24
|
// Deployment-owned browser features use the same client-plugin contract but
|
|
25
25
|
// intentionally stay out of upstream's generic Web composition.
|
|
26
|
-
const edgeClientPackages = ['
|
|
26
|
+
const edgeClientPackages = ['dsh-edge-client-ui']
|
|
27
27
|
|
|
28
28
|
// HMR is useful only when the upstream Node host also runs its bundle watcher.
|
|
29
29
|
// Edge deploys immutable, content-addressed static assets instead.
|
package/scripts/legal-files.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs'
|
|
1
|
+
import { readFileSync, writeFileSync } from 'node:fs'
|
|
2
2
|
import { fileURLToPath } from 'node:url'
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const upstreamCopyright = 'Copyright (c) 2026 DeepSeek'
|
|
5
|
+
const edgeCopyright = 'Copyright (c) 2026 pawaca'
|
|
5
6
|
|
|
6
7
|
function paths(name) {
|
|
7
8
|
return {
|
|
@@ -10,15 +11,72 @@ function paths(name) {
|
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
|
|
14
|
+
function renderLicense() {
|
|
15
|
+
const upstream = readFileSync(paths('LICENSE').source, 'utf8')
|
|
16
|
+
if (!upstream.includes(upstreamCopyright)) {
|
|
17
|
+
throw new Error('repository-root LICENSE no longer contains the expected DeepSeek copyright')
|
|
18
|
+
}
|
|
19
|
+
return upstream.replace(upstreamCopyright, edgeCopyright)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function renderNotices() {
|
|
23
|
+
const upstreamLicense = readFileSync(paths('LICENSE').source, 'utf8').trim()
|
|
24
|
+
const repositoryNotices = readFileSync(paths('THIRD_PARTY_NOTICES.md').source, 'utf8')
|
|
25
|
+
const inventoryStart = repositoryNotices.indexOf('## Vendored source')
|
|
26
|
+
if (inventoryStart < 0) {
|
|
27
|
+
throw new Error('repository-root THIRD_PARTY_NOTICES.md has no dependency inventory')
|
|
28
|
+
}
|
|
29
|
+
const upstreamInventory = repositoryNotices
|
|
30
|
+
.slice(inventoryStart)
|
|
31
|
+
.replace(/^## /gmu, '### ')
|
|
32
|
+
.trim()
|
|
33
|
+
|
|
34
|
+
return `<!-- Generated by apps/dsh-edge/scripts/legal-files.mjs — do not edit by hand.
|
|
35
|
+
Run \`pnpm --filter dsh-edge run legal:write\` to regenerate. -->
|
|
36
|
+
|
|
37
|
+
# Third-Party Notices
|
|
38
|
+
|
|
39
|
+
\`dsh-edge\` is an independent community project and is not affiliated with or endorsed by DeepSeek.
|
|
40
|
+
|
|
41
|
+
## DeepSeek Harness
|
|
42
|
+
|
|
43
|
+
\`dsh-edge\` includes and adapts DeepSeek Harness. DeepSeek Harness retains its upstream copyright and MIT license:
|
|
44
|
+
|
|
45
|
+
\`\`\`text
|
|
46
|
+
${upstreamLicense}
|
|
47
|
+
\`\`\`
|
|
48
|
+
|
|
49
|
+
## DeepSeek Harness dependency notices
|
|
50
|
+
|
|
51
|
+
The following inventory is reproduced from the DeepSeek Harness source distribution. Each project remains under its own license; nothing in this file changes those terms.
|
|
52
|
+
|
|
53
|
+
${upstreamInventory}
|
|
54
|
+
`
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function expectedFiles() {
|
|
58
|
+
return new Map([
|
|
59
|
+
['LICENSE', renderLicense()],
|
|
60
|
+
['THIRD_PARTY_NOTICES.md', renderNotices()],
|
|
61
|
+
])
|
|
62
|
+
}
|
|
63
|
+
|
|
13
64
|
function verify() {
|
|
14
|
-
for (const name of
|
|
15
|
-
const {
|
|
16
|
-
if (
|
|
17
|
-
throw new Error(`${name}
|
|
65
|
+
for (const [name, expected] of expectedFiles()) {
|
|
66
|
+
const { target } = paths(name)
|
|
67
|
+
if (readFileSync(target, 'utf8') !== expected) {
|
|
68
|
+
throw new Error(`${name} is stale; run \`pnpm --filter dsh-edge run legal:write\``)
|
|
18
69
|
}
|
|
19
70
|
}
|
|
20
71
|
}
|
|
21
72
|
|
|
73
|
+
function write() {
|
|
74
|
+
for (const [name, content] of expectedFiles()) {
|
|
75
|
+
writeFileSync(paths(name).target, content)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
22
79
|
const action = process.argv[2]
|
|
23
80
|
if (action === 'verify') verify()
|
|
24
|
-
else
|
|
81
|
+
else if (action === 'write') write()
|
|
82
|
+
else throw new Error('Usage: node scripts/legal-files.mjs <verify|write>')
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface NpmInvocationOptions {
|
|
2
|
+
platform?: NodeJS.Platform
|
|
3
|
+
nodeExecutable?: string
|
|
4
|
+
environment?: NodeJS.ProcessEnv
|
|
5
|
+
pathExists?: (path: string) => boolean
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface NpmInvocation {
|
|
9
|
+
command: string
|
|
10
|
+
args: string[]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Resolve npm to a directly executable command on the current platform.
|
|
15
|
+
* @param options Resolution inputs used by the release verifier.
|
|
16
|
+
* @returns The executable and leading arguments for npm.
|
|
17
|
+
*/
|
|
18
|
+
export function resolveNpmInvocation(options?: NpmInvocationOptions): NpmInvocation
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Install and exercise one packed dsh-edge artifact outside the workspace.
|
|
22
|
+
* @param input Tarball path from the command line.
|
|
23
|
+
*/
|
|
24
|
+
export function verifyPacked(input?: string): void
|
|
@@ -1,32 +1,85 @@
|
|
|
1
1
|
import { execFileSync } from 'node:child_process'
|
|
2
|
-
import { existsSync, mkdtempSync, readFileSync, rmSync } from 'node:fs'
|
|
2
|
+
import { existsSync, mkdtempSync, readFileSync, realpathSync, rmSync } from 'node:fs'
|
|
3
3
|
import { tmpdir } from 'node:os'
|
|
4
|
-
import { isAbsolute, join, resolve } from 'node:path'
|
|
4
|
+
import { isAbsolute, join, resolve, win32 } from 'node:path'
|
|
5
|
+
import { fileURLToPath } from 'node:url'
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Resolve npm without asking Windows to execute its `.cmd` shim.
|
|
9
|
+
* @param {{ platform?: NodeJS.Platform, nodeExecutable?: string, environment?: NodeJS.ProcessEnv, pathExists?: (path: string) => boolean }} [options] Resolution inputs.
|
|
10
|
+
* @returns {{ command: string, args: string[] }} Executable and leading arguments for npm.
|
|
11
|
+
*/
|
|
12
|
+
export function resolveNpmInvocation(options = {}) {
|
|
13
|
+
const platform = options.platform ?? process.platform
|
|
14
|
+
if (platform !== 'win32') return { command: 'npm', args: [] }
|
|
10
15
|
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
const environment = options.environment ?? process.env
|
|
17
|
+
const path = Object.entries(environment)
|
|
18
|
+
.find(([name]) => name.toUpperCase() === 'PATH')?.[1]
|
|
19
|
+
if (path === undefined || path === '') {
|
|
20
|
+
throw new Error('Cannot run npm on Windows because PATH is unavailable')
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const pathExists = options.pathExists ?? existsSync
|
|
24
|
+
for (const rawDirectory of path.split(win32.delimiter)) {
|
|
25
|
+
const directory = rawDirectory.startsWith('"') && rawDirectory.endsWith('"')
|
|
26
|
+
? rawDirectory.slice(1, -1)
|
|
27
|
+
: rawDirectory
|
|
28
|
+
if (directory === '') continue
|
|
29
|
+
const shim = win32.join(directory, 'npm.cmd')
|
|
30
|
+
const cli = win32.join(directory, 'node_modules', 'npm', 'bin', 'npm-cli.js')
|
|
31
|
+
if (pathExists(shim) && pathExists(cli)) {
|
|
32
|
+
return { command: options.nodeExecutable ?? process.execPath, args: [cli] }
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
throw new Error('Cannot run npm on Windows because npm-cli.js is not adjacent to an npm.cmd entry on PATH')
|
|
13
37
|
}
|
|
14
38
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (
|
|
21
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Install and exercise one packed dsh-edge artifact outside the workspace.
|
|
41
|
+
* @param {string | undefined} input Tarball path from the command line.
|
|
42
|
+
*/
|
|
43
|
+
export function verifyPacked(input) {
|
|
44
|
+
if (input === undefined) throw new Error('Usage: node scripts/verify-packed.mjs <tarball>')
|
|
45
|
+
const tarball = isAbsolute(input) ? input : resolve(process.cwd(), input)
|
|
46
|
+
const directory = mkdtempSync(join(tmpdir(), 'dsh-edge-packed-'))
|
|
47
|
+
|
|
48
|
+
function run(command, args) {
|
|
49
|
+
execFileSync(command, args, { cwd: directory, stdio: 'inherit' })
|
|
22
50
|
}
|
|
23
|
-
|
|
24
|
-
|
|
51
|
+
|
|
52
|
+
try {
|
|
53
|
+
const npm = resolveNpmInvocation()
|
|
54
|
+
run(npm.command, [...npm.args, 'install', '--ignore-scripts', '--no-audit', '--no-fund', tarball])
|
|
55
|
+
const packageDirectory = join(directory, 'node_modules', 'dsh-edge')
|
|
56
|
+
const license = join(packageDirectory, 'LICENSE')
|
|
57
|
+
const notices = join(packageDirectory, 'THIRD_PARTY_NOTICES.md')
|
|
58
|
+
const licenseText = existsSync(license) ? readFileSync(license, 'utf8') : ''
|
|
59
|
+
if (!licenseText.startsWith('MIT License') || !licenseText.includes('Copyright (c) 2026 pawaca')) {
|
|
60
|
+
throw new Error('packed dsh-edge is missing its MIT license')
|
|
61
|
+
}
|
|
62
|
+
if (licenseText.includes('Copyright (c) 2026 DeepSeek')) {
|
|
63
|
+
throw new Error('packed dsh-edge incorrectly assigns its copyright to DeepSeek')
|
|
64
|
+
}
|
|
65
|
+
const noticesText = existsSync(notices) ? readFileSync(notices, 'utf8') : ''
|
|
66
|
+
if (
|
|
67
|
+
!noticesText.includes('# Third-Party Notices')
|
|
68
|
+
|| !noticesText.includes('not affiliated with or endorsed by DeepSeek')
|
|
69
|
+
|| !noticesText.includes('Copyright (c) 2026 DeepSeek')
|
|
70
|
+
) {
|
|
71
|
+
throw new Error('packed dsh-edge is missing third-party notices')
|
|
72
|
+
}
|
|
73
|
+
run(process.execPath, [join(packageDirectory, 'scripts', 'cli.mjs'), '--version'])
|
|
74
|
+
run(process.execPath, [join(packageDirectory, 'scripts', 'cli.mjs'), '--help'])
|
|
75
|
+
run(process.execPath, [join(packageDirectory, 'scripts', 'bundle.mjs'), 'direct'])
|
|
76
|
+
run(process.execPath, [join(packageDirectory, 'scripts', 'bundle.mjs'), 'isolated'])
|
|
77
|
+
} finally {
|
|
78
|
+
rmSync(directory, { recursive: true, force: true })
|
|
25
79
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
rmSync(directory, { recursive: true, force: true })
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (process.argv[1] !== undefined
|
|
83
|
+
&& realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url))) {
|
|
84
|
+
verifyPacked(process.argv[2])
|
|
32
85
|
}
|