svn-agent-mcp 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/.editorconfig +12 -0
- package/.gitattributes +7 -0
- package/.github/workflows/ci.yml +39 -0
- package/.svn-mcp-policy.json +9 -0
- package/CHANGELOG.md +248 -0
- package/CONTRIBUTING.md +49 -0
- package/LICENSE +201 -0
- package/README.md +143 -0
- package/SECURITY.md +21 -0
- package/THIRD_PARTY_CHECKSUMS.txt +52 -0
- package/THIRD_PARTY_NOTICES.md +46 -0
- package/bin/SlikSvn-DB44-20-x64.dll +0 -0
- package/bin/SlikSvn-libapr-1.dll +0 -0
- package/bin/SlikSvn-libaprutil-1.dll +0 -0
- package/bin/SlikSvn-libcrypto-3-x64.dll +0 -0
- package/bin/SlikSvn-libintl.dll +0 -0
- package/bin/SlikSvn-libsasl21.dll +0 -0
- package/bin/SlikSvn-libssl-3-x64.dll +0 -0
- package/bin/SlikSvn-libsvn_client-1.dll +0 -0
- package/bin/SlikSvn-libsvn_delta-1.dll +0 -0
- package/bin/SlikSvn-libsvn_diff-1.dll +0 -0
- package/bin/SlikSvn-libsvn_fs-1.dll +0 -0
- package/bin/SlikSvn-libsvn_fs_base-1.dll +0 -0
- package/bin/SlikSvn-libsvn_fs_fs-1.dll +0 -0
- package/bin/SlikSvn-libsvn_fs_util-1.dll +0 -0
- package/bin/SlikSvn-libsvn_fs_x-1.dll +0 -0
- package/bin/SlikSvn-libsvn_ra-1.dll +0 -0
- package/bin/SlikSvn-libsvn_repos-1.dll +0 -0
- package/bin/SlikSvn-libsvn_subr-1.dll +0 -0
- package/bin/SlikSvn-libsvn_wc-1.dll +0 -0
- package/bin/System64/concrt140.dll +0 -0
- package/bin/System64/msvcp140.dll +0 -0
- package/bin/System64/msvcp140_1.dll +0 -0
- package/bin/System64/msvcp140_2.dll +0 -0
- package/bin/System64/msvcp140_atomic_wait.dll +0 -0
- package/bin/System64/msvcp140_codecvt_ids.dll +0 -0
- package/bin/System64/vccorlib140.dll +0 -0
- package/bin/System64/vcruntime140.dll +0 -0
- package/bin/System64/vcruntime140_1.dll +0 -0
- package/bin/dos2unix.exe +0 -0
- package/bin/engines/capi.dll +0 -0
- package/bin/libsvnjavahl-1.dll +0 -0
- package/bin/mac2unix.exe +0 -0
- package/bin/svn-populate-node-origins-index.exe +0 -0
- package/bin/svn.exe +0 -0
- package/bin/svnadmin.exe +0 -0
- package/bin/svnauthz-validate.exe +0 -0
- package/bin/svnauthz.exe +0 -0
- package/bin/svnbench.exe +0 -0
- package/bin/svndumpfilter.exe +0 -0
- package/bin/svnfsfs.exe +0 -0
- package/bin/svnlook.exe +0 -0
- package/bin/svnmucc.exe +0 -0
- package/bin/svnrdump.exe +0 -0
- package/bin/svnserve.exe +0 -0
- package/bin/svnsync.exe +0 -0
- package/bin/svnversion.exe +0 -0
- package/bin/unix2dos.exe +0 -0
- package/bin/unix2mac.exe +0 -0
- package/dist/envelope.d.ts +39 -0
- package/dist/envelope.d.ts.map +1 -0
- package/dist/envelope.js +137 -0
- package/dist/envelope.js.map +1 -0
- package/dist/eol.d.ts +15 -0
- package/dist/eol.d.ts.map +1 -0
- package/dist/eol.js +119 -0
- package/dist/eol.js.map +1 -0
- package/dist/guards.d.ts +26 -0
- package/dist/guards.d.ts.map +1 -0
- package/dist/guards.js +306 -0
- package/dist/guards.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +221 -0
- package/dist/index.js.map +1 -0
- package/dist/parse/commitText.d.ts +2 -0
- package/dist/parse/commitText.d.ts.map +1 -0
- package/dist/parse/commitText.js +9 -0
- package/dist/parse/commitText.js.map +1 -0
- package/dist/parse/diffText.d.ts +7 -0
- package/dist/parse/diffText.d.ts.map +1 -0
- package/dist/parse/diffText.js +55 -0
- package/dist/parse/diffText.js.map +1 -0
- package/dist/parse/infoXml.d.ts +3 -0
- package/dist/parse/infoXml.d.ts.map +1 -0
- package/dist/parse/infoXml.js +35 -0
- package/dist/parse/infoXml.js.map +1 -0
- package/dist/parse/logXml.d.ts +10 -0
- package/dist/parse/logXml.d.ts.map +1 -0
- package/dist/parse/logXml.js +39 -0
- package/dist/parse/logXml.js.map +1 -0
- package/dist/parse/statusXml.d.ts +6 -0
- package/dist/parse/statusXml.d.ts.map +1 -0
- package/dist/parse/statusXml.js +64 -0
- package/dist/parse/statusXml.js.map +1 -0
- package/dist/parse/updateText.d.ts +6 -0
- package/dist/parse/updateText.d.ts.map +1 -0
- package/dist/parse/updateText.js +67 -0
- package/dist/parse/updateText.js.map +1 -0
- package/dist/runner.d.ts +41 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +270 -0
- package/dist/runner.js.map +1 -0
- package/dist/tools/composite.d.ts +15 -0
- package/dist/tools/composite.d.ts.map +1 -0
- package/dist/tools/composite.js +238 -0
- package/dist/tools/composite.js.map +1 -0
- package/dist/tools/diagnose.d.ts +6 -0
- package/dist/tools/diagnose.d.ts.map +1 -0
- package/dist/tools/diagnose.js +131 -0
- package/dist/tools/diagnose.js.map +1 -0
- package/dist/tools/mutating.d.ts +80 -0
- package/dist/tools/mutating.d.ts.map +1 -0
- package/dist/tools/mutating.js +558 -0
- package/dist/tools/mutating.js.map +1 -0
- package/dist/tools/readonly.d.ts +52 -0
- package/dist/tools/readonly.d.ts.map +1 -0
- package/dist/tools/readonly.js +638 -0
- package/dist/tools/readonly.js.map +1 -0
- package/dist/tools/selfcheck.d.ts +5 -0
- package/dist/tools/selfcheck.d.ts.map +1 -0
- package/dist/tools/selfcheck.js +91 -0
- package/dist/tools/selfcheck.js.map +1 -0
- package/dist/types.d.ts +66 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/docs/README.md +11 -0
- package/docs/SPEC.md +964 -0
- package/docs/decisions/ADR-001-use-spec-v1-architecture.md +25 -0
- package/docs/decisions/ADR-002-use-capability-based-generic-svn-policy.md +31 -0
- package/docs/decisions/ADR-003-use-plug-and-play-global-registration.md +39 -0
- package/docs/decisions/ADR-004-borrow-diagnostics-not-external-mcp-surface.md +39 -0
- package/docs/svnrules.md +84 -0
- package/docs/toolrules.md +34 -0
- package/jest.config.cjs +14 -0
- package/package.json +51 -0
- package/scripts/clean.mjs +27 -0
- package/scripts/prepare-release.mjs +84 -0
- package/src/envelope.ts +182 -0
- package/src/eol.ts +137 -0
- package/src/guards.ts +362 -0
- package/src/index.ts +364 -0
- package/src/parse/commitText.ts +9 -0
- package/src/parse/diffText.ts +66 -0
- package/src/parse/infoXml.ts +51 -0
- package/src/parse/logXml.ts +64 -0
- package/src/parse/statusXml.ts +87 -0
- package/src/parse/updateText.ts +76 -0
- package/src/runner.ts +344 -0
- package/src/tools/composite.ts +289 -0
- package/src/tools/diagnose.ts +150 -0
- package/src/tools/mutating.ts +694 -0
- package/src/tools/readonly.ts +786 -0
- package/src/tools/selfcheck.ts +97 -0
- package/src/types.ts +76 -0
- package/tests/README.md +9 -0
- package/tests/diff-redaction.test.ts +146 -0
- package/tests/entrypoint.test.ts +49 -0
- package/tests/guards-eol.test.ts +170 -0
- package/tests/integration-svn.test.ts +709 -0
- package/tests/parsers.test.ts +119 -0
- package/tests/runner.test.ts +159 -0
- package/tests/selfcheck.test.ts +22 -0
- package/tsconfig.json +30 -0
package/README.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# svn-agent MCP
|
|
2
|
+
|
|
3
|
+
Strict SVN Model Context Protocol server for agent-safe status, diff, EOL diagnosis, precommit checks, and guarded SVN mutations.
|
|
4
|
+
|
|
5
|
+
The implementation contract lives in `docs/SPEC.md`. Version `1.0.0` is the first public open-source release and can prepare a self-contained local runtime bundle under `releases/v1.0.0`.
|
|
6
|
+
|
|
7
|
+
Requirements: Windows, Node.js 20 or newer, Git, and access to the public npm registry. The bundled
|
|
8
|
+
SlikSVN and dos2unix runtime payload is Windows-only.
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
```powershell
|
|
13
|
+
git clone https://github.com/shrishailrana-maker/svn-agent-mcp-v1.git
|
|
14
|
+
cd svn-agent-mcp-v1
|
|
15
|
+
npm install
|
|
16
|
+
npm run prepare:local
|
|
17
|
+
npm test
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Agent Setup From GitHub
|
|
21
|
+
|
|
22
|
+
Tell an agent:
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
Get the SVN MCP from https://github.com/shrishailrana-maker/svn-agent-mcp-v1, clone it to C:\MCP\svn-agent-mcp-v1, run npm install, run npm run prepare:local, then configure the MCP command as node C:\MCP\svn-agent-mcp-v1\current\dist\index.js.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The setup commands are:
|
|
29
|
+
|
|
30
|
+
```powershell
|
|
31
|
+
git clone https://github.com/shrishailrana-maker/svn-agent-mcp-v1.git C:\MCP\svn-agent-mcp-v1
|
|
32
|
+
cd C:\MCP\svn-agent-mcp-v1
|
|
33
|
+
npm install
|
|
34
|
+
npm run prepare:local
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Then configure the MCP client to run:
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
node C:\MCP\svn-agent-mcp-v1\current\dist\index.js
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Claude Desktop Config Example
|
|
44
|
+
|
|
45
|
+
Add this under `mcpServers`:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"mcpServers": {
|
|
50
|
+
"svn": {
|
|
51
|
+
"command": "node",
|
|
52
|
+
"args": ["C:\\MCP\\svn-agent-mcp-v1\\current\\dist\\index.js"]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Codex Config Example
|
|
59
|
+
|
|
60
|
+
```toml
|
|
61
|
+
[mcp_servers.svn]
|
|
62
|
+
command = "node"
|
|
63
|
+
args = ["C:\\MCP\\svn-agent-mcp-v1\\current\\dist\\index.js"]
|
|
64
|
+
startup_timeout_sec = 120
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Restart the MCP client after changing the config.
|
|
68
|
+
|
|
69
|
+
## Start The MCP
|
|
70
|
+
|
|
71
|
+
For development from this working copy:
|
|
72
|
+
|
|
73
|
+
```powershell
|
|
74
|
+
cd <path-to-svn-agent-mcp-v1>
|
|
75
|
+
npm install
|
|
76
|
+
npm run prepare:local
|
|
77
|
+
node .\current\dist\index.js
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The source tree includes `bin/` with the full SlikSVN `bin` payload plus the full dos2unix `bin` payload. Releases copy that folder to `current/bin`, so normal Windows clients do not need to locate or install `svn`, `svnversion`, `svnadmin`, `dos2unix`, `unix2dos`, or their required DLLs. See `THIRD_PARTY_NOTICES.md` and `THIRD_PARTY_CHECKSUMS.txt` for bundled binary notices and SHA256 hashes.
|
|
81
|
+
|
|
82
|
+
## Plug-And-Play Client Config
|
|
83
|
+
|
|
84
|
+
Register the MCP once globally. Do not set `cwd` and do not set environment variables:
|
|
85
|
+
|
|
86
|
+
Generic client example:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"mcpServers": {
|
|
91
|
+
"svn": {
|
|
92
|
+
"command": "node",
|
|
93
|
+
"args": ["C:\\MCP\\svn-agent-mcp-v1\\current\\dist\\index.js"]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
The MCP is not tied to one SVN checkout. If a tool call supplies absolute paths and omits `cwd`, the server finds the nearest SVN working copy for those paths. Relative paths require explicit per-call `cwd`.
|
|
100
|
+
|
|
101
|
+
Client registration is static: configure the MCP once, and working-copy discovery happens per tool call. The server does not rewrite client configuration at runtime.
|
|
102
|
+
|
|
103
|
+
Environment variables are not required for normal use. They are development/test escape hatches only: `SVN_AGENT_BIN_DIR`, `SVN_AGENT_SVN_PATH`, `SVN_AGENT_DOS2UNIX_DIR`, `SVN_AGENT_TIMEOUT_MS`, and `SVN_AGENT_MAX_DIFF_LINES`.
|
|
104
|
+
|
|
105
|
+
## Commands
|
|
106
|
+
|
|
107
|
+
| Command | Description |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
| `npm run dev` | Run the TypeScript entry point during development |
|
|
110
|
+
| `npm run typecheck` | Check TypeScript without emitting build output |
|
|
111
|
+
| `npm run build` | Compile `src/` into `dist/` |
|
|
112
|
+
| `npm test` | Run the Jest test suite |
|
|
113
|
+
| `npm run prepare:local` | Build and prepare the local `current` runtime |
|
|
114
|
+
| `npm run release:prepare` | Copy `dist/` and `bin/` into `releases/v<version>` and repoint `current` |
|
|
115
|
+
| `npm run clean` | Remove root `dist/` with the Node clean script |
|
|
116
|
+
|
|
117
|
+
## Operator Diagnostics
|
|
118
|
+
|
|
119
|
+
Use `svn_self_check` to verify the MCP package, `current` release pointer, bundled binaries, and release scripts. Use `svn_diagnose` on a working-copy path when SVN itself is acting strange; it checks local status, remote status, HEAD info, latest log reachability, and returns actionable notes for authentication, network, lock, and working-copy database failures.
|
|
120
|
+
|
|
121
|
+
For SVN property work, use `svn_propget` and guarded `svn_propset` instead of raw `svn propget`/`svn propset`. `svn_propset_eol_style` remains the safer shortcut for `svn:eol-style` normalization.
|
|
122
|
+
|
|
123
|
+
## Changelog
|
|
124
|
+
|
|
125
|
+
Release history is maintained in `CHANGELOG.md`.
|
|
126
|
+
|
|
127
|
+
## Layout
|
|
128
|
+
|
|
129
|
+
| Path | Purpose |
|
|
130
|
+
| --- | --- |
|
|
131
|
+
| `src/` | MCP server implementation |
|
|
132
|
+
| `src/parse/` | SVN XML/text parsers |
|
|
133
|
+
| `src/tools/` | MCP tool families |
|
|
134
|
+
| `tests/` | Unit and temp-repository integration tests |
|
|
135
|
+
| `.svn-mcp-policy.json` | Repo-local guard exceptions for this MCP's intentional runtime payloads |
|
|
136
|
+
| `bin/` | Versioned Windows SVN and EOL converter runtime binaries |
|
|
137
|
+
| `THIRD_PARTY_NOTICES.md` | Notices for bundled binary payloads |
|
|
138
|
+
| `docs/` | Spec, local rules, and decisions |
|
|
139
|
+
| `releases/` | Generated versioned runtime release payloads, ignored by Git |
|
|
140
|
+
|
|
141
|
+
## Usage Model
|
|
142
|
+
|
|
143
|
+
Register one global MCP server and use explicit paths or per-call `cwd` values when working across SVN checkouts. The server does not assume a product name, project name, or fixed working copy.
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Security fixes target the latest released version on the default branch. Older releases may receive
|
|
6
|
+
fixes when the issue is severe and the patch is low risk.
|
|
7
|
+
|
|
8
|
+
## Reporting A Vulnerability
|
|
9
|
+
|
|
10
|
+
Please report suspected vulnerabilities through GitHub private vulnerability reporting or a private
|
|
11
|
+
security advisory for this repository. If private reporting is not enabled, open a minimal public
|
|
12
|
+
issue asking for a security contact without including exploit details.
|
|
13
|
+
|
|
14
|
+
Useful reports include:
|
|
15
|
+
|
|
16
|
+
- Affected version or commit
|
|
17
|
+
- Impact and attacker capabilities
|
|
18
|
+
- Reproduction steps or proof of concept
|
|
19
|
+
- Whether the issue affects read-only, mutating, or release-packaging behavior
|
|
20
|
+
|
|
21
|
+
Please do not publish exploit details until a fix or mitigation is available.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# SHA256 checksums for bundled third-party binaries
|
|
2
|
+
#
|
|
3
|
+
# Generated from the files under bin/ for release v1.0.0.
|
|
4
|
+
|
|
5
|
+
95bbe265f53f94d60a99bd5660bcdd97de96045cddf508ae43482f91bfdb4755 bin/dos2unix.exe
|
|
6
|
+
0f369ba0c0807a79216ad641a63c16b8f3d5ed1248d9db5a2447082f4cd984cd bin/engines/capi.dll
|
|
7
|
+
9139acb63399e18ab72fca074a622e8ace829fee8db8682bb4bca7b34e8b380a bin/libsvnjavahl-1.dll
|
|
8
|
+
95bbe265f53f94d60a99bd5660bcdd97de96045cddf508ae43482f91bfdb4755 bin/mac2unix.exe
|
|
9
|
+
b129bfd13bd5670df96bf0397d177efa9ad5b9fa91621c97c90004812414becb bin/SlikSvn-DB44-20-x64.dll
|
|
10
|
+
9cbfed910b3fb430eb4b61291789bde267f4d3092a2208802c2767a3aac63949 bin/SlikSvn-libapr-1.dll
|
|
11
|
+
2bd71134611e9272da9c1ff6092b2165985bd532d76bcc4ad505eb3c8b0951c3 bin/SlikSvn-libaprutil-1.dll
|
|
12
|
+
716e5f8c8d8137c011d00a1f6523889c196818397bc52eea14aa78e422eea1c3 bin/SlikSvn-libcrypto-3-x64.dll
|
|
13
|
+
0c4157d7baeba7f86f77fc328e8a691532e6a4ec36a36da51b2373e67653624c bin/SlikSvn-libintl.dll
|
|
14
|
+
6e4dbf1efbb79809b251b7c52969c884d610a9543ccd1f16781e7e58480ab510 bin/SlikSvn-libsasl21.dll
|
|
15
|
+
ab5efd7d65de64dcc6c4e2e95132b4121f172db9732896f3504579682884420a bin/SlikSvn-libssl-3-x64.dll
|
|
16
|
+
858250c5c29c55c65e07cccd9967352af0bc7c309b7395aee6c7f2a6e50d9de4 bin/SlikSvn-libsvn_client-1.dll
|
|
17
|
+
975effba24809ad1f147177185b0c9c63a40b1061470f4f7f834e55503a323fe bin/SlikSvn-libsvn_delta-1.dll
|
|
18
|
+
c54cedfb3f1eadd6041f33c4c3cfba02db6159eccfc78a5ce050a7fb16f37a8b bin/SlikSvn-libsvn_diff-1.dll
|
|
19
|
+
372ebba0d4d5accb10740a7fe9663e3c8665dc5259dbbc9728004996c0ebfb68 bin/SlikSvn-libsvn_fs_base-1.dll
|
|
20
|
+
5d8c506a7eb80cb213b7ecd3561ca95fb76744fb58909fa89495978ccda84a90 bin/SlikSvn-libsvn_fs_fs-1.dll
|
|
21
|
+
9d4d5a58c9bbc5e69e9fe01a2d8178d4bc4c9028175fce2686c869866705bae7 bin/SlikSvn-libsvn_fs_util-1.dll
|
|
22
|
+
48b75956165dbe942490cede7892dab6bb52670acee9027f44d4a899031668e9 bin/SlikSvn-libsvn_fs_x-1.dll
|
|
23
|
+
e634ee8a101ba346fb247a6372a991686a687061b87c09624d3992efec17ef77 bin/SlikSvn-libsvn_fs-1.dll
|
|
24
|
+
a9ffe2294a096e67b3d0d2efc4863620ad22fe85f531259105ca5c2a733af8da bin/SlikSvn-libsvn_ra-1.dll
|
|
25
|
+
58a5785830ded90a25dc5adb31762ac7517024e508849b7d8aa8b3e99fb2e02a bin/SlikSvn-libsvn_repos-1.dll
|
|
26
|
+
8110c65db3b6aedcd7493a20d0c738a1c3bfb53f14c184d06629228606a253b3 bin/SlikSvn-libsvn_subr-1.dll
|
|
27
|
+
2e06518de783feb649b58bc9c133f06ee44da36881e0d875f371ef4c800461ff bin/SlikSvn-libsvn_wc-1.dll
|
|
28
|
+
f38a7ca7b76928629041a384fddc0848adfa5afb8df1bb98b38a4202561790df bin/svn-populate-node-origins-index.exe
|
|
29
|
+
916151f9bb570efe36000cfab907c6737f83e7c82b915044b48b2d616dbe437a bin/svn.exe
|
|
30
|
+
4a3505693ebc84aaa873c13b78cdea450abf83ec6d4912987c043b925e43756b bin/svnadmin.exe
|
|
31
|
+
26c66fd3f576c158102df4039a67c9e7f07e6e2ff47a1a107a28a23efe943082 bin/svnauthz-validate.exe
|
|
32
|
+
385ed3e415755e2fb8e4950ced1f9e14d5970057b97e4bbcde15f3e11153c5b5 bin/svnauthz.exe
|
|
33
|
+
d3aecf83ec9fd28c05de7fcedd0570fda2ee7cce33fd0f060ee86cf2933f69db bin/svnbench.exe
|
|
34
|
+
c3142577dae6ee2fbb97a9bc0f0cc550574dc61960c5222d7a0567cd95a01fc8 bin/svndumpfilter.exe
|
|
35
|
+
1f23f8cb3b6b601edf1af6ad20923aa1ce3ee0b653e50083f250d2ce289eb663 bin/svnfsfs.exe
|
|
36
|
+
cbf19f684a206816bc7b51e01764b946ffcb4df6e54904c1dea8ff59b487faed bin/svnlook.exe
|
|
37
|
+
ee7564335c8400393e894d8eab697dcd85c53e96ac4cf4e14a2e85c2e1aa997e bin/svnmucc.exe
|
|
38
|
+
0500e301dbc811a230fa95a0680241595ebedb302f6c456adb03d6945c060244 bin/svnrdump.exe
|
|
39
|
+
19a6eefde4c0aa6634e17dc591f4b5d4e9e051831268a65fc78538e8455fc1e5 bin/svnserve.exe
|
|
40
|
+
414cd24d79f4b6a9c045e951af4376d9bc17d473efbf690daefa8977d58299db bin/svnsync.exe
|
|
41
|
+
1a17ddd90872494fafb37118c7e8a5bcd49d8198f763590c46ec2a7b73143c25 bin/svnversion.exe
|
|
42
|
+
50d513a4e954b157b773f3419ef736c41529e782c3dc5bf2894d3be905b25183 bin/System64/concrt140.dll
|
|
43
|
+
2c03cf78553689ca0523a3ef7c3161939b8f4a2fe246d9e90efa9cfef95c59a7 bin/System64/msvcp140_1.dll
|
|
44
|
+
b583a041271b247c61676396640e7e455388fda580d13a35c1cca592ee4c8080 bin/System64/msvcp140_2.dll
|
|
45
|
+
5d547fd143b5d399f9fe69fe759543e69a140e3a999aae3cde361e7912a0e5e4 bin/System64/msvcp140_atomic_wait.dll
|
|
46
|
+
e763bd3f595d7869190b799cdb23eff7951c6ed224492c40ff9d7b2f7f843050 bin/System64/msvcp140_codecvt_ids.dll
|
|
47
|
+
256492fbbcf3dc63987318f83e5f49eaacdbb6a9a5be54e403f0ddb437582881 bin/System64/msvcp140.dll
|
|
48
|
+
64cc19775dd40aee09ca8b35326a113892b0f251d3e7ea03b0ca7e3045464e60 bin/System64/vccorlib140.dll
|
|
49
|
+
0d719fbe25194e3faa037bd736e07ec9184ab68e521ebbd72c2b13aed89b47a9 bin/System64/vcruntime140_1.dll
|
|
50
|
+
c51c64dfb7c445ecf0001f69c27e13299ddcfba0780efa72b866a7487b7491c7 bin/System64/vcruntime140.dll
|
|
51
|
+
192e3735de62e8488a474b63087544879d8c37522a76c79fb717b250082137d6 bin/unix2dos.exe
|
|
52
|
+
192e3735de62e8488a474b63087544879d8c37522a76c79fb717b250082137d6 bin/unix2mac.exe
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
This project includes a bundled Windows runtime payload in `bin/` so MCP clients can run without
|
|
4
|
+
end-user SVN or EOL-converter installation. The project source is licensed under Apache-2.0; the
|
|
5
|
+
bundled third-party binaries remain under their upstream licenses.
|
|
6
|
+
|
|
7
|
+
## SlikSVN / Apache Subversion
|
|
8
|
+
|
|
9
|
+
- Files: `bin/svn*.exe`, `bin/svnauthz*.exe`, `bin/SlikSvn-*.dll`, `bin/libsvn*.dll`,
|
|
10
|
+
`bin/engines/**`, `bin/System64/**`
|
|
11
|
+
- Bundled version observed by `bin/svn.exe --version --quiet`: `1.14.5-SlikSvn`
|
|
12
|
+
- Upstream: https://sliksvn.com/ and https://subversion.apache.org/
|
|
13
|
+
- License: Apache License, Version 2.0
|
|
14
|
+
|
|
15
|
+
SlikSVN packages Apache Subversion command-line tools for Windows. Apache Subversion is an Apache
|
|
16
|
+
Software Foundation project licensed under Apache-2.0. Keep upstream license and notice obligations
|
|
17
|
+
in mind when redistributing the binary payload.
|
|
18
|
+
|
|
19
|
+
### OpenSSL runtime DLLs included by SlikSVN
|
|
20
|
+
|
|
21
|
+
- Files: `bin/SlikSvn-libssl-3-x64.dll`, `bin/SlikSvn-libcrypto-3-x64.dll`,
|
|
22
|
+
`bin/engines/capi.dll`
|
|
23
|
+
- Observed DLL product version: `3.0.16`
|
|
24
|
+
- Upstream: https://openssl-library.org/
|
|
25
|
+
- License: Apache License, Version 2.0
|
|
26
|
+
|
|
27
|
+
### Microsoft Visual C++ runtime support files included by SlikSVN
|
|
28
|
+
|
|
29
|
+
- Files: `bin/System64/*.dll`
|
|
30
|
+
- These files are copied unmodified from the SlikSVN Windows installer payload.
|
|
31
|
+
- Microsoft redistributable runtime license terms apply to these files.
|
|
32
|
+
|
|
33
|
+
## dos2unix / unix2dos
|
|
34
|
+
|
|
35
|
+
- Files: `bin/dos2unix.exe`, `bin/unix2dos.exe`, `bin/mac2unix.exe`, `bin/unix2mac.exe`,
|
|
36
|
+
as shipped by the upstream Windows 64-bit package
|
|
37
|
+
- Bundled version observed by `bin/dos2unix.exe --version`: `7.5.6`
|
|
38
|
+
- Upstream: https://dos2unix.sourceforge.io/ and https://waterlander.net/dos2unix/
|
|
39
|
+
- License: FreeBSD-style license, GPL-compatible
|
|
40
|
+
|
|
41
|
+
dos2unix is maintained by Erwin Waterlander. The upstream project publishes its distribution
|
|
42
|
+
license as `COPYING.txt`; consult the upstream source distribution for the complete text.
|
|
43
|
+
|
|
44
|
+
## Binary checksums
|
|
45
|
+
|
|
46
|
+
SHA256 checksums for the bundled files are recorded in `THIRD_PARTY_CHECKSUMS.txt`.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/dos2unix.exe
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/mac2unix.exe
ADDED
|
Binary file
|
|
Binary file
|
package/bin/svn.exe
ADDED
|
Binary file
|
package/bin/svnadmin.exe
ADDED
|
Binary file
|
|
Binary file
|
package/bin/svnauthz.exe
ADDED
|
Binary file
|
package/bin/svnbench.exe
ADDED
|
Binary file
|
|
Binary file
|
package/bin/svnfsfs.exe
ADDED
|
Binary file
|
package/bin/svnlook.exe
ADDED
|
Binary file
|
package/bin/svnmucc.exe
ADDED
|
Binary file
|
package/bin/svnrdump.exe
ADDED
|
Binary file
|
package/bin/svnserve.exe
ADDED
|
Binary file
|
package/bin/svnsync.exe
ADDED
|
Binary file
|
|
Binary file
|
package/bin/unix2dos.exe
ADDED
|
Binary file
|
package/bin/unix2mac.exe
ADDED
|
Binary file
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ChangedPath, Conflict, Envelope, RunResult } from "./types.js";
|
|
2
|
+
export declare function redactArgv(executable: string, args: string[]): string;
|
|
3
|
+
export declare function quoteArgForDisplay(arg: string): string;
|
|
4
|
+
export declare function redactText(value: string): string;
|
|
5
|
+
export declare function summarizeText(text: string, maxLines?: number): {
|
|
6
|
+
text: string;
|
|
7
|
+
truncated: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function createEnvelope(input: {
|
|
10
|
+
ok: boolean;
|
|
11
|
+
command: string;
|
|
12
|
+
cwd: string;
|
|
13
|
+
revision?: number | null | undefined;
|
|
14
|
+
changed_paths?: ChangedPath[] | undefined;
|
|
15
|
+
conflicts?: Conflict[] | undefined;
|
|
16
|
+
stdout?: string | undefined;
|
|
17
|
+
stderr?: string | undefined;
|
|
18
|
+
truncated?: boolean | undefined;
|
|
19
|
+
note?: string | undefined;
|
|
20
|
+
}): Envelope;
|
|
21
|
+
export declare function envelopeFromRun(input: {
|
|
22
|
+
ok?: boolean | undefined;
|
|
23
|
+
run: RunResult;
|
|
24
|
+
revision?: number | null | undefined;
|
|
25
|
+
changed_paths?: ChangedPath[] | undefined;
|
|
26
|
+
conflicts?: Conflict[] | undefined;
|
|
27
|
+
note?: string | undefined;
|
|
28
|
+
truncated?: boolean | undefined;
|
|
29
|
+
}): Envelope;
|
|
30
|
+
export declare function failEnvelope(command: string, cwd: string, note: string, extra?: Partial<Envelope>): Envelope;
|
|
31
|
+
export declare function noteFromRun(run: RunResult): string;
|
|
32
|
+
export declare function toToolResult<T extends Envelope>(payload: T): {
|
|
33
|
+
content: Array<{
|
|
34
|
+
type: "text";
|
|
35
|
+
text: string;
|
|
36
|
+
}>;
|
|
37
|
+
structuredContent: T;
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=envelope.d.ts.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AAG,IAAI,GAAG,SAAS,CAAC;IACrC,aAAa,CAAC,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC;IAC1C,SAAS,CAAC,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC,GAAG,QAAQ,CAaX;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAc5G;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAiClD;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,QAAQ,EAAE,OAAO,EAAE,CAAC,GAAG;IAC5D,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,iBAAiB,EAAE,CAAC,CAAC;CACtB,CAUA"}
|
package/dist/envelope.js
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
const DEFAULT_SUMMARY_LINES = 200;
|
|
2
|
+
export function redactArgv(executable, args) {
|
|
3
|
+
const redacted = [executable, ...args];
|
|
4
|
+
for (let index = 0; index < redacted.length; index += 1) {
|
|
5
|
+
const value = redacted[index] ?? "";
|
|
6
|
+
const arg = value.toLowerCase();
|
|
7
|
+
if ((arg === "--password" || arg === "--username") && index + 1 < redacted.length) {
|
|
8
|
+
redacted[index + 1] = "***";
|
|
9
|
+
continue;
|
|
10
|
+
}
|
|
11
|
+
if (arg.startsWith("--password=") || arg.startsWith("--username=")) {
|
|
12
|
+
const equalsIndex = value.indexOf("=");
|
|
13
|
+
redacted[index] = `${value.slice(0, equalsIndex)}=***`;
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
redacted[index] = redactText(redacted[index] ?? "");
|
|
17
|
+
}
|
|
18
|
+
return redacted.map(quoteArgForDisplay).join(" ");
|
|
19
|
+
}
|
|
20
|
+
export function quoteArgForDisplay(arg) {
|
|
21
|
+
if (arg.length === 0) {
|
|
22
|
+
return '""';
|
|
23
|
+
}
|
|
24
|
+
if (/[\s"]/.test(arg)) {
|
|
25
|
+
return `"${arg.replace(/"/g, '\\"')}"`;
|
|
26
|
+
}
|
|
27
|
+
return arg;
|
|
28
|
+
}
|
|
29
|
+
export function redactText(value) {
|
|
30
|
+
const withSafeUrl = redactUrlUserinfo(value);
|
|
31
|
+
return withSafeUrl.replace(/([?&](?:access_token|api[_-]?key|auth|key|pass(?:word)?|secret|token)=)[^&#\s]*/gi, "$1***");
|
|
32
|
+
}
|
|
33
|
+
function redactUrlUserinfo(value) {
|
|
34
|
+
return value.replace(/([a-z][a-z0-9+.-]*:\/\/)(?:[^\s/?#]*@)+/gi, "$1***:***@");
|
|
35
|
+
}
|
|
36
|
+
export function summarizeText(text, maxLines = DEFAULT_SUMMARY_LINES) {
|
|
37
|
+
if (!text) {
|
|
38
|
+
return { text: "", truncated: false };
|
|
39
|
+
}
|
|
40
|
+
const normalized = text.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
41
|
+
const lines = normalized.split("\n");
|
|
42
|
+
if (lines.length <= maxLines) {
|
|
43
|
+
return { text: normalized, truncated: false };
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
text: lines.slice(0, maxLines).join("\n"),
|
|
47
|
+
truncated: true
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export function createEnvelope(input) {
|
|
51
|
+
const stdout = summarizeText(redactText(input.stdout ?? ""));
|
|
52
|
+
const stderr = summarizeText(redactText(input.stderr ?? ""));
|
|
53
|
+
return {
|
|
54
|
+
ok: input.ok,
|
|
55
|
+
command: input.command,
|
|
56
|
+
cwd: input.cwd,
|
|
57
|
+
revision: input.revision ?? null,
|
|
58
|
+
changed_paths: input.changed_paths ?? [],
|
|
59
|
+
conflicts: input.conflicts ?? [],
|
|
60
|
+
stdout_summary: stdout.text,
|
|
61
|
+
stderr_summary: stderr.text,
|
|
62
|
+
truncated: Boolean(input.truncated || stdout.truncated || stderr.truncated),
|
|
63
|
+
note: input.note ?? ""
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export function envelopeFromRun(input) {
|
|
67
|
+
return createEnvelope({
|
|
68
|
+
ok: input.ok ?? input.run.exitCode === 0,
|
|
69
|
+
command: input.run.command,
|
|
70
|
+
cwd: input.run.cwd,
|
|
71
|
+
revision: input.revision ?? null,
|
|
72
|
+
changed_paths: input.changed_paths,
|
|
73
|
+
conflicts: input.conflicts,
|
|
74
|
+
stdout: input.run.stdout,
|
|
75
|
+
stderr: input.run.stderr,
|
|
76
|
+
truncated: input.truncated ?? input.run.truncated,
|
|
77
|
+
note: input.note ?? noteFromRun(input.run)
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
export function failEnvelope(command, cwd, note, extra) {
|
|
81
|
+
return {
|
|
82
|
+
...createEnvelope({
|
|
83
|
+
ok: false,
|
|
84
|
+
command,
|
|
85
|
+
cwd,
|
|
86
|
+
note
|
|
87
|
+
}),
|
|
88
|
+
...extra,
|
|
89
|
+
ok: false,
|
|
90
|
+
command,
|
|
91
|
+
cwd,
|
|
92
|
+
note
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export function noteFromRun(run) {
|
|
96
|
+
if (run.timedOut) {
|
|
97
|
+
return "svn timed out";
|
|
98
|
+
}
|
|
99
|
+
if (run.errorCode === "ENOENT" || run.errorCode === "EACCES" || run.errorCode === "EPERM") {
|
|
100
|
+
return "MCP svn runtime unavailable (executable failed to launch) - failsafe: use scoped raw svn CLI for this session per svnrules; guard refusals are not failures and must never be bypassed via CLI";
|
|
101
|
+
}
|
|
102
|
+
const text = `${run.stderr}\n${run.stdout}`;
|
|
103
|
+
if (/E155004|E155036/.test(text)) {
|
|
104
|
+
return "working copy locked - run svn_cleanup";
|
|
105
|
+
}
|
|
106
|
+
if (/E215004|No more credentials|we tried too many times|E170001|authorization failed|Authentication failed/i.test(text)) {
|
|
107
|
+
return "authentication failed - fix svn cached auth outside the MCP";
|
|
108
|
+
}
|
|
109
|
+
if (/E175002|Unable to connect|Connection refused|Network is unreachable|Could not resolve hostname/i.test(text)) {
|
|
110
|
+
return "network or repository connection failed";
|
|
111
|
+
}
|
|
112
|
+
if (/E155007/.test(text)) {
|
|
113
|
+
return "path is not inside a working copy";
|
|
114
|
+
}
|
|
115
|
+
if (/E135000|inconsistent newlines|inconsistent line ending style/i.test(text)) {
|
|
116
|
+
return "inconsistent line endings - run eol_fix_verified on affected files";
|
|
117
|
+
}
|
|
118
|
+
if (/E200009|is not a working copy|unversioned/i.test(text)) {
|
|
119
|
+
return "target not versioned";
|
|
120
|
+
}
|
|
121
|
+
if (/E200030|sqlite|database is locked|database disk image is malformed/i.test(text)) {
|
|
122
|
+
return "working copy database problem - run svn_cleanup";
|
|
123
|
+
}
|
|
124
|
+
return run.exitCode === 0 ? "" : "svn command failed";
|
|
125
|
+
}
|
|
126
|
+
export function toToolResult(payload) {
|
|
127
|
+
return {
|
|
128
|
+
content: [
|
|
129
|
+
{
|
|
130
|
+
type: "text",
|
|
131
|
+
text: JSON.stringify(payload, null, 2)
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
structuredContent: payload
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=envelope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envelope.js","sourceRoot":"","sources":["../src/envelope.ts"],"names":[],"mappings":"AAEA,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAElC,MAAM,UAAU,UAAU,CAAC,UAAkB,EAAE,IAAc;IAC3D,MAAM,QAAQ,GAAG,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,CAAC;IACvC,KAAK,IAAI,KAAK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AAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,oBAAoB,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,YAAY,CAAqB,OAAU;IAIzD,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;aACvC;SACF;QACD,iBAAiB,EAAE,OAAO;KAC3B,CAAC;AACJ,CAAC"}
|
package/dist/eol.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { EolCheckResult, EolKind, EolSniff, RunResult } from "./types.js";
|
|
2
|
+
export declare function sniffEol(filePath: string, limitBytes?: number): Promise<EolSniff>;
|
|
3
|
+
export declare function makeEolCheck(filePath: string, eolStyle: string | null): Promise<EolCheckResult>;
|
|
4
|
+
export declare function convertEol(input: {
|
|
5
|
+
filePath: string;
|
|
6
|
+
target: "crlf" | "lf";
|
|
7
|
+
removeBom: boolean;
|
|
8
|
+
cwd: string;
|
|
9
|
+
}): Promise<RunResult>;
|
|
10
|
+
export declare function normalizeEolTarget(value: "crlf" | "lf" | undefined, eolStyle?: string | null): "crlf" | "lf";
|
|
11
|
+
export declare function converterForEolTarget(target: "crlf" | "lf"): "unix2dos" | "dos2unix";
|
|
12
|
+
export declare function expectedEolKind(eolStyle?: string | null): "crlf" | "lf" | null;
|
|
13
|
+
export declare function isBinaryKind(kind: EolKind): boolean;
|
|
14
|
+
export declare function displayPath(filePath: string, cwd: string): string;
|
|
15
|
+
//# sourceMappingURL=eol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eol.d.ts","sourceRoot":"","sources":["../src/eol.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAK/E,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,SAAoB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAwClG;AAED,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC,CASrG;AAED,wBAAsB,UAAU,CAAC,KAAK,EAAE;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACb,GAAG,OAAO,CAAC,SAAS,CAAC,CAIrB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAE5G;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,UAAU,GAAG,UAAU,CAEpF;AAED,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAe9E;AAMD,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAEnD;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAGjE"}
|