@dns-data/remote 0.2.15 → 0.2.23
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/DISCLOSURE +3 -2
- package/README.md +23 -51
- package/bin/desktop-shortcut.js +34 -68
- package/bin/dns-data.js +20 -20
- package/bin/native-platform.js +9 -0
- package/native/macos-arm64 +0 -0
- package/package.json +7 -5
- package/native/windows-x64.exe +0 -0
package/DISCLOSURE
CHANGED
|
@@ -5,8 +5,9 @@ DNS-DATA provides remote device administration and MCP integration for a
|
|
|
5
5
|
user who owns or is explicitly authorized to manage the connected computer.
|
|
6
6
|
|
|
7
7
|
Official production execution model:
|
|
8
|
-
- The npm package contains
|
|
9
|
-
|
|
8
|
+
- The npm package contains only the macOS Apple Silicon arm64 native agent.
|
|
9
|
+
Windows uses the separately distributed official .exe client.
|
|
10
|
+
The Mac npm launcher does not download an additional .NET Runtime.
|
|
10
11
|
- At each startup, the foreground launcher checks device credentials,
|
|
11
12
|
re-collects hardware information and requests current authorization from
|
|
12
13
|
the official DNS-DATA control server.
|
package/README.md
CHANGED
|
@@ -1,58 +1,30 @@
|
|
|
1
|
-
# DNS-DATA Remote MCP
|
|
1
|
+
# DNS-DATA Remote MCP - macOS
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
npm is supported only on Apple Silicon Macs (arm64).
|
|
4
|
+
Windows users install and update the official DNS-DATA Windows .exe client.
|
|
5
|
+
Windows npm startup and Windows binaries are not part of this package.
|
|
6
|
+
Intel Macs (x64) are unsupported.
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
After official publication, use:
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
npx -y @dns-data/remote@latest
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
This npm command uses a SHA-256-verified native macOS arm64 Agent. On each
|
|
13
|
+
startup the Agent checks the signed-in account, device binding and account
|
|
14
|
+
entitlements. New devices use the existing eight-digit pairing flow.
|
|
15
|
+
The management UI runs at http://127.0.0.1:18761/ while the Agent is running.
|
|
16
|
+
No system autostart is installed; close the Agent to stop it.
|
|
10
17
|
|
|
11
|
-
|
|
18
|
+
The macOS Agent includes native files/system/process tools, direct LAN file
|
|
19
|
+
transfer, encrypted memory, knowledge search/indexing, and context tools.
|
|
20
|
+
Third-party software MCP bridges are not exposed on macOS.
|
|
21
|
+
Memory is encrypted locally and syncs directly with authorized LAN peers.
|
|
22
|
+
No cloud memory database or file relay is introduced.
|
|
12
23
|
|
|
13
|
-
|
|
24
|
+
Context continuation requires the AI client to invoke the relevant MCP tools.
|
|
25
|
+
An Agent cannot recover private chat content the AI provider does not send.
|
|
26
|
+
The local management page supports manual checkpoint and resume.
|
|
14
27
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Version 0.2.6 official release: macOS users continue starting with
|
|
19
|
-
npx -y @dns-data/remote@latest; the same native Agent now includes LAN Direct
|
|
20
|
-
v3 from the Windows implementation. The launcher installs this verified Agent
|
|
21
|
-
under ~/Library/Application Support/DNS-DATA/Remote-Agent/ so ordinary npm
|
|
22
|
-
cache rotation does not change its executable path. Initial macOS / third-party
|
|
23
|
-
firewall approval may be needed. The system firewall and code-signing policies
|
|
24
|
-
remain in force; this package does not disable or bypass them. The Agent
|
|
25
|
-
performs authorized full-file direct LAN copies over TLS 1.3 and TCP 443
|
|
26
|
-
without an intermediate server handling file bytes. Desktop and Documents
|
|
27
|
-
folder access is still subject to macOS file privacy authorization.
|
|
28
|
-
|
|
29
|
-
Version 0.2.7 candidate (not published): Running npx -y @dns-data/remote@latest
|
|
30
|
-
now creates or repairs a single DNS-DATA desktop launcher automatically for
|
|
31
|
-
Windows x64 (DNS-DATA.cmd) and macOS Apple Silicon (DNS-DATA.command).
|
|
32
|
-
Normal startup works for both newly enrolled and already-bound devices.
|
|
33
|
-
The desktop shortcut always executes npm @latest, not a fixed local binary.
|
|
34
|
-
Repeated runs do not duplicate it; unrelated user files and symlinks are
|
|
35
|
-
not replaced. Failure to write the Desktop does not prevent service startup.
|
|
36
|
-
No extra Mac app, SSH, SMB, file relay or changes to account entitlements.
|
|
37
|
-
|
|
38
|
-
## Version 0.2.15 candidate - macOS context continuation
|
|
39
|
-
|
|
40
|
-
macOS Agent adds memory_context_checkpoint, memory_context_resume, and
|
|
41
|
-
memory_context_list on top of the existing encrypted LAN-synchronized
|
|
42
|
-
memory mechanism already validated on Windows. This version does not
|
|
43
|
-
change the Windows binary, Windows client UI, or account entitlements.
|
|
44
|
-
MCP clients must call checkpoint tools; the Agent does not have access to
|
|
45
|
-
provider chat messages not supplied to it. A new AI conversation will not
|
|
46
|
-
necessarily resume unless its AI provider calls memory_context_resume.
|
|
47
|
-
No browser auto-open is introduced.
|
|
48
|
-
|
|
49
|
-
Mac 0.4.11 context management: the localhost management page now shows
|
|
50
|
-
active task continuation, next action, milestones, and explicit checkpoint
|
|
51
|
-
updates. Concurrent device edits can be reviewed and resolved by choosing
|
|
52
|
-
a version with confirmation. All operations use the existing authenticated
|
|
53
|
-
Agent memory tools and encrypted LAN sync. No independent memory store,
|
|
54
|
-
cloud relay, new persistent port, Windows binary update, or browser auto-open.
|
|
55
|
-
|
|
56
|
-
AI-provider automatic checkpoint creation remains dependent on that AI
|
|
57
|
-
client invoking MCP memory tools; a native Agent cannot observe provider
|
|
58
|
-
conversations the provider never sends.
|
|
28
|
+
v0.2.23 adds encrypted cross-AI conversation continuation by provider name and real conversation title.
|
|
29
|
+
For example, 继续 GPT resumes the first indexed ChatGPT conversation; 继续 Claude 的知识库优化对话 searches the saved Claude conversation titles.
|
|
30
|
+
Only conversations whose real titles/checkpoints have been saved or authorized for import can be resumed; unavailable provider history is not invented.
|
package/bin/desktop-shortcut.js
CHANGED
|
@@ -1,90 +1,56 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
const fs=require('fs');
|
|
3
|
+
const path=require('path');
|
|
4
|
+
const os=require('os');
|
|
5
|
+
const crypto=require('crypto');
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
// Only the macOS Apple Silicon npm launcher creates this desktop shortcut.
|
|
8
|
+
const CONTENT = '#!/bin/zsh\n' +
|
|
9
|
+
'cd "$HOME"\n' +
|
|
10
|
+
'export PATH="$HOME/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:$PATH"\n' +
|
|
11
|
+
'exec npx -y @dns-data/remote@latest\n';
|
|
8
12
|
|
|
9
|
-
// The desktop shortcut is user-facing; the native Agent and the actual
|
|
10
|
-
// service always run from the npm package, never a second installed app.
|
|
11
|
-
const CONTENT = Object.freeze({
|
|
12
|
-
darwin: '#!/bin/zsh\n' +
|
|
13
|
-
'cd "$HOME"\n' +
|
|
14
|
-
'export PATH="$HOME/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:$PATH"\n' +
|
|
15
|
-
'exec npx -y @dns-data/remote@latest\n',
|
|
16
|
-
win32: '@echo off\r\n' +
|
|
17
|
-
'cd /d "%USERPROFILE%"\r\n' +
|
|
18
|
-
'npx -y @dns-data/remote@latest\r\n' +
|
|
19
|
-
'if errorlevel 1 pause\r\n'
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
function windowsDesktop(home) {
|
|
23
|
-
// Supports OneDrive, redirected and non-English Windows desktop locations.
|
|
24
|
-
try {
|
|
25
|
-
const resolved = execFileSync('powershell.exe', [
|
|
26
|
-
'-NoLogo', '-NoProfile', '-NonInteractive', '-Command',
|
|
27
|
-
'[Environment]::GetFolderPath("Desktop")'
|
|
28
|
-
], {encoding:'utf8', timeout:6000, windowsHide:true, stdio:['ignore','pipe','ignore']}).trim();
|
|
29
|
-
if (resolved && fs.existsSync(resolved) && fs.statSync(resolved).isDirectory()) {
|
|
30
|
-
return resolved;
|
|
31
|
-
}
|
|
32
|
-
} catch (_) {}
|
|
33
|
-
const options = [
|
|
34
|
-
process.env.OneDrive ? path.join(process.env.OneDrive, 'Desktop') : '',
|
|
35
|
-
process.env.OneDriveCommercial ? path.join(process.env.OneDriveCommercial, 'Desktop') : '',
|
|
36
|
-
path.join(home, 'Desktop')
|
|
37
|
-
];
|
|
38
|
-
return options.find(x => x && fs.existsSync(x) && fs.statSync(x).isDirectory()) ||
|
|
39
|
-
path.join(home,'Desktop');
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// No overwrite of arbitrary user scripts, folders or symlinks.
|
|
43
13
|
function recognizedOldLauncher(text) {
|
|
44
14
|
return text.includes('@dns-data/remote') ||
|
|
45
15
|
(text.includes('DNS-DATA') && text.includes('dns-data.js'));
|
|
46
16
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if
|
|
50
|
-
throw Error('
|
|
17
|
+
function ensureDesktopShortcut({platform=process.platform, arch=process.arch,
|
|
18
|
+
desktop=null, home=os.homedir()}={}) {
|
|
19
|
+
if(platform!=='darwin'||arch!=='arm64') {
|
|
20
|
+
throw Error('The npm launcher supports Apple Silicon macOS only');
|
|
51
21
|
}
|
|
52
|
-
const dir
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const expected=CONTENT[platform];
|
|
58
|
-
let oldText=null;
|
|
59
|
-
try {
|
|
22
|
+
const dir=desktop||path.join(home,'Desktop');
|
|
23
|
+
if(!fs.statSync(dir).isDirectory()) throw Error('Desktop is not a folder');
|
|
24
|
+
const filename=path.join(dir,'DNS-DATA.command');
|
|
25
|
+
let current=null;
|
|
26
|
+
try{
|
|
60
27
|
const st=fs.lstatSync(filename);
|
|
61
|
-
if
|
|
28
|
+
if(!st.isFile()||st.isSymbolicLink()) {
|
|
62
29
|
throw Error('Desktop shortcut path is not a regular file');
|
|
63
30
|
}
|
|
64
|
-
|
|
65
|
-
if
|
|
66
|
-
if
|
|
67
|
-
return {path:filename,
|
|
31
|
+
current=fs.readFileSync(filename,'utf8');
|
|
32
|
+
if(current===CONTENT) {
|
|
33
|
+
if((st.mode&0o111)===0) fs.chmodSync(filename,0o755);
|
|
34
|
+
return {path:filename,changed:false};
|
|
68
35
|
}
|
|
69
|
-
if
|
|
36
|
+
if(!recognizedOldLauncher(current)) {
|
|
70
37
|
throw Error('Existing desktop script is not a DNS-DATA launcher; preserved');
|
|
71
38
|
}
|
|
72
|
-
}
|
|
73
|
-
if
|
|
39
|
+
}catch(e){
|
|
40
|
+
if(e.code!=='ENOENT') throw e;
|
|
74
41
|
}
|
|
75
42
|
const tmp=path.join(dir,'.dns-data-shortcut-'+process.pid+'-'+crypto.randomBytes(8).toString('hex'));
|
|
76
|
-
try
|
|
43
|
+
try{
|
|
77
44
|
const fd=fs.openSync(tmp,'wx',0o600);
|
|
78
|
-
try
|
|
79
|
-
fs.writeFileSync(fd,
|
|
45
|
+
try{
|
|
46
|
+
fs.writeFileSync(fd,CONTENT,'utf8');
|
|
80
47
|
fs.fsyncSync(fd);
|
|
81
|
-
}
|
|
82
|
-
fs.chmodSync(tmp,
|
|
48
|
+
}finally{fs.closeSync(fd);}
|
|
49
|
+
fs.chmodSync(tmp,0o755);
|
|
83
50
|
fs.renameSync(tmp,filename);
|
|
84
|
-
}
|
|
85
|
-
try
|
|
51
|
+
}finally{
|
|
52
|
+
try{fs.unlinkSync(tmp);}catch(e){if(e.code!=='ENOENT')throw e;}
|
|
86
53
|
}
|
|
87
|
-
return {path:filename,
|
|
54
|
+
return {path:filename,changed:true};
|
|
88
55
|
}
|
|
89
|
-
|
|
90
56
|
module.exports={ensureDesktopShortcut};
|
package/bin/dns-data.js
CHANGED
|
@@ -6,14 +6,14 @@ const crypto=require('crypto');
|
|
|
6
6
|
const os=require('os');
|
|
7
7
|
const {spawn}=require('child_process');
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
'
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
const nativeName=
|
|
16
|
-
|
|
9
|
+
const {selectNative}=require('./native-platform');
|
|
10
|
+
const nativeSpec=selectNative(process.platform,process.arch);
|
|
11
|
+
if(!nativeSpec){
|
|
12
|
+
console.error('[ERROR] Unsupported DNS-DATA platform '+process.platform+'-'+process.arch+'. npm supports macOS Apple Silicon (arm64) only; Windows uses the official .exe client.');
|
|
13
|
+
process.exit(2);
|
|
14
|
+
}
|
|
15
|
+
const nativeName=nativeSpec.file;
|
|
16
|
+
const expected={[nativeName]:nativeSpec.sha256};
|
|
17
17
|
const binary=path.resolve(__dirname,'..','native',nativeName);
|
|
18
18
|
try{
|
|
19
19
|
const hash=crypto.createHash('sha256').update(fs.readFileSync(binary)).digest('hex');
|
|
@@ -21,6 +21,15 @@ try{
|
|
|
21
21
|
if(process.platform==='darwin') fs.chmodSync(binary,0o755);
|
|
22
22
|
}catch(e){console.error('[ERROR] DNS-DATA integrity: '+e.message);process.exit(3);}
|
|
23
23
|
|
|
24
|
+
const args=process.argv.slice(2);
|
|
25
|
+
const safe=new Set(['--version','--start','--pair-only','--hardware-check','--pair-probe','--policy-check']);
|
|
26
|
+
const isPreview=args.length===1&&args[0]==='--flow-preview';
|
|
27
|
+
if(isPreview){
|
|
28
|
+
console.log('DNS-DATA '+require('../package.json').version+': fresh motherboard/CPU/GPU + account -> native Go executor via npx');
|
|
29
|
+
console.log('New device: eight-digit pairing -> fresh hardware recheck -> built-in remote service (no .NET)');
|
|
30
|
+
console.log('V1 pairing, V1 device startup and legacy bootstrap: disabled');
|
|
31
|
+
process.exit(0);
|
|
32
|
+
}
|
|
24
33
|
// macOS uses a persistent, per-user Agent path. The executable and its
|
|
25
34
|
// associated network identity no longer change when npx rotates cache paths.
|
|
26
35
|
// All copies are verified against the package's embedded SHA-256. No root,
|
|
@@ -29,7 +38,7 @@ let runtimeBinary=binary;
|
|
|
29
38
|
if(process.platform==='darwin'){
|
|
30
39
|
const stableDir=path.join(os.homedir(),'Library','Application Support',
|
|
31
40
|
'DNS-DATA','Remote-Agent');
|
|
32
|
-
const stableBinary=path.join(stableDir,'dns-data-agent-
|
|
41
|
+
const stableBinary=path.join(stableDir,'dns-data-agent-'+nativeName);
|
|
33
42
|
const digest=(p)=>crypto.createHash('sha256').update(fs.readFileSync(p)).digest('hex');
|
|
34
43
|
try {
|
|
35
44
|
fs.mkdirSync(stableDir,{recursive:true,mode:0o700});
|
|
@@ -63,16 +72,7 @@ if(process.platform==='darwin'){
|
|
|
63
72
|
}
|
|
64
73
|
}
|
|
65
74
|
|
|
66
|
-
const
|
|
67
|
-
const safe=new Set(['--version','--start','--pair-only','--hardware-check','--pair-probe','--policy-check']);
|
|
68
|
-
const isPreview=args.length===1&&args[0]==='--flow-preview';
|
|
69
|
-
if(isPreview){
|
|
70
|
-
console.log('DNS-DATA '+require('../package.json').version+': fresh motherboard/CPU/GPU + account -> native Go executor via npx');
|
|
71
|
-
console.log('New device: eight-digit pairing -> fresh hardware recheck -> built-in remote service (no .NET)');
|
|
72
|
-
console.log('V1 pairing, V1 device startup and legacy bootstrap: disabled');
|
|
73
|
-
process.exit(0);
|
|
74
|
-
}
|
|
75
|
-
const isNativeLANCopy=['win32','darwin'].includes(process.platform) &&
|
|
75
|
+
const isNativeLANCopy=process.platform==='darwin' &&
|
|
76
76
|
args.length===4 &&
|
|
77
77
|
((args[0]==='--lan-copy-send' && args[2]==='--lan-copy-done') ||
|
|
78
78
|
(args[0]==='--lan-copy-receive' && args[2]==='--lan-copy-offer-file')) &&
|
|
@@ -129,7 +129,7 @@ function probeMacPanelOnce(){
|
|
|
129
129
|
}
|
|
130
130
|
function launchNative(){
|
|
131
131
|
console.log('DNS-DATA Remote Connection - V2');
|
|
132
|
-
const child=spawn(runtimeBinary,args,{stdio:'inherit',shell:false,
|
|
132
|
+
const child=spawn(runtimeBinary,args,{stdio:'inherit',shell:false,env:process.env});
|
|
133
133
|
let done=false;
|
|
134
134
|
function finish(code){if(done)return;done=true;process.exitCode=code;}
|
|
135
135
|
child.once('error',e=>{console.error('[ERROR] V2 launcher: '+e.message);finish(1);});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// npm is supported only on Apple Silicon Macs. Windows installs its .exe client.
|
|
3
|
+
const nativeByPlatform=Object.freeze({
|
|
4
|
+
'darwin-arm64':Object.freeze({file:'macos-arm64',sha256:'8cbaf9141f4e0cb2bb5b0e73818371b0ffa11f155e544bf3faa2bbaa45153f88'}),
|
|
5
|
+
});
|
|
6
|
+
function selectNative(platform,arch){
|
|
7
|
+
return nativeByPlatform[platform+'-'+arch]||null;
|
|
8
|
+
}
|
|
9
|
+
module.exports={selectNative,nativeByPlatform};
|
package/native/macos-arm64
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dns-data/remote",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "DNS-DATA
|
|
3
|
+
"version": "0.2.23",
|
|
4
|
+
"description": "DNS-DATA Apple Silicon macOS MCP native launcher with encrypted cross-AI conversation title continuation",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|
|
7
7
|
"bin": {
|
|
@@ -11,13 +11,12 @@
|
|
|
11
11
|
"node": ">=18"
|
|
12
12
|
},
|
|
13
13
|
"os": [
|
|
14
|
-
"win32",
|
|
15
14
|
"darwin"
|
|
16
15
|
],
|
|
17
16
|
"files": [
|
|
18
17
|
"bin/dns-data.js",
|
|
18
|
+
"bin/native-platform.js",
|
|
19
19
|
"bin/desktop-shortcut.js",
|
|
20
|
-
"native/windows-x64.exe",
|
|
21
20
|
"native/macos-arm64",
|
|
22
21
|
"README.md",
|
|
23
22
|
"DISCLOSURE"
|
|
@@ -30,5 +29,8 @@
|
|
|
30
29
|
],
|
|
31
30
|
"contentPolicy": {
|
|
32
31
|
"class": "dual-use"
|
|
33
|
-
}
|
|
32
|
+
},
|
|
33
|
+
"cpu": [
|
|
34
|
+
"arm64"
|
|
35
|
+
]
|
|
34
36
|
}
|
package/native/windows-x64.exe
DELETED
|
Binary file
|