Commit 97e86d1
Improve module path resolution and macOS compatibility (#172)
This pull request introduces several improvements and fixes across the
MCP server and supporting scripts. The most notable changes include a
more robust check for script invocation, improved compatibility for
temporary file creation on macOS, and metadata updates.
**Server invocation and compatibility improvements:**
* Improved the script invocation check in `server.mjs` to use
`realpathSync` and `fileURLToPath`, making it more robust and reliable
across symlinked environments. (`mcp-server/server.mjs`,
`[mcp-server/server.mjsL1596-R1599](diffhunk://#diff-fa2b329c088195110d7f59f714c29a003b1cd1804716bb67acdacb4888ec3ef1L1596-R1599)`)
* Updated import statements in `server.mjs` to remove unused imports and
add `realpathSync`, simplifying the code and reducing dependencies.
(`mcp-server/server.mjs`,
`[mcp-server/server.mjsR4-R8](diffhunk://#diff-fa2b329c088195110d7f59f714c29a003b1cd1804716bb67acdacb4888ec3ef1R4-R8)`)
**Script enhancements for macOS:**
* Modified `verify-hitl-staging.sh` to use a macOS-safe method for
creating temporary files with `mktemp`, improving compatibility and
reliability on macOS systems. (`scripts/verify-hitl-staging.sh`,
`[scripts/verify-hitl-staging.shL16-R16](diffhunk://#diff-9154b6d85679f4d5188e393c955ec759bd0d2d67a0b9844fe5d9723bac72c5e8L16-R16)`)
* Cleaned up comments and removed redundant lines in
`verify-hitl-staging.sh` for clarity and maintainability.
(`scripts/verify-hitl-staging.sh`,
`[[1]](diffhunk://#diff-9154b6d85679f4d5188e393c955ec759bd0d2d67a0b9844fe5d9723bac72c5e8L2-R2)`,
`[[2]](diffhunk://#diff-9154b6d85679f4d5188e393c955ec759bd0d2d67a0b9844fe5d9723bac72c5e8L26)`)
**Metadata updates:**
* Added the `mcpName` field to `package.json` to specify the MCP
server's identity, aiding in package management and identification.
(`mcp-server/package.json`,
`[mcp-server/package.jsonR4](diffhunk://#diff-f3494fd36ee5f868a34336de16a47abd48792d43efeb619ed167c8067ec1630fR4)`)
---
Co-authored-by: Rajat Patra <113469515+RawJat@users.noreply.github.com>3 files changed
Lines changed: 11 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
1593 | 1594 | | |
1594 | 1595 | | |
1595 | 1596 | | |
1596 | | - | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
1597 | 1600 | | |
1598 | 1601 | | |
1599 | 1602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
| 2 | + | |
5 | 3 | | |
6 | 4 | | |
7 | 5 | | |
| |||
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
16 | | - | |
17 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
| |||
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
37 | | - | |
| 35 | + | |
0 commit comments