@twinsearth/w2m-dsh-plugin 0.5.3 → 0.5.5
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/CHANGELOG.md +90 -0
- package/cordis.patch.yml +27 -4
- package/lib/client.js +515 -0
- package/lib/index.js +16 -11
- package/lib/tools.js +9 -3
- package/package.json +7 -3
- package/src/plugin/fleet-target.mjs +667 -0
- package/src/plugin/tools.mjs +152 -26
package/lib/index.js
CHANGED
|
@@ -3,22 +3,27 @@
|
|
|
3
3
|
*
|
|
4
4
|
* TWO READERS, ONE EXPORT LIST
|
|
5
5
|
*
|
|
6
|
-
* `cordis.patch.yml`
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* `cordis.patch.yml` mounts this file: the profile reads the patch, sees
|
|
7
|
+
* `@twinsearth/w2m-dsh-plugin`, and loads `./index.js`. It names the *package* rather than the
|
|
8
|
+
* `tools` subpath on purpose, and the reason is measured rather than stylistic: the client module
|
|
9
|
+
* system (`@deepseek-ai/dsh-client-modules`) identifies a client package by the specifier its Loader
|
|
10
|
+
* row carries (`exactPackageSpecifier`), so a row naming `…/tools` resolves to no package.json at all
|
|
11
|
+
* — `dsh.client` is never read and the browser half is never composed into `__DSH_BOOT__`. The host
|
|
12
|
+
* would keep working and the composer control would silently never arrive; that is what v0.5.4
|
|
13
|
+
* shipped, and `test/loader-entry.test.mjs` now catches it through the real Loader.
|
|
9
14
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* module", and
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
15
|
+
* `./tools.js` remains a supported mount point for anyone who wants it, and it is still what the
|
|
16
|
+
* DSH plugin listing requirements look at: the checklist asks for a package that "exports an
|
|
17
|
+
* `apply(ctx)` module", and this root is that module. It used to be documentation only, so importing
|
|
18
|
+
* the package root yielded **no exports at all** (`Object.keys() === []`): a plugin that works
|
|
19
|
+
* perfectly when mounted by its patch and looks like an empty package to every tool that inspects it.
|
|
20
|
+
* That is a bad trade for one re-export line.
|
|
16
21
|
*
|
|
17
22
|
* WHY NOT MOVE THE PLUGIN HERE
|
|
18
23
|
*
|
|
19
24
|
* Re-exporting is not relocating: `./tools.js` stays the single definition, so there is still
|
|
20
25
|
* exactly one implementation of the plugin surface to keep in sync. Mounting *both* this entry and
|
|
21
|
-
* the subpath would register the eight tools twice, which is why the patch
|
|
22
|
-
*
|
|
26
|
+
* the subpath would register the eight tools twice, which is why the patch mounts exactly one of
|
|
27
|
+
* them.
|
|
23
28
|
*/
|
|
24
29
|
export { apply, inject, resetDefineToolCacheForTests } from './tools.js';
|
package/lib/tools.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Package-facing plugin entry: `@twinsearth/w2m-dsh-plugin/tools`.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* The documented subpath entry point, and the seam between the published package
|
|
5
|
+
* layout (`lib/`, what npm ships as the documented entry) and the implementation
|
|
6
|
+
* (`src/`, where the code is actually readable).
|
|
7
|
+
*
|
|
8
|
+
* `cordis.patch.yml` mounts the package *root* (`lib/index.js`), which re-exports
|
|
9
|
+
* this file, because the client module system only recognises a package whose
|
|
10
|
+
* Loader row carries the bare package specifier. Both paths land on the same
|
|
11
|
+
* `apply` and `inject` -- `test/tools.test.mjs` asserts that -- so this remains a
|
|
12
|
+
* supported mount point for a profile that prefers it.
|
|
7
13
|
*
|
|
8
14
|
* Nothing is re-implemented here on purpose: a second definition of the plugin
|
|
9
15
|
* surface would be a second thing to keep in sync.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twinsearth/w2m-dsh-plugin",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
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
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"exports": {
|
|
13
13
|
".": "./lib/index.js",
|
|
14
14
|
"./tools": "./lib/tools.js",
|
|
15
|
+
"./client": "./lib/client.js",
|
|
15
16
|
"./rabbit": "./bin/w2m-rabbit.mjs",
|
|
16
17
|
"./localside": "./bin/w2m-localside.mjs",
|
|
17
18
|
"./stun": "./bin/w2m-stun.mjs",
|
|
@@ -38,6 +39,9 @@
|
|
|
38
39
|
"kind": "server",
|
|
39
40
|
"bundle": {
|
|
40
41
|
"patch": "cordis.patch.yml"
|
|
42
|
+
},
|
|
43
|
+
"client": {
|
|
44
|
+
"platform": "web"
|
|
41
45
|
}
|
|
42
46
|
},
|
|
43
47
|
"disclosure": {
|
|
@@ -92,13 +96,13 @@
|
|
|
92
96
|
}
|
|
93
97
|
},
|
|
94
98
|
"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",
|
|
99
|
+
"test": "node --test --test-force-exit test/relay.test.mjs test/broadcast.test.mjs test/agent.test.mjs test/tools.test.mjs test/fleet-target.test.mjs test/client-bundle.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
100
|
"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
101
|
"test:relay": "node --test test/relay.test.mjs",
|
|
98
102
|
"test:agent": "node --test test/agent.test.mjs",
|
|
99
103
|
"test:tools": "node --test test/tools.test.mjs",
|
|
100
104
|
"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",
|
|
105
|
+
"test:all": "node --test --test-force-exit test/relay.test.mjs test/broadcast.test.mjs test/agent.test.mjs test/tools.test.mjs test/fleet-target.test.mjs test/client-bundle.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
106
|
"pack": "node scripts/pack.mjs",
|
|
103
107
|
"lint": "eslint .",
|
|
104
108
|
"lint:fix": "eslint . --fix",
|