@mycompbox/compbox-mcp 1.15.0 → 1.17.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/index.js +57 -1
- 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"() {
|
|
@@ -127,6 +156,27 @@ var init_attachment = __esm({
|
|
|
127
156
|
}
|
|
128
157
|
});
|
|
129
158
|
|
|
159
|
+
// ../shared/dist/types/organization.js
|
|
160
|
+
function isSubscriptionStatus(value) {
|
|
161
|
+
return typeof value === "string" && SUBSCRIPTION_STATUSES.includes(value);
|
|
162
|
+
}
|
|
163
|
+
function isOrgRole(value) {
|
|
164
|
+
return typeof value === "string" && ORG_ROLES.includes(value);
|
|
165
|
+
}
|
|
166
|
+
var SUBSCRIPTION_STATUSES, ORG_ROLES;
|
|
167
|
+
var init_organization = __esm({
|
|
168
|
+
"../shared/dist/types/organization.js"() {
|
|
169
|
+
"use strict";
|
|
170
|
+
SUBSCRIPTION_STATUSES = [
|
|
171
|
+
"incomplete",
|
|
172
|
+
"active",
|
|
173
|
+
"past_due",
|
|
174
|
+
"canceled"
|
|
175
|
+
];
|
|
176
|
+
ORG_ROLES = ["member", "admin"];
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
|
|
130
180
|
// ../shared/dist/types/index.js
|
|
131
181
|
var init_types = __esm({
|
|
132
182
|
"../shared/dist/types/index.js"() {
|
|
@@ -138,6 +188,7 @@ var init_types = __esm({
|
|
|
138
188
|
init_mailbox();
|
|
139
189
|
init_interview();
|
|
140
190
|
init_attachment();
|
|
191
|
+
init_organization();
|
|
141
192
|
}
|
|
142
193
|
});
|
|
143
194
|
|
|
@@ -592,8 +643,10 @@ __export(dist_exports, {
|
|
|
592
643
|
JOB_TYPES: () => JOB_TYPES,
|
|
593
644
|
MACHINE_STATUSES: () => MACHINE_STATUSES,
|
|
594
645
|
MODEL_CATALOG: () => MODEL_CATALOG,
|
|
646
|
+
ORG_ROLES: () => ORG_ROLES,
|
|
595
647
|
PXPIPE_DEFAULT_PROXY_URL: () => PXPIPE_DEFAULT_PROXY_URL,
|
|
596
648
|
START_EXECUTION_KINDS: () => START_EXECUTION_KINDS,
|
|
649
|
+
SUBSCRIPTION_STATUSES: () => SUBSCRIPTION_STATUSES,
|
|
597
650
|
SUMMARY_MAX: () => SUMMARY_MAX,
|
|
598
651
|
SessionEventType: () => SessionEventType,
|
|
599
652
|
TURN_ROLES: () => TURN_ROLES,
|
|
@@ -611,6 +664,7 @@ __export(dist_exports, {
|
|
|
611
664
|
isJobStatus: () => isJobStatus,
|
|
612
665
|
isJobType: () => isJobType,
|
|
613
666
|
isMachineStatus: () => isMachineStatus,
|
|
667
|
+
isOrgRole: () => isOrgRole,
|
|
614
668
|
isPxpipeEnabled: () => isPxpipeEnabled,
|
|
615
669
|
isSessionErrorEvent: () => isSessionErrorEvent,
|
|
616
670
|
isSessionFeatureEvent: () => isSessionFeatureEvent,
|
|
@@ -618,11 +672,13 @@ __export(dist_exports, {
|
|
|
618
672
|
isSessionPhaseEvent: () => isSessionPhaseEvent,
|
|
619
673
|
isSessionTaskEvent: () => isSessionTaskEvent,
|
|
620
674
|
isSessionTaskProgressEvent: () => isSessionTaskProgressEvent,
|
|
675
|
+
isSubscriptionStatus: () => isSubscriptionStatus,
|
|
621
676
|
isTurnRole: () => isTurnRole,
|
|
622
677
|
isValidModelId: () => isValidModelId,
|
|
623
678
|
mcpConfigSchema: () => mcpConfigSchema,
|
|
624
679
|
mcpServerConfigSchema: () => mcpServerConfigSchema,
|
|
625
680
|
modelRecommendationSourceValues: () => modelRecommendationSourceValues,
|
|
681
|
+
normalizeGitRemote: () => normalizeGitRemote,
|
|
626
682
|
ok: () => ok,
|
|
627
683
|
probeProxyHealth: () => probeProxyHealth,
|
|
628
684
|
resolveRouting: () => resolveRouting,
|
|
@@ -10776,7 +10832,7 @@ function withLegacyToolCallRewrite(transport) {
|
|
|
10776
10832
|
var SERVER_NAME = "compbox-mcp";
|
|
10777
10833
|
function resolveServerVersion() {
|
|
10778
10834
|
if (true) {
|
|
10779
|
-
return "1.
|
|
10835
|
+
return "1.17.0";
|
|
10780
10836
|
}
|
|
10781
10837
|
const require2 = createRequire(import.meta.url);
|
|
10782
10838
|
for (const candidate of ["../package.json", "./package.json"]) {
|