@opencue/cli 0.0.0-stage → 1.0.41
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.md +12 -0
- package/README.md +1208 -2
- package/bin/dscode.exe +12 -0
- package/bin/stt/requirements.txt +20 -0
- package/bin/stt/stt_server.py +544 -0
- package/bin/tts/requirements.txt +21 -0
- package/bin/tts/tts_server.py +404 -0
- package/cli-wrapper.cjs +109 -0
- package/install.cjs +331 -0
- package/llms.txt +115 -0
- package/package.json +56 -4
- package/scripts/figure/compose.py +363 -0
- package/scripts/figure/replay-shots.mjs +205 -0
- package/web/dist/assets/AssistantsView-dhdYVIy0.js +1 -0
- package/web/dist/assets/AutomationView-D1dU5ZV7.js +1 -0
- package/web/dist/assets/ChannelConfigView-CEPVZntU.js +8 -0
- package/web/dist/assets/ChartsView-DdN-beHW.js +1 -0
- package/web/dist/assets/ConnectorsView-CseCss9C.js +1 -0
- package/web/dist/assets/FileTreeView-Dnc3-gRF.js +1 -0
- package/web/dist/assets/HookConfigView-DA2h4HdJ.js +1 -0
- package/web/dist/assets/InputArea-DAgOOjOc.js +14 -0
- package/web/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/web/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/web/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/web/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/web/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/web/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/web/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/web/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/web/dist/assets/MemoryView-D6OUBi4-.js +1 -0
- package/web/dist/assets/MessageBubble-CCTRbIMZ.css +1 -0
- package/web/dist/assets/MessageBubble-CV16DZMG.js +453 -0
- package/web/dist/assets/ModelsView-BuqD9vWl.js +1 -0
- package/web/dist/assets/PluginsView-CIziDHFJ.js +2 -0
- package/web/dist/assets/ProjectsView-c6faWy32.js +1 -0
- package/web/dist/assets/SessionGrid-BZJHcklh.js +4 -0
- package/web/dist/assets/SessionGrid-Bk5CAXEn.css +1 -0
- package/web/dist/assets/SettingsModal-BqdGEGW-.js +4 -0
- package/web/dist/assets/SkillsView-CB6CKkmb.js +1 -0
- package/web/dist/assets/TemplatesTab-B8efVwVZ.js +1 -0
- package/web/dist/assets/ThreadsView-CDoM0aNb.js +2 -0
- package/web/dist/assets/ToolsView-BG-xsWsO.js +1 -0
- package/web/dist/assets/abnfDiagram-WEYOIA3C-DGUPHfRO.js +1 -0
- package/web/dist/assets/agentIconSet-Btsb_SC4.js +1 -0
- package/web/dist/assets/api-CCt9DRQm.js +1 -0
- package/web/dist/assets/arc-Y1ARJVZ4.js +1 -0
- package/web/dist/assets/architecture-WOLXFQ4H-BUERx_-B.js +1 -0
- package/web/dist/assets/architectureDiagram-ZHVYKT53-BPsQL7O5.js +36 -0
- package/web/dist/assets/array-BifhSqXX.js +1 -0
- package/web/dist/assets/blockDiagram-RJAE7QA3-pB7EXp6p.js +140 -0
- package/web/dist/assets/c4Diagram-XDPPPE54-BnPeCq_L.js +38 -0
- package/web/dist/assets/channel-CSrLW66f.js +1 -0
- package/web/dist/assets/channelMeta-BGQXQxgj.js +1 -0
- package/web/dist/assets/chunk-2E7WHVMD-xX282MrC.js +88 -0
- package/web/dist/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/web/dist/assets/chunk-4EMNKR2T-BAQDLVqt.js +1 -0
- package/web/dist/assets/chunk-55XCU76K-BwAE3Eqq.js +1 -0
- package/web/dist/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/web/dist/assets/chunk-7S6XSTFO-DwwaClMo.js +2 -0
- package/web/dist/assets/chunk-AQDTSKZB-DHG5Km_p.js +72 -0
- package/web/dist/assets/chunk-DSNLSHJZ-a6-B52h-.js +129 -0
- package/web/dist/assets/chunk-DUW6YSOI-Dgx8z5s3.js +1 -0
- package/web/dist/assets/chunk-HAGFOTED-DZMcAj3o.js +62 -0
- package/web/dist/assets/chunk-HNE4Q36P-gl_4xI6B.js +1 -0
- package/web/dist/assets/chunk-J5ZVWO5B-oDCd-gWO.js +1 -0
- package/web/dist/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/web/dist/assets/chunk-NGNAAXSQ-Bw6tHVuc.js +136 -0
- package/web/dist/assets/chunk-NQOKRVIF-B8Q-YmhL.js +213 -0
- package/web/dist/assets/chunk-UHW7PFBP-isP5lYMB.js +1 -0
- package/web/dist/assets/chunk-VQ5W62QI-Bn68syIc.js +1 -0
- package/web/dist/assets/chunk-WQQL4CDK-CdZpmEYA.js +10 -0
- package/web/dist/assets/chunk-XXDRQBXY-CnbRkih_.js +1 -0
- package/web/dist/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/web/dist/assets/chunk-YZO67HFG-DX9GhJkR.js +1 -0
- package/web/dist/assets/chunk-ZAUX2LTX-Ki22UlYp.js +1 -0
- package/web/dist/assets/chunk-ZCHMQSOR-BVj0Zx6L.js +2 -0
- package/web/dist/assets/classDiagram-v2-4MYWR3UA-C7PV1veb.js +217 -0
- package/web/dist/assets/cn-rx4uumOJ.js +1 -0
- package/web/dist/assets/common-BHXgEvgk.js +192 -0
- package/web/dist/assets/cose-bilkent-JH36ORCC-DHFtpmij.js +1 -0
- package/web/dist/assets/cynefin-EF2NZ3EQ-1rI2T0cc.js +1 -0
- package/web/dist/assets/cynefinDiagram-WF24UDRP-C8O_v8xU.js +62 -0
- package/web/dist/assets/cytoscape.esm-BY277UBX.js +321 -0
- package/web/dist/assets/dagre-NK4GIZVX-BWGoHIUd.js +4 -0
- package/web/dist/assets/defaultLocale-BFoDCU3G.js +1 -0
- package/web/dist/assets/diagram-CBK3MWTC-kf9v35RN.js +24 -0
- package/web/dist/assets/diagram-I5XIIV2D-Ro-ig56_.js +24 -0
- package/web/dist/assets/diagram-ODIL2UCW-CtGga01G.js +30 -0
- package/web/dist/assets/diagram-PFBEJUXE-C14lcR-6.js +3 -0
- package/web/dist/assets/diagram-RJA3I4VV-BBbqaSKU.js +41 -0
- package/web/dist/assets/diagram-TYUNFSNR-BynvjQsr.js +200 -0
- package/web/dist/assets/dist-CumnGVmJ.js +1 -0
- package/web/dist/assets/ebnfDiagram-V4P3TTPT-BdqUCZnk.js +1 -0
- package/web/dist/assets/elk-QONTBCTQ-CYCP_9Jy.js +27 -0
- package/web/dist/assets/erDiagram-KYQIGQAA-C3L55l_F.js +99 -0
- package/web/dist/assets/eventmodeling-K75KTNOO-CTQdA_1v.js +1 -0
- package/web/dist/assets/flowDiagram-IUGLLWBU-COLKOzBg.js +1 -0
- package/web/dist/assets/ganttDiagram-R7GPNTJY-Be4Qk8Hx.js +292 -0
- package/web/dist/assets/gitGraph-VSP46ZUC-B59HXvj1.js +1 -0
- package/web/dist/assets/gitGraphDiagram-PDYL7XHY-C2A0VA6q.js +106 -0
- package/web/dist/assets/graphlib-DS17s2tU.js +1 -0
- package/web/dist/assets/icons-BvYhTENi.js +1 -0
- package/web/dist/assets/index-BNI6CNsY.css +1 -0
- package/web/dist/assets/index-BX-d2OBW.js +130 -0
- package/web/dist/assets/info-OHQRW6UA-DWlkKvmi.js +1 -0
- package/web/dist/assets/infoDiagram-MVDRKAX5-B8e6dTjN.js +2 -0
- package/web/dist/assets/init-C-OQMol4.js +1 -0
- package/web/dist/assets/ishikawaDiagram-HPEHV2GE-udXPYi9H.js +70 -0
- package/web/dist/assets/journeyDiagram-BOSHW7O7-DTyDkf5d.js +139 -0
- package/web/dist/assets/kanban-definition-FNSA4HC5-BXgV20qe.js +89 -0
- package/web/dist/assets/katex-B940_AAO.js +257 -0
- package/web/dist/assets/line-DVabuQAu.js +1 -0
- package/web/dist/assets/linear-gLkGxN9m.js +1 -0
- package/web/dist/assets/markdown-DAQZeY5V.js +14 -0
- package/web/dist/assets/mermaid-parser.core-BrXnuEs7.js +7 -0
- package/web/dist/assets/mermaid.core-BGbz3k1k.js +44 -0
- package/web/dist/assets/mindmap-definition-6OY57UG3-DbtP-bmk.js +98 -0
- package/web/dist/assets/ordinal-BDEzSJ7C.js +1 -0
- package/web/dist/assets/packet-JDAUHWVQ-iW8w3JF5.js +1 -0
- package/web/dist/assets/panels-DYiQiVWh.js +1 -0
- package/web/dist/assets/path-fybaL0A-.js +1 -0
- package/web/dist/assets/pegDiagram-ECIUJNBX-rBWJbaq4.js +1 -0
- package/web/dist/assets/pie-XZMESJXO-KHXEq-Yx.js +1 -0
- package/web/dist/assets/pieDiagram-GNMPY74T-DsW7yHm0.js +39 -0
- package/web/dist/assets/preload-helper-BLdHbfdN.js +1 -0
- package/web/dist/assets/profileChange-xrd7jkii.js +1 -0
- package/web/dist/assets/quadrantDiagram-D57K4MC3-DF_pwNhM.js +7 -0
- package/web/dist/assets/radar-ABXABTNO-BkAUJ_Zd.js +1 -0
- package/web/dist/assets/railroad-I3PHUGI6-BdnWRdGt.js +1 -0
- package/web/dist/assets/railroad-abnf-LNEFI6M7-C8K36-8b.js +1 -0
- package/web/dist/assets/railroad-ebnf-DWYD2UWJ-BlS25T3f.js +1 -0
- package/web/dist/assets/railroad-peg-JR7BVNR7-CBKGDi75.js +1 -0
- package/web/dist/assets/railroadDiagram-Y72NRBL7-DmrlMIvv.js +1 -0
- package/web/dist/assets/react-vendor-BlngCquv.js +19 -0
- package/web/dist/assets/requirementDiagram-EQYSW5RA-cvUq9H3I.js +84 -0
- package/web/dist/assets/rolldown-runtime-COiEfhsA.js +1 -0
- package/web/dist/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/web/dist/assets/sankeyDiagram-SY24JHO5-BdxXAbER.js +40 -0
- package/web/dist/assets/sequenceDiagram-BLEHNHQU-Druumi0k.js +169 -0
- package/web/dist/assets/settingsStore-RLUAWgIk.js +1 -0
- package/web/dist/assets/sizeCapture-INFHLROL-3uHXrFqA.js +1 -0
- package/web/dist/assets/src-49LUQhkG.js +1 -0
- package/web/dist/assets/src-BWF7jMDv.js +1 -0
- package/web/dist/assets/state-_ZfNVAsd.js +1 -0
- package/web/dist/assets/stateDiagram-v2-A6IESKWZ-Jgh6qlrr.js +291 -0
- package/web/dist/assets/sttLanguages-aqoVC79g.js +2 -0
- package/web/dist/assets/swimlanes-B3ENRKFQ-4xKumvXQ.js +1 -0
- package/web/dist/assets/swimlanesDiagram-AYQRV4AK-bHcLKL3d.js +8 -0
- package/web/dist/assets/timeline-definition-JXYKGLGB-BYKhga9x.js +120 -0
- package/web/dist/assets/treeView-D4JQ5SDB-6-eTVUuH.js +1 -0
- package/web/dist/assets/treemap-SAJKECNS-Dxl8yCLE.js +1 -0
- package/web/dist/assets/ttsSettings-DHo3OsOq.js +15 -0
- package/web/dist/assets/types-JssxRFJn.js +1 -0
- package/web/dist/assets/useTranslation-BGmCDuQI.js +1 -0
- package/web/dist/assets/usecaseDiagram-WPOLBNNX-BaQ8nAv9.js +328 -0
- package/web/dist/assets/vennDiagram-Q3Y3IDCW-DkPvfmfT.js +34 -0
- package/web/dist/assets/wardley-7MLQ67FV-CZtI22aa.js +1 -0
- package/web/dist/assets/wardleyDiagram-IVAIDKWA-Dgi2OWQ4.js +78 -0
- package/web/dist/assets/websocket-C9e3h7VU.js +1 -0
- package/web/dist/assets/whatsNewStore-Bf_7lW8o.js +1 -0
- package/web/dist/assets/workspaceSemantics-RaIRer76.js +3 -0
- package/web/dist/assets/xychartDiagram-4URNHDU4-Ch96dep-.js +7 -0
- package/web/dist/favicon.svg +19 -0
- package/web/dist/fonts/OFL-Inter.txt +93 -0
- package/web/dist/fonts/inter-latin-400-normal.woff2 +0 -0
- package/web/dist/fonts/inter-latin-600-normal.woff2 +0 -0
- package/web/dist/icons/icon-1024.png +0 -0
- package/web/dist/icons/icon-180.png +0 -0
- package/web/dist/icons/icon-192.png +0 -0
- package/web/dist/icons/icon-512.png +0 -0
- package/web/dist/icons/icon-maskable-512.png +0 -0
- package/web/dist/index.html +90 -0
- package/web/dist/logo.svg +26 -0
- package/web/dist/manifest.webmanifest +16 -0
package/install.cjs
ADDED
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Postinstall for the @deepseekcode/cli wrapper package.
|
|
3
|
+
//
|
|
4
|
+
// Mirrors the Claude Code 2.x distribution model: the npm package is a thin
|
|
5
|
+
// installer. This script detects the platform, finds the matching native binary
|
|
6
|
+
// from optionalDependencies (@deepseekcode/cli-<platform>), and copies it over
|
|
7
|
+
// the bin/dscode.exe placeholder. After this runs, `dscode` execs the native
|
|
8
|
+
// binary directly — no Node process stays resident.
|
|
9
|
+
//
|
|
10
|
+
// If the native package isn't present (--omit=optional), prints instructions and
|
|
11
|
+
// leaves the placeholder stub in place. cli-wrapper.cjs (same directory) can be
|
|
12
|
+
// invoked manually as a fallback.
|
|
13
|
+
//
|
|
14
|
+
// On Windows the stub (a non-PE .exe) surfaces as a native "not a valid Win32
|
|
15
|
+
// application" error, so its message is best-effort; install.cjs failure output
|
|
16
|
+
// above is the primary guidance when postinstall does run.
|
|
17
|
+
//
|
|
18
|
+
// WHY repairWindowsShims() EXISTS
|
|
19
|
+
//
|
|
20
|
+
// npm reads bin/dscode.exe's shebang while generating the `dscode` /
|
|
21
|
+
// `deepseekcode` shims. The placeholder has to start with `#!/bin/sh` (that is
|
|
22
|
+
// the runnable "not installed yet" message on Unix before this script replaces
|
|
23
|
+
// it), so on Windows cmd-shim copies that interpreter verbatim:
|
|
24
|
+
//
|
|
25
|
+
// & "/bin/sh" "$basedir/node_modules/@deepseekcode/cli/bin/dscode.exe" $args
|
|
26
|
+
//
|
|
27
|
+
// /bin/sh does not exist there, so every fresh `npm i -g` on Windows lands a
|
|
28
|
+
// `dscode` that dies with `/bin/sh.exe is not recognized` — while the real
|
|
29
|
+
// 100MB PE binary sits right next to it. The shims are written BEFORE this
|
|
30
|
+
// script runs, so they cannot be avoided; repairWindowsShims() rewrites them to
|
|
31
|
+
// exec the binary that is on disk by now. (`npm rebuild -g <pkg>` also repairs
|
|
32
|
+
// them: re-linking reads the shebang of the then-real PE binary, which has
|
|
33
|
+
// none.)
|
|
34
|
+
//
|
|
35
|
+
// Platform detection + PLATFORMS map is duplicated in cli-wrapper.cjs — keep in sync.
|
|
36
|
+
|
|
37
|
+
const { spawnSync } = require('child_process')
|
|
38
|
+
const {
|
|
39
|
+
copyFileSync,
|
|
40
|
+
linkSync,
|
|
41
|
+
unlinkSync,
|
|
42
|
+
chmodSync,
|
|
43
|
+
readFileSync,
|
|
44
|
+
writeFileSync,
|
|
45
|
+
statSync,
|
|
46
|
+
} = require('fs')
|
|
47
|
+
const { arch } = require('os')
|
|
48
|
+
const path = require('path')
|
|
49
|
+
|
|
50
|
+
const WRAPPER_NAME = require('./package.json').name
|
|
51
|
+
// Platform packages live in the SAME npm scope as the wrapper
|
|
52
|
+
// (@<scope>/cli-<platform>). Derived rather than hard-coded so one source file
|
|
53
|
+
// serves every scope the release is published to (see scripts/multi-publish.mjs).
|
|
54
|
+
const PACKAGE_PREFIX = WRAPPER_NAME
|
|
55
|
+
const BINARY_NAME = 'dscode'
|
|
56
|
+
|
|
57
|
+
// The command names npm creates shims for (dscode + deepseekcode). Taken from
|
|
58
|
+
// the published bin map so a rename never leaves a stale shim behind.
|
|
59
|
+
const BIN_MAP = require('./package.json').bin || {}
|
|
60
|
+
const SHIM_NAMES = Object.keys(BIN_MAP)
|
|
61
|
+
// Where the native binary lands, and therefore what every shim must exec: the
|
|
62
|
+
// published wrapper's bin field points at this path.
|
|
63
|
+
const BIN_TARGET = path.join(__dirname, 'bin', 'dscode.exe')
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
const PLATFORMS = {
|
|
67
|
+
'darwin-arm64': { pkg: PACKAGE_PREFIX + '-darwin-arm64', bin: BINARY_NAME },
|
|
68
|
+
'darwin-x64': { pkg: PACKAGE_PREFIX + '-darwin-x64', bin: BINARY_NAME },
|
|
69
|
+
'linux-x64': { pkg: PACKAGE_PREFIX + '-linux-x64', bin: BINARY_NAME },
|
|
70
|
+
'linux-arm64': { pkg: PACKAGE_PREFIX + '-linux-arm64', bin: BINARY_NAME },
|
|
71
|
+
'linux-x64-musl': { pkg: PACKAGE_PREFIX + '-linux-x64-musl', bin: BINARY_NAME },
|
|
72
|
+
'linux-arm64-musl': { pkg: PACKAGE_PREFIX + '-linux-arm64-musl', bin: BINARY_NAME },
|
|
73
|
+
'win32-x64': { pkg: PACKAGE_PREFIX + '-win32-x64', bin: BINARY_NAME + '.exe' },
|
|
74
|
+
'win32-arm64': { pkg: PACKAGE_PREFIX + '-win32-arm64', bin: BINARY_NAME + '.exe' },
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function detectMusl() {
|
|
78
|
+
if (process.platform !== 'linux') return false
|
|
79
|
+
// process.report is available in Node ≥12; glibcVersionRuntime is absent on musl.
|
|
80
|
+
// Faster than spawning `ldd` and avoids the ENOENT→musl false positive when ldd
|
|
81
|
+
// isn't on PATH (minimal containers).
|
|
82
|
+
const report =
|
|
83
|
+
typeof process.report?.getReport === 'function'
|
|
84
|
+
? process.report.getReport()
|
|
85
|
+
: null
|
|
86
|
+
return report != null && report.header?.glibcVersionRuntime === undefined
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function getPlatformKey() {
|
|
90
|
+
const platform = process.platform
|
|
91
|
+
let cpu = arch()
|
|
92
|
+
if (platform === 'linux') {
|
|
93
|
+
return 'linux-' + cpu + (detectMusl() ? '-musl' : '')
|
|
94
|
+
}
|
|
95
|
+
// Rosetta 2: an x64 Node on Apple Silicon reports arch()==='x64'. Prefer the
|
|
96
|
+
// native arm64 binary — the x64 build needs AVX, which Rosetta doesn't emulate.
|
|
97
|
+
if (platform === 'darwin' && cpu === 'x64') {
|
|
98
|
+
const r = spawnSync('sysctl', ['-n', 'sysctl.proc_translated'], { encoding: 'utf8' })
|
|
99
|
+
if (r.stdout?.trim() === '1') cpu = 'arm64'
|
|
100
|
+
}
|
|
101
|
+
return platform + '-' + cpu
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function placeBinary(src, dest) {
|
|
105
|
+
// Try hardlink first (instant, zero extra disk for a ~110MB binary; src and
|
|
106
|
+
// dest are both under node_modules/ so same-filesystem is the common case).
|
|
107
|
+
// We attempt the link BEFORE touching dest — if src is missing (partial
|
|
108
|
+
// extraction) the first linkSync throws ENOENT and the fallback stub stays.
|
|
109
|
+
try {
|
|
110
|
+
linkSync(src, dest)
|
|
111
|
+
} catch (err) {
|
|
112
|
+
if (err.code === 'EEXIST') {
|
|
113
|
+
// Read the stub before unlinking so we can restore it if both link and
|
|
114
|
+
// copy fail (ENOSPC, NFS error mid-copy). Only read if dest is
|
|
115
|
+
// stub-sized — on re-install dest is the ~110MB binary.
|
|
116
|
+
const stub = statSync(dest).size < 4096 ? readFileSync(dest) : null
|
|
117
|
+
unlinkSync(dest)
|
|
118
|
+
try {
|
|
119
|
+
linkSync(src, dest)
|
|
120
|
+
} catch {
|
|
121
|
+
try {
|
|
122
|
+
copyFileSync(src, dest)
|
|
123
|
+
} catch (copyErr) {
|
|
124
|
+
if (stub) {
|
|
125
|
+
try {
|
|
126
|
+
writeFileSync(dest, stub, { mode: 0o755 })
|
|
127
|
+
} catch {
|
|
128
|
+
// Do nothing
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
throw copyErr
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
} else if (err.code === 'EXDEV' || err.code === 'EPERM') {
|
|
135
|
+
// Cross-device or no-link-perms — copyFileSync overwrites existing dest.
|
|
136
|
+
copyFileSync(src, dest)
|
|
137
|
+
} else {
|
|
138
|
+
throw err
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (process.platform !== 'win32') {
|
|
142
|
+
chmodSync(dest, 0o755)
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// ---- Windows shim repair -------------------------------------------------
|
|
147
|
+
// The three templates below mirror what npm writes for a non-JS bin target, i.e.
|
|
148
|
+
// the shape it produces after re-linking against the real (shebang-less) PE
|
|
149
|
+
// binary — a repaired shim is indistinguishable from a healthy one.
|
|
150
|
+
|
|
151
|
+
function ps1Shim(target) {
|
|
152
|
+
return [
|
|
153
|
+
'#!/usr/bin/env pwsh',
|
|
154
|
+
'$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent',
|
|
155
|
+
'',
|
|
156
|
+
'$ret=0',
|
|
157
|
+
'# Support pipeline input',
|
|
158
|
+
'if ($MyInvocation.ExpectingInput) {',
|
|
159
|
+
' $input | & "$basedir/' + target + '" $args',
|
|
160
|
+
'} else {',
|
|
161
|
+
' & "$basedir/' + target + '" $args',
|
|
162
|
+
'}',
|
|
163
|
+
'$ret=$LASTEXITCODE',
|
|
164
|
+
'exit $ret',
|
|
165
|
+
'',
|
|
166
|
+
].join('\n')
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function cmdShim(target) {
|
|
170
|
+
return [
|
|
171
|
+
'@ECHO off',
|
|
172
|
+
'GOTO start',
|
|
173
|
+
':find_dp0',
|
|
174
|
+
'SET dp0=%~dp0',
|
|
175
|
+
'EXIT /b',
|
|
176
|
+
':start',
|
|
177
|
+
'SETLOCAL',
|
|
178
|
+
'CALL :find_dp0',
|
|
179
|
+
'"%dp0%\\' + target + '" %*',
|
|
180
|
+
'',
|
|
181
|
+
].join('\n')
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function shShim(target) {
|
|
185
|
+
return [
|
|
186
|
+
'#!/bin/sh',
|
|
187
|
+
"basedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")",
|
|
188
|
+
'',
|
|
189
|
+
'case `uname` in',
|
|
190
|
+
' *CYGWIN*|*MINGW*|*MSYS*)',
|
|
191
|
+
' if command -v cygpath > /dev/null 2>&1; then',
|
|
192
|
+
' basedir=`cygpath -w "$basedir"`',
|
|
193
|
+
' fi',
|
|
194
|
+
' ;;',
|
|
195
|
+
'esac',
|
|
196
|
+
'',
|
|
197
|
+
'exec "$basedir/' + target + '" "$@"',
|
|
198
|
+
'',
|
|
199
|
+
].join('\n')
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// Path from the shim's directory to the binary, spelled the way each shim kind
|
|
203
|
+
// expects: npm uses forward slashes in .ps1/.sh and backslashes in .cmd.
|
|
204
|
+
function shimTarget(shimDir, exeAbs, sep) {
|
|
205
|
+
const rel = path.relative(shimDir, exeAbs)
|
|
206
|
+
const picked = rel && !path.isAbsolute(rel) ? rel : exeAbs
|
|
207
|
+
return sep === '\\' ? picked.replace(/\//g, '\\') : picked.replace(/\\/g, '/')
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function shimFor(ext, target) {
|
|
211
|
+
if (ext === '.ps1') return ps1Shim(target)
|
|
212
|
+
if (ext === '.cmd') return cmdShim(target)
|
|
213
|
+
return shShim(target)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// Rewrite every shim under shimDirs that still calls the POSIX interpreter, and
|
|
217
|
+
// return the repaired paths (empty when there was nothing to do). Inputs are
|
|
218
|
+
// arguments so a test can drive it with a temp dir on any platform.
|
|
219
|
+
function repairShims(shimDirs, exeAbs) {
|
|
220
|
+
const repaired = []
|
|
221
|
+
for (const dir of shimDirs) {
|
|
222
|
+
for (const name of SHIM_NAMES) {
|
|
223
|
+
for (const ext of ['.ps1', '.cmd', '']) {
|
|
224
|
+
const file = path.join(dir, name + ext)
|
|
225
|
+
let text
|
|
226
|
+
try {
|
|
227
|
+
text = readFileSync(file, 'utf8')
|
|
228
|
+
} catch {
|
|
229
|
+
continue
|
|
230
|
+
}
|
|
231
|
+
// Skip the shebang line: a healthy .sh shim legitimately starts with
|
|
232
|
+
// `#!/bin/sh`. Only /bin/sh used as an *interpreter* is the bug.
|
|
233
|
+
if (!text.replace(/^[^\n]*\n/, '').includes('/bin/sh')) continue
|
|
234
|
+
try {
|
|
235
|
+
const target = shimTarget(dir, exeAbs, ext === '.cmd' ? '\\' : '/')
|
|
236
|
+
writeFileSync(file, shimFor(ext, target), { mode: 0o755 })
|
|
237
|
+
repaired.push(file)
|
|
238
|
+
} catch {
|
|
239
|
+
// A read-only prefix (`sudo npm i -g`, then `dscode` as a user) must
|
|
240
|
+
// not fail the install — the binary itself is already in place.
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return repaired
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Candidate shim directories: the npm prefix (global install) and
|
|
249
|
+
// node_modules/.bin (local install). Both derive from the package location, so
|
|
250
|
+
// the same code covers `npm i -g`, a project dependency and pnpm-style layouts.
|
|
251
|
+
function shimDirsFor(pkgDir) {
|
|
252
|
+
const nodeModules = path.dirname(path.dirname(pkgDir))
|
|
253
|
+
return [path.dirname(nodeModules), path.join(nodeModules, '.bin')]
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function repairWindowsShims() {
|
|
257
|
+
if (process.platform !== 'win32') return []
|
|
258
|
+
return repairShims(shimDirsFor(__dirname), BIN_TARGET)
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
function main() {
|
|
262
|
+
const platformKey = getPlatformKey()
|
|
263
|
+
const info = PLATFORMS[platformKey]
|
|
264
|
+
|
|
265
|
+
if (!info) {
|
|
266
|
+
console.error(
|
|
267
|
+
`[${WRAPPER_NAME} postinstall] Unsupported platform: ${process.platform} ${arch()}`,
|
|
268
|
+
)
|
|
269
|
+
console.error(` Supported: ${Object.keys(PLATFORMS).join(', ')}`)
|
|
270
|
+
return
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const optionalDeps = require('./package.json').optionalDependencies || {}
|
|
274
|
+
if (!optionalDeps[info.pkg]) {
|
|
275
|
+
console.error(
|
|
276
|
+
`[${WRAPPER_NAME} postinstall] Native binaries for ${platformKey} are not available on this release channel.`,
|
|
277
|
+
)
|
|
278
|
+
console.error(` Available: ${Object.keys(optionalDeps).map((p) => p.replace(PACKAGE_PREFIX + '-', '')).join(', ')}`)
|
|
279
|
+
return
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
let src
|
|
283
|
+
try {
|
|
284
|
+
const pkgDir = path.dirname(require.resolve(info.pkg + '/package.json'))
|
|
285
|
+
src = path.join(pkgDir, info.bin)
|
|
286
|
+
} catch {
|
|
287
|
+
console.error(`[${WRAPPER_NAME} postinstall] Native package "${info.pkg}" not found.`)
|
|
288
|
+
if (platformKey === 'darwin-arm64' && arch() === 'x64') {
|
|
289
|
+
console.error(' You are running x64 Node under Rosetta 2 on Apple Silicon. npm only')
|
|
290
|
+
console.error(' installed the darwin-x64 binary. Install arm64 Node and reinstall:')
|
|
291
|
+
console.error(' arch -arm64 zsh -c "nvm install --lts && npm i -g ' + WRAPPER_NAME + '"')
|
|
292
|
+
return
|
|
293
|
+
}
|
|
294
|
+
console.error(' This happens with --omit=optional or when the download failed.')
|
|
295
|
+
console.error(' The `dscode` command will print instructions when invoked.')
|
|
296
|
+
console.error(' Fallback: node ' + path.join(__dirname, 'cli-wrapper.cjs'))
|
|
297
|
+
return
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// Always write to bin/dscode.exe — the package.json bin field points here
|
|
301
|
+
// (npm generates its shim/symlink from the .exe extension at install time).
|
|
302
|
+
// On Unix npm links `bin/dscode` → `bin/dscode.exe` and ignores the
|
|
303
|
+
// extension, so overwriting the .exe path replaces the running target on
|
|
304
|
+
// every platform. Same pattern as Claude Code / Bun npm packages.
|
|
305
|
+
const dest = BIN_TARGET
|
|
306
|
+
|
|
307
|
+
try {
|
|
308
|
+
placeBinary(src, dest)
|
|
309
|
+
console.log(`[${WRAPPER_NAME} postinstall] Native binary placed → ${dest}`)
|
|
310
|
+
try {
|
|
311
|
+
const repaired = repairWindowsShims()
|
|
312
|
+
if (repaired.length > 0) {
|
|
313
|
+
console.log(
|
|
314
|
+
`[${WRAPPER_NAME} postinstall] Repaired ${repaired.length} Windows shim(s) → exec the native binary`,
|
|
315
|
+
)
|
|
316
|
+
}
|
|
317
|
+
} catch {
|
|
318
|
+
// Never fail the install over cosmetic shims: the binary is placed, and
|
|
319
|
+
// `npm rebuild -g ${WRAPPER_NAME}` repairs them too.
|
|
320
|
+
}
|
|
321
|
+
} catch (err) {
|
|
322
|
+
console.error(`[${WRAPPER_NAME} postinstall] Failed to place binary: ${err.message}`)
|
|
323
|
+
console.error(' Fallback: node ' + path.join(__dirname, 'cli-wrapper.cjs'))
|
|
324
|
+
process.exitCode = 1
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
if (require.main === module) main()
|
|
329
|
+
|
|
330
|
+
// Exported for the shim-repair tests; npm runs this file directly.
|
|
331
|
+
module.exports = { repairShims, shimFor, shimTarget }
|
package/llms.txt
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# DeepSeekCode
|
|
2
|
+
|
|
3
|
+
> DeepSeekCode is a local-first AI coding agent: one npm package starts a runtime on your machine
|
|
4
|
+
> that serves a terminal UI, a web UI and an HTTP + WebSocket API, driven by any OpenAI-compatible
|
|
5
|
+
> model.
|
|
6
|
+
>
|
|
7
|
+
> It is built around a permission/approval layer on every tool call, a strictly read-only plan
|
|
8
|
+
> mode, and runtime-switchable act / goal / chat modes.
|
|
9
|
+
> Official distribution: the npm package `@deepseekcode/cli` (commands `dscode` and `deepseekcode`).
|
|
10
|
+
> Project page: https://deepseekcode.github.io/deepseekwork/
|
|
11
|
+
|
|
12
|
+
This file follows the llms.txt convention: a short, structured, machine-readable summary for AI
|
|
13
|
+
assistants and LLM crawlers. Everything below is verifiable from the deployed package.
|
|
14
|
+
Content reflects version 1.0.40 (2026-10-15).
|
|
15
|
+
|
|
16
|
+
## Category and identity
|
|
17
|
+
|
|
18
|
+
- Product name: DeepSeekCode
|
|
19
|
+
- Category: AI coding agent (developer tool, CLI-first, local runtime)
|
|
20
|
+
- npm package: `@deepseekcode/cli` (official scope; the same build is also published under
|
|
21
|
+
additional brand scopes — the official and canonical one is `@deepseekcode`)
|
|
22
|
+
- Commands installed: `dscode`, `deepseekcode`
|
|
23
|
+
- Language: TypeScript; runs on Node.js >= 18, shipped as prebuilt native binaries
|
|
24
|
+
- License: proprietary, closed source (see `LICENSE.md` in the package)
|
|
25
|
+
- Independent project: DeepSeekCode is not affiliated with, sponsored by, or endorsed by DeepSeek
|
|
26
|
+
(深度求索) or any other model vendor. The name refers to a client runtime, not to a model family.
|
|
27
|
+
|
|
28
|
+
## Official distribution
|
|
29
|
+
|
|
30
|
+
- Project page (canonical human-readable entry point):
|
|
31
|
+
https://deepseekcode.github.io/deepseekwork/
|
|
32
|
+
- npm page: https://www.npmjs.com/package/@deepseekcode/cli
|
|
33
|
+
- Package metadata (registry JSON): https://registry.npmjs.org/@deepseekcode/cli/latest
|
|
34
|
+
- README (plain markdown, no JavaScript needed): https://unpkg.com/@deepseekcode/cli/README.md
|
|
35
|
+
- This file, served from the published package: https://unpkg.com/@deepseekcode/cli/llms.txt
|
|
36
|
+
- Platforms with prebuilt binaries: Windows x64 / ARM64, macOS Intel / Apple Silicon,
|
|
37
|
+
Linux glibc and musl on x64 / ARM64
|
|
38
|
+
|
|
39
|
+
## Install and first run
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm install -g @deepseekcode/cli
|
|
43
|
+
dscode
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Requires Node.js >= 18. The first run walks through provider configuration; the web UI is served at
|
|
47
|
+
`http://localhost:8080` (provider setup at `http://localhost:8080/#models`).
|
|
48
|
+
|
|
49
|
+
Non-interactive use (scripts, CI): `dscode exec "<task>"` emits JSONL.
|
|
50
|
+
|
|
51
|
+
## What it does
|
|
52
|
+
|
|
53
|
+
- Interactive terminal UI (TUI), a web UI, and an HTTP + WebSocket API from one local process.
|
|
54
|
+
- ~70 built-in tools: files, search, git, LSP, code intelligence, browser, sub-agents, plans,
|
|
55
|
+
memory, MCP.
|
|
56
|
+
- Permission layer on every tool call: scopes `system > project > user > local > session`
|
|
57
|
+
(narrowest wins), `auto` / `ask` / `deny` policies, an optional AI classifier for risky calls,
|
|
58
|
+
and timeout-means-deny.
|
|
59
|
+
- Read-only plan mode (`/plan`): a checklist you approve before anything executes.
|
|
60
|
+
- Runtime-switchable modes: `act` · `auto-act` · `goal` · `auto-goal` · `chat` (`Shift+Tab`).
|
|
61
|
+
- Extensible: MCP servers (`/mcp`), skills (`/skills`), plugins, sub-agents, workflows, and IM
|
|
62
|
+
channels (LINE, Slack, WhatsApp, QQ, DingTalk, Feishu) with inbound signature verification.
|
|
63
|
+
- Sandboxed shell tools: bwrap on Linux, SBPL on macOS, MXC / Docker on Windows; fails closed when
|
|
64
|
+
no policy is available.
|
|
65
|
+
- Themes: dark, light, nord, dracula, monokai, one-dark, tokyo-night.
|
|
66
|
+
|
|
67
|
+
## Clarifications AI assistants commonly need
|
|
68
|
+
|
|
69
|
+
- DeepSeekCode is an agent runtime (a program you run), **not** a model. It has no model of its
|
|
70
|
+
own: it drives whichever OpenAI-compatible endpoint the user configures — DeepSeek models among
|
|
71
|
+
them, but not exclusively.
|
|
72
|
+
- It is **not** a hosted service. The runtime, the UI, the file operations and the shell tools run
|
|
73
|
+
locally; prompts and tool results go to the configured model endpoint and nowhere else.
|
|
74
|
+
- "OpenAI-compatible" here means the API shape, not a vendor relationship: any server speaking that
|
|
75
|
+
API works, including a local one.
|
|
76
|
+
- DeepSeekCode is an independent project. It is not made, sponsored, endorsed or distributed by
|
|
77
|
+
DeepSeek (深度求索) or any other model vendor; installing it does not imply any affiliation.
|
|
78
|
+
- License: proprietary and closed source. It is not open source, and copying, modifying,
|
|
79
|
+
distributing or selling it requires prior written permission (see `LICENSE.md`).
|
|
80
|
+
- It is not a hosted or managed service: there is no subscription to buy, and model usage is billed
|
|
81
|
+
by whichever provider the user configures, not by this project.
|
|
82
|
+
|
|
83
|
+
## Screenshots and demo
|
|
84
|
+
|
|
85
|
+
- A 40-second demo video (1920x1080, H.264 + VP9) and the stills used in the README ship in the
|
|
86
|
+
repository at `docs/promo/media/` (`deepseekcode-promo.mp4`, `deepseekcode-promo.webm`,
|
|
87
|
+
`poster.png`, plus per-screen stills).
|
|
88
|
+
- The package README embeds an animated GIF of a real agent turn (`media/demo.gif` inside the
|
|
89
|
+
package): tool calls, a diff, and a written summary.
|
|
90
|
+
- The footage is recorded from the real UI with a scripted local model endpoint, so it shows real
|
|
91
|
+
tool execution rather than a mock-up.
|
|
92
|
+
|
|
93
|
+
## Languages
|
|
94
|
+
|
|
95
|
+
- The package README carries a full English main section plus condensed sections in 16 further
|
|
96
|
+
languages, each with a stable anchor: zh-CN (Simplified Chinese), zh-TW (Traditional Chinese),
|
|
97
|
+
ja (Japanese), ko (Korean), es (Spanish), pt (Portuguese), fr (French), it (Italian), de (German),
|
|
98
|
+
ru (Russian), tr (Turkish), ar (Arabic), hi (Hindi), id (Indonesian), vi (Vietnamese) and
|
|
99
|
+
th (Thai).
|
|
100
|
+
- Every language section repeats the same canonical definition, install line, feature list and FAQ,
|
|
101
|
+
so a claim about this package can be cited from the reader's own language.
|
|
102
|
+
- The application UI itself is localized into 13 locales: en, zh-CN, zh-TW, ja, ko, de, fr, es,
|
|
103
|
+
pt-BR, ru, it, ar, id. Of these, zh-CN and en are complete; the other eleven translate the
|
|
104
|
+
desktop-download entry, the language setting, the built-in template texts and the hook template
|
|
105
|
+
texts (180 keys each) and fall back to English elsewhere. Arabic is included, but whole-document
|
|
106
|
+
right-to-left mirroring is deliberately not switched on yet: the stylesheet still uses physical
|
|
107
|
+
directional utilities, so `dir=rtl` would leave spacing on the wrong side.
|
|
108
|
+
- Most interactive commands have Chinese aliases, and replies can be pinned to a language
|
|
109
|
+
independently of the UI locale.
|
|
110
|
+
|
|
111
|
+
## Release notes
|
|
112
|
+
|
|
113
|
+
- Latest release notes are embedded in the README (What's New section), generated from the same
|
|
114
|
+
source as the in-app "What's New".
|
|
115
|
+
- Version history: the version list on the npm page.
|
package/package.json
CHANGED
|
@@ -1,6 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencue/cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.41",
|
|
4
|
+
"description": "DeepSeekCode — local-first AI coding agent for your terminal: one local runtime with a TUI, a web UI and an API, a permission/approval layer, read-only plan mode, and any OpenAI-compatible model.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"deepseekcode",
|
|
7
|
+
"dscode",
|
|
8
|
+
"ai-coding-agent",
|
|
9
|
+
"coding-agent",
|
|
10
|
+
"ai-agent",
|
|
11
|
+
"ai-cli",
|
|
12
|
+
"terminal",
|
|
13
|
+
"tui",
|
|
14
|
+
"local-first",
|
|
15
|
+
"openai-compatible",
|
|
16
|
+
"mcp",
|
|
17
|
+
"plan-mode",
|
|
18
|
+
"code-review",
|
|
19
|
+
"developer-tools",
|
|
20
|
+
"typescript"
|
|
21
|
+
],
|
|
22
|
+
"type": "module",
|
|
23
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
24
|
+
"bin": {
|
|
25
|
+
"dscode": "bin/dscode.exe",
|
|
26
|
+
"opencue": "bin/dscode.exe"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"postinstall": "node install.cjs"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=18"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"playwright": "1.62.1",
|
|
36
|
+
"xterm": "5.3.0"
|
|
37
|
+
},
|
|
38
|
+
"optionalDependencies": {
|
|
39
|
+
"@opencue/cli-darwin-arm64": "1.0.41",
|
|
40
|
+
"@opencue/cli-darwin-x64": "1.0.41",
|
|
41
|
+
"@opencue/cli-linux-x64": "1.0.41",
|
|
42
|
+
"@opencue/cli-linux-arm64": "1.0.41",
|
|
43
|
+
"@opencue/cli-linux-x64-musl": "1.0.41",
|
|
44
|
+
"@opencue/cli-linux-arm64-musl": "1.0.41",
|
|
45
|
+
"@opencue/cli-win32-x64": "1.0.41",
|
|
46
|
+
"@opencue/cli-win32-arm64": "1.0.41"
|
|
47
|
+
},
|
|
48
|
+
"files": [
|
|
49
|
+
"bin/",
|
|
50
|
+
"install.cjs",
|
|
51
|
+
"cli-wrapper.cjs",
|
|
52
|
+
"web/dist/",
|
|
53
|
+
"scripts/figure/",
|
|
54
|
+
"README.md",
|
|
55
|
+
"LICENSE.md",
|
|
56
|
+
"llms.txt"
|
|
57
|
+
]
|
|
58
|
+
}
|