dsh-windows-parallel-mcp 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/CHANGELOG.md ADDED
@@ -0,0 +1,56 @@
1
+ # Changelog
2
+
3
+ Dates are the registry `time` values for each version, not git commit dates — a commit date records
4
+ when someone typed, a publish time records when a version became installable, and only the second
5
+ one is a promise to anyone installing it.
6
+
7
+ ## 0.1.1 — 2026-11-20
8
+
9
+ The same product as 0.1.0. This version exists to fix the packaging chain, not the behaviour.
10
+
11
+ **Changed**
12
+ - Repository line endings normalised to LF. 0.1.0 was published from a tree where an editing script
13
+ had converted ten files to CRLF, so the registry tarball (sha256 `84196f21…`) and this repository
14
+ no longer hashed the same even though the code was identical. 0.1.1 restores "the repository and
15
+ the published artifact are the same bytes".
16
+ - `publishConfig` is now explicit: `{ "access": "public", "tag": "latest" }`. The default was
17
+ already `latest`, but a default is a property of npm while a declaration is a property of this
18
+ package — the difference only shows up the first time someone publishes a prerelease.
19
+
20
+ **Verified for this version**
21
+ - 11 local gates green: PowerShell parse / encoding / static-call, refusal vocabulary, tool schema,
22
+ package contents, host half + sidecar, overlay promises, marker end-to-end, JS syntax.
23
+ - The overlay marker is measurably click-through: `exStyle 0x08080028`, foreground unchanged across
24
+ `Show()`, an independent process confirming `WindowFromPoint` at the marker's centre returns the
25
+ window underneath, and the marker covering the clicked point in physical pixels.
26
+ - The pause chord is measured, not assumed: `Ctrl+Alt+Q` is a first candidate, and on the machine
27
+ this was built on it was owned by another app (Win32 1409), so the engine walked a candidate list
28
+ and registered `Ctrl+Alt+W`. `status` reports the chord that actually registered.
29
+
30
+ **Not fixed in this version** (unchanged from 0.1.0, stated rather than implied)
31
+ - The settings pill and the four-value switch surface do not exist yet.
32
+ - `restore_failed` has no end-to-end test: it needs an elevated window that can be raised, and no
33
+ such window was present at build time. The decision-table branch is covered by unit tests; the
34
+ live path is not.
35
+
36
+ ## 0.1.0 — 2026-11-20
37
+
38
+ First version with a working plugin in it. Everything before this was a reservation stub.
39
+
40
+ - One tool, `wpm`, with five actions: `windows`, `status`, `click`, `type`, `focus`.
41
+ - A PowerShell sidecar (Windows PowerShell 5.1, nothing to install) driven over a JSON line protocol,
42
+ lazily started so the host's boot path does not pay for a tool nobody called.
43
+ - Eight refusal codes as a three-way contract: what fires, what the schema promises, what the docs
44
+ explain. A gate fails when the three disagree.
45
+ - A click-through, always-on-top marker placed at the point a click hit, and a global pause chord.
46
+ - Measured: window-message tier causes 0 foreground changes in 6/6 rounds with 0 px cursor movement;
47
+ the UI Automation tier's focus takeover returns in 15–95 ms net against a 120 ms budget.
48
+
49
+ ## 0.0.1 — 2026-11-18
50
+
51
+ Reservation stub. The name was reserved before the measurement was done; installing this version
52
+ gives you a README and nothing else. Kept for history, not for use.
53
+
54
+ ## 0.0.0-stage — 2026-11-18
55
+
56
+ The first reservation, same story as 0.0.1.
package/INSTALL.md CHANGED
@@ -22,8 +22,8 @@ To install from a local build, pack first and install the tarball -- this is als
22
22
  profile's other local-development plugins are mounted, and it matters for more than tidiness:
23
23
 
