@twinsearth/w2m-dsh-plugin 0.0.0-stage → 0.4.6

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.
Files changed (60) hide show
  1. package/CHANGELOG.md +1288 -0
  2. package/LICENSE +21 -0
  3. package/PROTOCOL-v0.1.2.md +165 -0
  4. package/PROTOCOL-v0.3.0.md +454 -0
  5. package/PROTOCOL-v0.3.9.md +207 -0
  6. package/PROTOCOL-v0.4.0.md +255 -0
  7. package/PROTOCOL.md +339 -0
  8. package/README.md +665 -2
  9. package/bin/w2m-localside.mjs +303 -0
  10. package/bin/w2m-rabbit.mjs +396 -0
  11. package/bin/w2m-stun.mjs +231 -0
  12. package/cordis.patch.yml +94 -0
  13. package/deploy/caddy/Caddyfile.example +118 -0
  14. package/deploy/docker/Dockerfile +144 -0
  15. package/deploy/docker/README.md +338 -0
  16. package/deploy/docker/docker-compose.yml +179 -0
  17. package/deploy/nginx/w2m.conf.example +196 -0
  18. package/deploy/shared-server/README.md +118 -0
  19. package/deploy/shared-server/install.sh +255 -0
  20. package/deploy/systemd/w2m-rabbit.service +150 -0
  21. package/deploy/systemd/w2m-stun.service +69 -0
  22. package/deploy/windows/README.md +115 -0
  23. package/deploy/windows/install-service.ps1 +195 -0
  24. package/deploy/windows/w2m-agent-supervisor.mjs +205 -0
  25. package/deploy/windows/winsw/w2m-localside.xml +50 -0
  26. package/docs/DEPLOY.md +902 -0
  27. package/docs/LINT-AUDIT.md +492 -0
  28. package/docs/PIPELINE-DESIGN.md +95 -0
  29. package/docs/TROUBLESHOOTING.md +560 -0
  30. package/docs/UI-CARDS.md +81 -0
  31. package/lib/index.js +13 -0
  32. package/lib/tools.js +11 -0
  33. package/package.json +133 -4
  34. package/src/agent/agent.mjs +3317 -0
  35. package/src/agent/allowed-commands.mjs +116 -0
  36. package/src/agent/caps.mjs +437 -0
  37. package/src/agent/exec.mjs +356 -0
  38. package/src/agent/git.mjs +616 -0
  39. package/src/agent/identity.mjs +253 -0
  40. package/src/agent/p2p-node.mjs +1243 -0
  41. package/src/agent/p2p.mjs +605 -0
  42. package/src/agent/resolve.mjs +148 -0
  43. package/src/agent/spool.mjs +252 -0
  44. package/src/agent/stun.mjs +397 -0
  45. package/src/agent/url.mjs +127 -0
  46. package/src/plugin/auto-update.mjs +574 -0
  47. package/src/plugin/schedule.mjs +452 -0
  48. package/src/plugin/shared-config.mjs +264 -0
  49. package/src/plugin/tools.mjs +3891 -0
  50. package/src/plugin/update-install.mjs +764 -0
  51. package/src/plugin/update-source.mjs +686 -0
  52. package/src/relay/metrics.mjs +284 -0
  53. package/src/relay/peers.mjs +180 -0
  54. package/src/relay/persistence.mjs +207 -0
  55. package/src/relay/report.mjs +591 -0
  56. package/src/relay/server.mjs +1187 -0
  57. package/src/relay/state.mjs +2004 -0
  58. package/src/relay/stun-server.mjs +733 -0
  59. package/src/signing.mjs +359 -0
  60. package/src/util/cli.mjs +70 -0
