dsh-labview-mcp 0.0.0-stage → 1.0.0

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-labview-mcp contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Zühlke
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (C) 2013 Jessica Creighton <jcreigh@femtobit.org>
4
+ Copyright (C) 2019-2020 Mefistotelis <mefistotelis@gmail.com>
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,167 @@
1
- # Temporary Holding Version
1
+ # dsh-labview-mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ An **unofficial** DSH bundle for [Zuehlke's LabVIEW MCP server](https://github.com/Zuehlke/labview-mcp).
4
+ It provisions the LabVIEW MCP runtime for Windows x64 and registers it as the MCP
5
+ server `labview`, so new DSH sessions get `mcp__labview__*` tools without any
6
+ manual download or profile editing. This project is not affiliated with or
7
+ endorsed by NI or Zuehlke.
8
+
9
+ ## What you get
10
+
11
+ - **122 LabVIEW MCP tools** in every new session, named `mcp__labview__*`.
12
+ - **Two native diagnostics**: `labview_mcp_status` and `labview_mcp_repair`.
13
+ - **Runtime status in Plugins**: the plugin's own page shows the live state and
14
+ can repair it without leaving the UI.
15
+ - **Versioned local runtime**: the plugin copies the runtime to
16
+ `%USERPROFILE%\.dsh\tools\labview-mcp\<binary-version>\` and keeps the two
17
+ newest versions. It never runs the executable from `node_modules`.
18
+ - **No install scripts, no build step, no runtime dependencies** in the plugin
19
+ package.
20
+
21
+ ## Requirements
22
+
23
+ - **Windows x64**. Other platforms install the plugin but report
24
+ `state: unsupported`; no binary package exists for them.
25
+ - **LabVIEW is optional.** The `pylv_*` tools use the bundled pylabview engine
26
+ and work without LabVIEW installed. The `lvai_*` tools need LabVIEW's AI gRPC
27
+ service (`lvai.LVAI`) to be available.
28
+ - **Cost**: adding the plugin downloads the ~57 MB platform package
29
+ `dsh-labview-mcp-win32-x64`; first use copies about 178 MB of runtime files to
30
+ the tools directory in the background. The 122 tools cost roughly
31
+ **65–75k tokens per request**, because every tool definition is sent to the
32
+ model.
33
+
34
+ ## Install
35
+
36
+ 1. Open **Plugins** in DSH.
37
+ 2. Choose **Add plugin**.
38
+ 3. Enter `dsh-labview-mcp` and confirm.
39
+
40
+ The Host downloads the optional Windows x64 runtime package during
41
+ installation. On first start, the plugin provisions the runtime in the
42
+ background and registers the `labview` MCP server after provisioning succeeds.
43
+ A new session then sees the `mcp__labview__*` tools.
44
+
45
+ The first launch of the unsigned `LabVIEWMCP.exe` can be slow while Windows
46
+ scans it; the plugin gives the server up to 120 seconds to start.
47
+
48
+ ## Runtime status in Plugins
49
+
50
+ Open **Plugins** and the plugin's own page. Its title carries a state tag
51
+ (`Ready`, `Provisioning…`, `Not provisioned`, `Broken`, `Server conflict`,
52
+ `Unsupported platform`), and a **Runtime** card below the page content reports
53
+ the same facts as `labview_mcp_status`:
54
+
55
+ - state, platform, runtime version, MCP server version, tool count, and the
56
+ versioned runtime directory;
57
+ - the resolved binary package `dsh-labview-mcp-win32-x64` and its path, or
58
+ `Not installed — reinstall the plugin` when the optional package is missing;
59
+ - the last error, when there is one.
60
+
61
+ **Refresh** re-reads the state. **Repair** runs the same provisioning pass as
62
+ `labview_mcp_repair` from the page; the card polls while it runs, disables the
63
+ button until it settles, and disables it on a platform without a binary package.
64
+ Repair restarts the `labview` MCP server, so a tool call running at that moment
65
+ may fail.
66
+
67
+ The tag, the card, and the routes behind them exist only while the plugin is
68
+ enabled. The panel is a convenience: if it reports `Status unavailable` — for
69
+ example right after an upgrade, before DSH restarts — `labview_mcp_status`
70
+ remains authoritative.
71
+
72
+ ## Configuration
73
+
74
+ The only configurable option is the per-tool-call timeout, `toolCallTimeoutMs`,
75
+ in milliseconds. The default is `300000` (5 minutes). To change it, override the
76
+ `labview-mcp` row's config in the profile's
77
+ `%USERPROFILE%\.dsh\profiles\<profile>\cordis.patch.yml`:
78
+
79
+ ```yaml
80
+ - id: labview-mcp
81
+ config:
82
+ toolCallTimeoutMs: 600000
83
+ ```
84
+
85
+ Restart DSH after changing the config. The MCP server name (`labview`) and the
86
+ tools directory are fixed.
87
+
88
+ ## Diagnostics and troubleshooting
89
+
90
+ `labview_mcp_status` is read-only and reports the current state.
91
+ `labview_mcp_repair` retries provisioning, restarts the MCP registration, and
92
+ returns the same status; pass `{ "force": true }` to recopy an intact but
93
+ suspected-bad runtime. Both tools are registered even when the platform is
94
+ unsupported or the binary package is missing, and they are the first place to
95
+ look when `mcp__labview__*` tools are absent or failing. The plugin's page in
96
+ **Plugins** shows the same status and offers the same repair (see
97
+ [Runtime status in Plugins](#runtime-status-in-plugins)).
98
+
99
+ | State | Meaning | What to do |
100
+ |---|---|---|
101
+ | `missing` | The optional `dsh-labview-mcp-win32-x64` package cannot be resolved, or the runtime has not been provisioned yet. | Wait if provisioning is in progress; otherwise reinstall the plugin or run `labview_mcp_repair`. |
102
+ | `provisioning` | The runtime is being copied in the background. | Wait; then call `labview_mcp_status` again. |
103
+ | `ready` | The runtime exists and the server connection is healthy. | No action. `toolCount` should be 122. |
104
+ | `broken` | The runtime is incomplete, corrupt, or the MCP server failed/closed. | Run `labview_mcp_repair`; use `force: true` if the runtime looks intact but is corrupt. |
105
+ | `conflict` | Another `labview` MCP server is already configured or registered (for example the old v1 bundle). | Remove that server, then run `labview_mcp_repair`. |
106
+ | `unsupported` | The platform is not Windows x64. | Use a Windows x64 machine; there is no binary package for this platform. |
107
+
108
+ ## Disable and uninstall
109
+
110
+ - To stop paying the token cost without uninstalling, disable **LabVIEW MCP
111
+ (unofficial)** in **Plugins**. The tools disappear from new sessions; existing
112
+ sessions keep what they already loaded.
113
+ - To remove it completely, uninstall the plugin in **Plugins**. The MCP
114
+ registration is disposed and the server process stops. The provisioned
115
+ runtime under `%USERPROFILE%\.dsh\tools\labview-mcp\<version>\` is left on
116
+ disk so a later reinstall can reuse it; delete that directory manually if you
117
+ want the disk space back.
118
+
119
+ ## Migrating from v1
120
+
121
+ The v1 local bundle cannot coexist with v2 because both register the MCP server
122
+ name `labview`. The full backup, remove, install, verify, uninstall, and
123
+ rollback procedure is in
124
+ [v1 → v2 migration and rollback](docs/migration-v1-to-v2.md). In short: back up the v1 bundle, remove it with Plugins,
125
+ install `dsh-labview-mcp` 1.0.0, verify `labview_mcp_status` reports `ready`
126
+ with 122 tools in a new session, then delete the old
127
+ `%USERPROFILE%\.dsh\tools\labview-mcp\current` directory. Keep the v1 backup
128
+ until v2 is accepted so you can roll back.
129
+
130
+ ## Release process
131
+
132
+ The repository ships one maintainer script, `scripts/release.mjs`, for both npm
133
+ packages:
134
+
135
+ - The binary package `dsh-labview-mcp-win32-x64` has the **upstream release
136
+ version** (currently `3.1.0`). The plugin package `dsh-labview-mcp` has its
137
+ **own independent version** (currently `1.0.0`) and declares the binary
138
+ package as `optionalDependencies: { "dsh-labview-mcp-win32-x64": "~3.1.0" }`.
139
+ An upstream minor or major release needs a plugin version bump; patch
140
+ releases inside `~3.1.0` do not.
141
+ - The script reads the latest GitHub release, requires the fixed asset
142
+ `labview-mcp.zip` and its `sha256:` digest, downloads through the mirror order
143
+ GitHub → `ghfast.top` → `gh-proxy.com` → `ghproxy.net`, and verifies size and
144
+ SHA-256 before extraction. It then builds both packages and runs
145
+ `npm publish --dry-run` file-list checks.
146
+ - Release order: publish the binary package first, wait **24 hours**, then
147
+ publish the plugin. The script enforces this by checking the binary version's
148
+ npm publish time before `--publish plugin`; `--skip-publish-cooldown` is the
149
+ explicit override. Hold the public announcement until the plugin version is
150
+ at least 24 hours old, so pnpm's default `minimumReleaseAge` of 1440 minutes
151
+ does not make the first-day install fail.
152
+ - Publishing reads `NPM_TOKEN` from the environment only. The token is never
153
+ written to the repository or package metadata.
154
+ - Upstream releases are reviewed manually; there is no automatic publish.
155
+
156
+ ## Source and licenses
157
+
158
+ - This project is MIT-licensed: see [LICENSE](LICENSE).
159
+ - The upstream Zuehlke **labview-mcp** runtime is MIT-licensed:
160
+ [LICENSE-Zuehlke.txt](LICENSE-Zuehlke.txt).
161
+ - The bundled **pylabview** engine is MIT-licensed:
162
+ [LICENSE-pylabview.txt](LICENSE-pylabview.txt).
163
+ - The binary package ships a bundled **Python 3.12** interpreter under the PSF
164
+ License.
165
+ - The full third-party attribution is in
166
+ [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md). The binary package
167
+ `dsh-labview-mcp-win32-x64` ships the complete upstream runtime tree.
@@ -0,0 +1,95 @@
1
+ # Third-Party Notices
2
+
3
+ This is the `dsh-labview-mcp` DSH plugin package. It contains the bundle
4
+ manifest, Host plugin, and display resources only. It declares the optional
5
+ platform package `dsh-labview-mcp-win32-x64`, which ships the full upstream
6
+ runtime tree under its `runtime/` directory. The components below are
7
+ third-party software redistributed by that binary package; this plugin package
8
+ is MIT-licensed (see `LICENSE`).
9
+
10
+ ## 1. Zuehlke labview-mcp
11
+
12
+ - Project: labview-mcp
13
+ - Source: https://github.com/Zuehlke/labview-mcp
14
+ - License: MIT
15
+ - Copyright (c) 2026 Zühlke
16
+
17
+ The binary package redistributes the complete upstream release tree unmodified
18
+ under `runtime/`. A copy of its MIT license is shipped at the plugin package
19
+ root as `LICENSE-Zuehlke.txt` (and by the binary package as `LICENSE`). Its MIT
20
+ license follows:
21
+
22
+ ```
23
+ MIT License
24
+
25
+ Copyright (c) 2026 Zühlke
26
+
27
+ Permission is hereby granted, free of charge, to any person obtaining a copy
28
+ of this software and associated documentation files (the "Software"), to deal
29
+ in the Software without restriction, including without limitation the rights
30
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31
+ copies of the Software, and to permit persons to whom the Software is
32
+ furnished to do so, subject to the following conditions:
33
+
34
+ The above copyright notice and this permission notice shall be included in all
35
+ copies or substantial portions of the Software.
36
+
37
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
39
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
40
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
41
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
42
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
43
+ SOFTWARE.
44
+ ```
45
+
46
+ ## 2. pylabview
47
+
48
+ - Project: pylabview
49
+ - License: MIT
50
+ - Copyright (C) 2013 Jessica Creighton <jcreigh@femtobit.org>
51
+ - Copyright (C) 2019-2020 Mefistotelis <mefistotelis@gmail.com>
52
+
53
+ pylabview is bundled by the binary package under `runtime/bin/pylabview/`. A
54
+ copy of its license is shipped at the plugin package root as
55
+ `LICENSE-pylabview.txt` (and inside the runtime as
56
+ `runtime/bin/pylabview/app/LICENSE-pylabview.txt`). Its MIT license follows:
57
+
58
+ ```
59
+ MIT License
60
+
61
+ Copyright (C) 2013 Jessica Creighton <jcreigh@femtobit.org>
62
+ Copyright (C) 2019-2020 Mefistotelis <mefistotelis@gmail.com>
63
+
64
+ Permission is hereby granted, free of charge, to any person obtaining a copy
65
+ of this software and associated documentation files (the "Software"), to deal
66
+ in the Software without restriction, including without limitation the rights
67
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
68
+ copies of the Software, and to permit persons to whom the Software is
69
+ furnished to do so, subject to the following conditions:
70
+
71
+ The above copyright notice and this permission notice shall be included in all
72
+ copies or substantial portions of the Software.
73
+
74
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
75
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
76
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
77
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
78
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
79
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
80
+ SOFTWARE.
81
+ ```
82
+
83
+ ## 3. Python 3.12
84
+
85
+ - Project: Python
86
+ - Source: https://www.python.org/
87
+ - License: Python Software Foundation License (PSF)
88
+ - Copyright (c) Python Software Foundation
89
+
90
+ A Python 3.12 interpreter is bundled by the binary package under
91
+ `runtime/bin/pylabview/` solely to run pylabview. It is distributed under the
92
+ PSF License Agreement. The full license text and the licenses of software
93
+ incorporated into Python are available at
94
+ https://docs.python.org/3/license.html and in the Python source distribution's
95
+ `LICENSE` file.