24
24
  ```bash
25
- npm pack --ignore-scripts # -> dsh-windows-parallel-mcp-0.1.0.tgz
26
- dsh plugin --profile <profile> add /abs/path/to/dsh-windows-parallel-mcp-0.1.0.tgz
25
+ npm pack --ignore-scripts # -> dsh-windows-parallel-mcp-0.1.1.tgz
26
+ dsh plugin --profile <profile> add /abs/path/to/dsh-windows-parallel-mcp-0.1.1.tgz
27
27
  ```
28
28
 
29
29
  A `link:` install keeps the package's REAL path outside the profile tree, and Node resolves bare
package/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # dsh-windows-parallel-mcp
2
2
 
3
- > **0.1.0 — first usable package.** The name was reserved earlier under a weaker claim; the claim
4
- > below is the measured one. See [What measurement established](#what-measurement-established) for
5
- > what did **not** survive.
3
+ > **0.1.1 — first usable package.** The name was reserved earlier under a weaker claim (see
4
+ > [CHANGELOG.md](CHANGELOG.md)); the claim below is the measured one. See
5
+ > [What measurement established](#what-measurement-established) for what did **not** survive.
6
+ > 0.1.1 is 0.1.0's behaviour with a corrected packaging chain — same product, and now the artifact
7
+ > you install hashes the same as the repository it came from.
6
8
 
7
9
  A DSH plugin that lets an agent drive **its own** Windows windows without moving your cursor. Where
8
10
  a window accepts a window message, you never lose focus at all. Where it only exposes UI Automation,
package/dsh.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-windows-parallel-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "main": "./lib/index.js",
5
5
  "description": "One tool, five actions: drive a Windows window without moving the cursor or stealing the keyboard. Prefers window messages (zero foreground change); falls back to UI Automation with a bounded, self-reversing focus flash (measured net return 15-95 ms).",
6
6
  "engines": {
package/lib/config.js CHANGED
@@ -1,125 +1,125 @@
1
- // config.js — the settings surface, built on the host's schema library when it is reachable and on a
2
- // standard-schema shim when it is not.
3
- //
4
- // WHY THIS FILE EXISTS AT ALL. The first version exported `Config` as a factory function. Cordis
5
- // requires a *standard-schema value* — it calls `Config['~standard'].validate(config)` — so the
6
- // plugin failed to activate with `Cannot read properties of undefined (reading 'validate')`, and the
7
- // only reason it was found is that the profile was actually booted (`dsh --profile wpm-dev headless`)
8
- // instead of being assumed good from a passing unit test. A plugin that never activates is the worst
9
- // failure mode available: it registers no tool, prints one warning into a busy log, and looks
10
- // installed.
11
- //
12
- // WHY NOT A HARD DEPENDENCY. `@deepseek-ai/schemastery` is a host-provided peer. Declaring it as a
13
- // dependency would drag a second copy of the schema library into the profile, and declaring it as a
14
- // peer would make install fail wherever the host resolves peers differently than it does here. So the
15
- // import is attempted, and the shim is the documented fallback.
16
- //
17
- // WHAT THE SHIM IS. A standard-schema implementation over a flat, explicitly typed field list. It
18
- // applies defaults, rejects wrong types and out-of-range values, and reports issues in the shape
19
- // Cordis renders. It is NOT schemastery: the settings FORM is rendered from schemastery's field
20
- // metadata, so a host that cannot resolve schemastery gives the user no form — the values still work
21
- // from the bundle patch. That limitation is stated in the README rather than papered over.
22
- const FIELDS = [
23
- { key: 'enabled', type: 'boolean', default: true, volatile: true,
24
- description: 'Master switch. When off, every action refuses with `paused` before the engine is reached.' },
25
- { key: 'settleMs', type: 'number', default: 350, min: 0, max: 2000, volatile: true,
26
- description: 'How long the target app gets to commit its state before the effect is judged.' },
27
- { key: 'requestTimeoutMs', type: 'number', default: 20000, min: 1000, max: 600000,
28
- description: 'A worker that stops answering is killed and restarted on the next call.' },
29
- { key: 'powershellPath', type: 'string', default: '',
30
- description: 'Override the PowerShell executable. Windows PowerShell 5.1 is the floor; pwsh is accepted.' },
31
- { key: 'overlay', type: 'boolean', default: true, volatile: true,
32
- description: 'Show the click-through AI marker at the point each action touched. It never takes '
33
- + 'the foreground and never intercepts a click (measured). The first action pays a one-time '
34
- + 'worker round-trip while the overlay starts; after that a placement costs ~19ms and does not '
35
- + 'gate the action result.' },
36
- { key: 'logWorkerStderr', type: 'boolean', default: false, volatile: true,
37
- description: 'Forward the sidecar’s stderr diagnostics to the host log.' },
38
- ];
39
-
40
- /** Defaults, for documentation and for tests that must not depend on a resolver. */
41
- export const CONFIG_DEFAULTS = Object.fromEntries(FIELDS.map((f) => [f.key, f.default]));
42
-
43
- /** Validate one raw config object against FIELDS. Returns `{ value, issues }` standard-schema style. */
44
- function validateWithShim(raw) {
45
- const input = raw && typeof raw === 'object' ? raw : {};
46
- const value = {};
47
- const issues = [];
48
- for (const field of FIELDS) {
49
- const given = input[field.key];
50
- if (given === undefined || given === null) { value[field.key] = field.default; continue; }
51
- if (field.type === 'boolean') {
52
- if (typeof given !== 'boolean') issues.push({ message: `expected a boolean`, path: [field.key] });
53
- else value[field.key] = given;
54
- } else if (field.type === 'number') {
55
- if (typeof given !== 'number' || !Number.isFinite(given)) {
56
- issues.push({ message: `expected a finite number`, path: [field.key] });
57
- } else if ((field.min !== undefined && given < field.min) || (field.max !== undefined && given > field.max)) {
58
- issues.push({ message: `expected ${field.min}..${field.max}`, path: [field.key] });
59
- } else {
60
- value[field.key] = given;
61
- }
62
- } else if (typeof given !== 'string') {
63
- issues.push({ message: `expected a string`, path: [field.key] });
64
- } else {
65
- value[field.key] = given;
66
- }
67
- }
68
- for (const key of Object.keys(input)) {
69
- if (!FIELDS.some((f) => f.key === key)) {
70
- // Unknown keys are an issue, not silence: a typo in the bundle patch would otherwise take the
71
- // default and leave the user wondering why their setting did nothing.
72
- issues.push({ message: `unknown setting`, path: [key] });
73
- }
74
- }
75
- return issues.length ? { issues } : { value };
76
- }
77
-
78
- const shimSchema = {
79
- '~standard': {
80
- version: 1,
81
- vendor: 'dsh-windows-parallel-mcp',
82
- validate: validateWithShim,
83
- },
84
- /** Marker parity with schemastery so `typeof field.volatile === 'function'` probes behave. */
85
- fields: FIELDS,
86
- };
87
-
88
- /**
89
- * Build the Config value. Tries the host's schema library first; falls back to the shim.
90
- * Returns `{ schema, source }` so the caller can log which one is active -- a silent fallback is how
91
- * "works on my machine" diverges from "works on the host".
92
- */
93
- export async function createConfigSchema() {
94
- try {
95
- // Static-import bridge (see lib/peers-schemastery.js): a dynamic bare specifier does not
96
- // resolve for a `link:`-installed package under the host, which is exactly why the desktop
97
- // profile fell to the shim and rendered no settings form.
98
- const mod = await import('./peers-schemastery.js');
99
- const z = mod?.z;
100
- if (z && typeof z.object === 'function') {
101
- const shape = {};
102
- for (const field of FIELDS) {
103
- let s;
104
- if (field.type === 'boolean') s = z.boolean();
105
- else if (field.type === 'number') s = z.number();
106
- else s = z.string();
107
- if (field.min !== undefined || field.max !== undefined) {
108
- if (typeof s.min === 'function' && field.min !== undefined) s = s.min(field.min);
109
- if (typeof s.max === 'function' && field.max !== undefined) s = s.max(field.max);
110
- }
111
- if (field.description) s = s.description(field.description);
112
- s = s.default(field.default);
113
- // `.volatile()` marks a field as hot-reloadable on 0.1.7+. Guarded because older schema
114
- // lines in the same major do not have it.
115
- if (field.volatile && typeof s.volatile === 'function') s = s.volatile();
116
- shape[field.key] = s;
117
- }
118
- const schema = z.object(shape);
119
- return { schema: typeof schema.prefault === 'function' ? schema.prefault({}) : schema, source: '@deepseek-ai/schemastery' };
120
- }
121
- } catch {
122
- // Documented fallback, reported through `source`.
123
- }
124
- return { schema: shimSchema, source: 'local-standard-schema-shim' };
125
- }
1
+ // config.js — the settings surface, built on the host's schema library when it is reachable and on a
2
+ // standard-schema shim when it is not.
3
+ //
4
+ // WHY THIS FILE EXISTS AT ALL. The first version exported `Config` as a factory function. Cordis
5
+ // requires a *standard-schema value* — it calls `Config['~standard'].validate(config)` — so the
6
+ // plugin failed to activate with `Cannot read properties of undefined (reading 'validate')`, and the
7
+ // only reason it was found is that the profile was actually booted (`dsh --profile wpm-dev headless`)
8
+ // instead of being assumed good from a passing unit test. A plugin that never activates is the worst
9
+ // failure mode available: it registers no tool, prints one warning into a busy log, and looks
10
+ // installed.
11
+ //
12
+ // WHY NOT A HARD DEPENDENCY. `@deepseek-ai/schemastery` is a host-provided peer. Declaring it as a
13
+ // dependency would drag a second copy of the schema library into the profile, and declaring it as a
14
+ // peer would make install fail wherever the host resolves peers differently than it does here. So the
15
+ // import is attempted, and the shim is the documented fallback.
16
+ //
17
+ // WHAT THE SHIM IS. A standard-schema implementation over a flat, explicitly typed field list. It
18
+ // applies defaults, rejects wrong types and out-of-range values, and reports issues in the shape
19
+ // Cordis renders. It is NOT schemastery: the settings FORM is rendered from schemastery's field
20
+ // metadata, so a host that cannot resolve schemastery gives the user no form — the values still work
21
+ // from the bundle patch. That limitation is stated in the README rather than papered over.
22
+ const FIELDS = [
23
+ { key: 'enabled', type: 'boolean', default: true, volatile: true,
24
+ description: 'Master switch. When off, every action refuses with `paused` before the engine is reached.' },
25
+ { key: 'settleMs', type: 'number', default: 350, min: 0, max: 2000, volatile: true,
26
+ description: 'How long the target app gets to commit its state before the effect is judged.' },
27
+ { key: 'requestTimeoutMs', type: 'number', default: 20000, min: 1000, max: 600000,
28
+ description: 'A worker that stops answering is killed and restarted on the next call.' },
29
+ { key: 'powershellPath', type: 'string', default: '',
30
+ description: 'Override the PowerShell executable. Windows PowerShell 5.1 is the floor; pwsh is accepted.' },
31
+ { key: 'overlay', type: 'boolean', default: true, volatile: true,
32
+ description: 'Show the click-through AI marker at the point each action touched. It never takes '
33
+ + 'the foreground and never intercepts a click (measured). The first action pays a one-time '
34
+ + 'worker round-trip while the overlay starts; after that a placement costs ~19ms and does not '
35
+ + 'gate the action result.' },
36
+ { key: 'logWorkerStderr', type: 'boolean', default: false, volatile: true,
37
+ description: 'Forward the sidecar’s stderr diagnostics to the host log.' },
38
+ ];
39
+
40
+ /** Defaults, for documentation and for tests that must not depend on a resolver. */
41
+ export const CONFIG_DEFAULTS = Object.fromEntries(FIELDS.map((f) => [f.key, f.default]));
42
+
43
+ /** Validate one raw config object against FIELDS. Returns `{ value, issues }` standard-schema style. */
44
+ function validateWithShim(raw) {
45
+ const input = raw && typeof raw === 'object' ? raw : {};
46
+ const value = {};
47
+ const issues = [];
48
+ for (const field of FIELDS) {
49
+ const given = input[field.key];
50
+ if (given === undefined || given === null) { value[field.key] = field.default; continue; }
51
+ if (field.type === 'boolean') {
52
+ if (typeof given !== 'boolean') issues.push({ message: `expected a boolean`, path: [field.key] });
53
+ else value[field.key] = given;
54
+ } else if (field.type === 'number') {
55
+ if (typeof given !== 'number' || !Number.isFinite(given)) {
56
+ issues.push({ message: `expected a finite number`, path: [field.key] });
57
+ } else if ((field.min !== undefined && given < field.min) || (field.max !== undefined && given > field.max)) {
58
+ issues.push({ message: `expected ${field.min}..${field.max}`, path: [field.key] });
59
+ } else {
60
+ value[field.key] = given;
61
+ }
62
+ } else if (typeof given !== 'string') {
63
+ issues.push({ message: `expected a string`, path: [field.key] });
64
+ } else {
65
+ value[field.key] = given;
66
+ }
67
+ }
68
+ for (const key of Object.keys(input)) {
69
+ if (!FIELDS.some((f) => f.key === key)) {
70
+ // Unknown keys are an issue, not silence: a typo in the bundle patch would otherwise take the
71
+ // default and leave the user wondering why their setting did nothing.
72
+ issues.push({ message: `unknown setting`, path: [key] });
73
+ }
74
+ }
75
+ return issues.length ? { issues } : { value };
76
+ }
77
+
78
+ const shimSchema = {
79
+ '~standard': {
80
+ version: 1,
81
+ vendor: 'dsh-windows-parallel-mcp',
82
+ validate: validateWithShim,
83
+ },
84
+ /** Marker parity with schemastery so `typeof field.volatile === 'function'` probes behave. */
85
+ fields: FIELDS,
86
+ };
87
+
88
+ /**
89
+ * Build the Config value. Tries the host's schema library first; falls back to the shim.
90
+ * Returns `{ schema, source }` so the caller can log which one is active -- a silent fallback is how
91
+ * "works on my machine" diverges from "works on the host".
92
+ */
93
+ export async function createConfigSchema() {
94
+ try {
95
+ // Static-import bridge (see lib/peers-schemastery.js): a dynamic bare specifier does not
96
+ // resolve for a `link:`-installed package under the host, which is exactly why the desktop
97
+ // profile fell to the shim and rendered no settings form.
98
+ const mod = await import('./peers-schemastery.js');
99
+ const z = mod?.z;
100
+ if (z && typeof z.object === 'function') {
101
+ const shape = {};
102
+ for (const field of FIELDS) {
103
+ let s;
104
+ if (field.type === 'boolean') s = z.boolean();
105
+ else if (field.type === 'number') s = z.number();
106
+ else s = z.string();
107
+ if (field.min !== undefined || field.max !== undefined) {
108
+ if (typeof s.min === 'function' && field.min !== undefined) s = s.min(field.min);
109
+ if (typeof s.max === 'function' && field.max !== undefined) s = s.max(field.max);
110
+ }
111
+ if (field.description) s = s.description(field.description);
112
+ s = s.default(field.default);
113
+ // `.volatile()` marks a field as hot-reloadable on 0.1.7+. Guarded because older schema
114
+ // lines in the same major do not have it.
115
+ if (field.volatile && typeof s.volatile === 'function') s = s.volatile();
116
+ shape[field.key] = s;
117
+ }
118
+ const schema = z.object(shape);
119
+ return { schema: typeof schema.prefault === 'function' ? schema.prefault({}) : schema, source: '@deepseek-ai/schemastery' };
120
+ }
121
+ } catch {
122
+ // Documented fallback, reported through `source`.
123
+ }
124
+ return { schema: shimSchema, source: 'local-standard-schema-shim' };
125
+ }