package/package.json CHANGED
@@ -1,6 +1,135 @@
1
1
  {
2
2
  "name": "@twinsearth/w2m-dsh-plugin",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.4.6",
4
+ "description": "DSH: Windows2MacOS — drive the same project on online Windows and macOS machines from one DeepSeek account, across networks and regions. P2P hole punching is the default path (relay + shared server as rendezvous, ledger and fallback), with a bundled STUN responder, Tailscale/public-VPS/tunnel shapes, Rabbit relay + per-machine Localside + eight DSH tools (replicate / split), nine aggregate verdicts and signed requests.",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "bin": {
8
+ "w2m-rabbit": "bin/w2m-rabbit.mjs",
9
+ "w2m-localside": "bin/w2m-localside.mjs",
10
+ "w2m-stun": "bin/w2m-stun.mjs"
11
+ },
12
+ "exports": {
13
+ ".": "./lib/index.js",
14
+ "./tools": "./lib/tools.js",
15
+ "./rabbit": "./bin/w2m-rabbit.mjs",
16
+ "./localside": "./bin/w2m-localside.mjs",
17
+ "./stun": "./bin/w2m-stun.mjs",
18
+ "./package.json": "./package.json"
19
+ },
20
+ "files": [
21
+ "lib",
22
+ "src",
23
+ "bin",
24
+ "deploy",
25
+ "docs",
26
+ "cordis.patch.yml",
27
+ "README.md",
28
+ "CHANGELOG.md",
29
+ "LICENSE",
30
+ "PROTOCOL.md",
31
+ "PROTOCOL-v0.1.2.md",
32
+ "PROTOCOL-v0.3.0.md",
33
+ "PROTOCOL-v0.3.9.md",
34
+ "PROTOCOL-v0.4.0.md"
35
+ ],
36
+ "dsh": {
37
+ "plugin": true,
38
+ "kind": "server",
39
+ "bundle": {
40
+ "patch": "cordis.patch.yml"
41
+ }
42
+ },
43
+ "disclosure": {
44
+ "cloud": true,
45
+ "network": [
46
+ "http://202.182.123.154:8787",
47
+ "202.182.123.154:3478",
48
+ "stun.cloudflare.com:3478",
49
+ "stun.l.google.com:19302",
50
+ "stun.nextcloud.com:443"
51
+ ],
52
+ "offlineMode": false,
53
+ "apiKeys": [
54
+ {
55
+ "env": "W2M_OPERATOR_TOKEN",
56
+ "storage": "profile-config"
57
+ },
58
+ {
59
+ "env": null,
60
+ "storage": "file-0600"
61
+ }
62
+ ],
63
+ "permissions": {
64
+ "network": "the configured relay (default: the shared server above), STUN servers, and UDP to the peer machines",
65
+ "filesystem": "read/write inside the project directory and DSH_HOME; the agent writes its spool and state under --state",
66
+ "env": [
67
+ "W2M_*"
68
+ ]
69
+ },
70
+ "jurisdiction": [
71
+ "CN",
72
+ "JP"
73
+ ],
74
+ "retention": "server"
75
+ },
76
+ "engines": {
77
+ "node": ">=20.19.0"
78
+ },
79
+ "dependencies": {},
80
+ "devDependencies": {
81
+ "@eslint/js": "^10.0.1",
82
+ "eslint": "^10.12.0",
83
+ "globals": "^17.13.0",
84
+ "prettier": "^3.9.9"
85
+ },
86
+ "peerDependencies": {
87
+ "@deepseek-ai/dsh-tools": "*"
88
+ },
89
+ "peerDependenciesMeta": {
90
+ "@deepseek-ai/dsh-tools": {
91
+ "optional": true
92
+ }
93
+ },
94
+ "scripts": {
95
+ "test": "node --test --test-force-exit test/relay.test.mjs test/broadcast.test.mjs test/agent.test.mjs test/tools.test.mjs test/schedule.test.mjs test/auto-update.test.mjs test/update-source.test.mjs test/update-install.test.mjs test/update-wiring.test.mjs test/signing.test.mjs test/stress.test.mjs test/shared-config.test.mjs test/metrics.test.mjs test/metrics-route.test.mjs test/tool-cards.test.mjs test/p2p-stun.test.mjs test/p2p-transport.test.mjs test/p2p-signaling.test.mjs test/p2p-node.test.mjs test/p2p-transport-fields.test.mjs test/p2p-plugin.test.mjs test/stun-server.test.mjs",
96
+ "test:e2e": "node --test --test-force-exit test/e2e.test.mjs test/crossnetwork.test.mjs test/signing-e2e.test.mjs test/outbound-only.test.mjs test/recovery.test.mjs test/pipeline-e2e.test.mjs test/p2p-agent.test.mjs",
97
+ "test:relay": "node --test test/relay.test.mjs",
98
+ "test:agent": "node --test test/agent.test.mjs",
99
+ "test:tools": "node --test test/tools.test.mjs",
100
+ "test:crossnetwork": "node --test --test-force-exit test/crossnetwork.test.mjs",
101
+ "test:all": "node --test --test-force-exit test/relay.test.mjs test/broadcast.test.mjs test/agent.test.mjs test/tools.test.mjs test/schedule.test.mjs test/auto-update.test.mjs test/update-source.test.mjs test/update-install.test.mjs test/update-wiring.test.mjs test/signing.test.mjs test/stress.test.mjs test/e2e.test.mjs test/crossnetwork.test.mjs test/signing-e2e.test.mjs test/outbound-only.test.mjs test/recovery.test.mjs test/pipeline-e2e.test.mjs test/shared-config.test.mjs test/metrics.test.mjs test/metrics-route.test.mjs test/tool-cards.test.mjs test/p2p-stun.test.mjs test/p2p-transport.test.mjs test/p2p-signaling.test.mjs test/p2p-node.test.mjs test/p2p-transport-fields.test.mjs test/p2p-plugin.test.mjs test/p2p-agent.test.mjs test/stun-server.test.mjs",
102
+ "pack": "node scripts/pack.mjs",
103
+ "lint": "eslint .",
104
+ "lint:fix": "eslint . --fix",
105
+ "format": "prettier --write .",
106
+ "format:check": "prettier --check .",
107
+ "verify": "node scripts/check-entrypoints.mjs && node --test --test-force-exit test/relay.test.mjs test/broadcast.test.mjs test/agent.test.mjs test/tools.test.mjs test/e2e.test.mjs test/crossnetwork.test.mjs test/p2p-node.test.mjs test/p2p-agent.test.mjs",
108
+ "test:p2p": "node --test --test-force-exit test/p2p-stun.test.mjs test/p2p-transport.test.mjs test/p2p-signaling.test.mjs test/p2p-node.test.mjs test/stun-server.test.mjs test/p2p-transport-fields.test.mjs test/p2p-plugin.test.mjs test/p2p-agent.test.mjs"
109
+ },
110
+ "keywords": [
111
+ "dsh-bundle",
112
+ "dsh-plugin",
113
+ "deepseek-harness",
114
+ "deepseek",
115
+ "windows2macos",
116
+ "w2m",
117
+ "cross-platform",
118
+ "multi-machine",
119
+ "orchestration",
120
+ "replicate",
121
+ "sharding"
122
+ ],
123
+ "repository": {
124
+ "type": "git",
125
+ "url": "git+https://github.com/TwinsEarth/dsh-windows2macos.git"
126
+ },
127
+ "homepage": "https://github.com/TwinsEarth/dsh-windows2macos",
128
+ "bugs": {
129
+ "url": "https://github.com/TwinsEarth/dsh-windows2macos/issues"
130
+ },
131
+ "publishConfig": {
132
+ "access": "public"
133
+ },
134
+ "license": "MIT"
135
+ }