@mycompbox/compbox-mcp 1.15.0 → 1.16.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.
Files changed (2) hide show
  1. package/index.js +31 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -81,6 +81,35 @@ function isJobStatus(value) {
81
81
  function isTurnRole(value) {
82
82
  return TURN_ROLES.includes(value);
83
83
  }
84
+ function normalizeGitRemote(raw) {
85
+ const input = (raw ?? "").trim();
86
+ if (input === "")
87
+ return "";
88
+ let host = "";
89
+ let path4 = "";
90
+ const hasScheme = /^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(input);
91
+ if (hasScheme) {
92
+ let url;
93
+ try {
94
+ url = new URL(input);
95
+ } catch {
96
+ return input;
97
+ }
98
+ host = url.hostname.toLowerCase();
99
+ path4 = url.pathname;
100
+ } else {
101
+ const scp = /^(?:[^@]+@)?([^:]+):(.*)$/.exec(input);
102
+ const scpHost = scp?.[1];
103
+ const scpPath = scp?.[2];
104
+ if (scpHost === void 0 || scpPath === void 0) {
105
+ return input.replace(/\/+$/, "").replace(/\.git$/, "");
106
+ }
107
+ host = scpHost.toLowerCase();
108
+ path4 = scpPath;
109
+ }
110
+ path4 = path4.replace(/^\/+/, "").replace(/\/+$/, "").replace(/\.git$/, "");
111
+ return `https://${host}/${path4}`;
112
+ }
84
113
  var MACHINE_STATUSES, JOB_TYPES, JOB_STATUSES, TURN_ROLES, START_EXECUTION_KINDS;
85
114
  var init_mailbox = __esm({
86
115
  "../shared/dist/types/mailbox.js"() {
@@ -623,6 +652,7 @@ __export(dist_exports, {
623
652
  mcpConfigSchema: () => mcpConfigSchema,
624
653
  mcpServerConfigSchema: () => mcpServerConfigSchema,
625
654
  modelRecommendationSourceValues: () => modelRecommendationSourceValues,
655
+ normalizeGitRemote: () => normalizeGitRemote,
626
656
  ok: () => ok,
627
657
  probeProxyHealth: () => probeProxyHealth,
628
658
  resolveRouting: () => resolveRouting,
@@ -10776,7 +10806,7 @@ function withLegacyToolCallRewrite(transport) {
10776
10806
  var SERVER_NAME = "compbox-mcp";
10777
10807
  function resolveServerVersion() {
10778
10808
  if (true) {
10779
- return "1.15.0";
10809
+ return "1.16.0";
10780
10810
  }
10781
10811
  const require2 = createRequire(import.meta.url);
10782
10812
  for (const candidate of ["../package.json", "./package.json"]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycompbox/compbox-mcp",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "CompBox MCP server - Uses HTTP API client (no direct database access)",
5
5
  "license": "MIT",
6
6
  "type": "module",