antpath 0.4.1 → 0.4.2
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.
|
@@ -291,6 +291,13 @@ export function parseMcpServerRef(input, path) {
|
|
|
291
291
|
if (parsed.protocol !== "https:" && parsed.protocol !== "http:") {
|
|
292
292
|
throw new Error(`${path}.url must use http or https (got ${parsed.protocol})`);
|
|
293
293
|
}
|
|
294
|
+
// Auth belongs in `secrets.mcpServers[i].headers`, never in the URL
|
|
295
|
+
// itself. A `https://user:pass@host` style URL would be persisted in
|
|
296
|
+
// the non-secret run snapshot and hashed into the idempotency key —
|
|
297
|
+
// both unacceptable for credential material.
|
|
298
|
+
if (parsed.username !== "" || parsed.password !== "") {
|
|
299
|
+
throw new Error(`${path}.url must not contain userinfo (username/password); use secrets.mcpServers[].headers for auth`);
|
|
300
|
+
}
|
|
294
301
|
}
|
|
295
302
|
catch (cause) {
|
|
296
303
|
if (cause instanceof Error && cause.message.startsWith(path)) {
|
|
@@ -793,7 +793,25 @@ function parseFlatSkills(input) {
|
|
|
793
793
|
if (!Array.isArray(input)) {
|
|
794
794
|
throw new Error("submission.skills must be an array of SkillRef objects");
|
|
795
795
|
}
|
|
796
|
-
|
|
796
|
+
const seenWorkspace = new Set();
|
|
797
|
+
const seenProvider = new Set();
|
|
798
|
+
return input.map((item, index) => {
|
|
799
|
+
const ref = parseSkillRef(item, `submission.skills[${index}]`);
|
|
800
|
+
if (ref.kind === "workspace") {
|
|
801
|
+
if (seenWorkspace.has(ref.id)) {
|
|
802
|
+
throw new Error(`submission.skills duplicate workspace skill id: ${ref.id}`);
|
|
803
|
+
}
|
|
804
|
+
seenWorkspace.add(ref.id);
|
|
805
|
+
}
|
|
806
|
+
else {
|
|
807
|
+
const key = `${ref.vendor}:${ref.skillId}:${ref.version ?? ""}`;
|
|
808
|
+
if (seenProvider.has(key)) {
|
|
809
|
+
throw new Error(`submission.skills duplicate provider skill: ${ref.vendor}:${ref.skillId}${ref.version ? `:${ref.version}` : ""}`);
|
|
810
|
+
}
|
|
811
|
+
seenProvider.add(key);
|
|
812
|
+
}
|
|
813
|
+
return ref;
|
|
814
|
+
});
|
|
797
815
|
}
|
|
798
816
|
function parseFlatMcpServers(input) {
|
|
799
817
|
if (input === undefined) {
|