@moor-sh/mcp 0.21.0 → 0.22.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/package.json +1 -1
- package/src/index.ts +30 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1174,6 +1174,15 @@ server.registerTool(
|
|
|
1174
1174
|
.describe(
|
|
1175
1175
|
"Named Docker volumes to attach. Each entry creates a per-project volume (stored as moor-<project>-<name>) and mounts it at the given target on next container recreate. Data survives container/project rebuilds unless explicitly purged via project delete with purge_volumes=true.",
|
|
1176
1176
|
),
|
|
1177
|
+
source_credential_id: z
|
|
1178
|
+
.number()
|
|
1179
|
+
.int()
|
|
1180
|
+
.positive()
|
|
1181
|
+
.nullable()
|
|
1182
|
+
.optional()
|
|
1183
|
+
.describe(
|
|
1184
|
+
"For github_url projects: pin the source credential row (from moor_source_credential_add) the build path should use. Build synthesizes the credentialed clone URL in memory; the secret is never stored on the project. Ignored when docker_image is set; save-time validation is structural only (id exists).",
|
|
1185
|
+
),
|
|
1177
1186
|
}),
|
|
1178
1187
|
},
|
|
1179
1188
|
async (input) => {
|
|
@@ -1254,6 +1263,15 @@ server.registerTool(
|
|
|
1254
1263
|
.describe(
|
|
1255
1264
|
"Max CPU cores (fractional OK; min 0.001). Pass null to clear. Max host core count. Takes effect on container recreate.",
|
|
1256
1265
|
),
|
|
1266
|
+
source_credential_id: z
|
|
1267
|
+
.number()
|
|
1268
|
+
.int()
|
|
1269
|
+
.positive()
|
|
1270
|
+
.nullable()
|
|
1271
|
+
.optional()
|
|
1272
|
+
.describe(
|
|
1273
|
+
"Pin (or unlink, by passing null) the source credential the build path should use for this github_url project. Switching to docker_image force-clears the id regardless of input. Save-time validation is structural only; host-mismatch / not-active is enforced at build time.",
|
|
1274
|
+
),
|
|
1257
1275
|
}),
|
|
1258
1276
|
},
|
|
1259
1277
|
async (input) => {
|
|
@@ -1879,6 +1897,15 @@ server.registerTool(
|
|
|
1879
1897
|
.describe(
|
|
1880
1898
|
"Env vars to MERGE into existing project envs. Omit to leave envs untouched. Pass {} for an explicit no-op. Use moor_env_delete to remove keys.",
|
|
1881
1899
|
),
|
|
1900
|
+
source_credential_id: z
|
|
1901
|
+
.number()
|
|
1902
|
+
.int()
|
|
1903
|
+
.positive()
|
|
1904
|
+
.nullable()
|
|
1905
|
+
.optional()
|
|
1906
|
+
.describe(
|
|
1907
|
+
"For github_url projects: pin the source credential row (created via moor_source_credential_add). Build path synthesizes the credentialed clone URL in memory; secret never gets stored on the project row. Pass null to detach without switching source type. Ignored when docker_image is set. Save-time validation is structural only (id exists); host-mismatch / not-active is enforced at build time so configuration can survive transient credential outages.",
|
|
1908
|
+
),
|
|
1882
1909
|
run: z
|
|
1883
1910
|
.boolean()
|
|
1884
1911
|
.optional()
|
|
@@ -1978,6 +2005,7 @@ server.registerTool(
|
|
|
1978
2005
|
restart_policy: input.restart_policy,
|
|
1979
2006
|
memory_limit_mb: input.memory_limit_mb,
|
|
1980
2007
|
cpus: input.cpus,
|
|
2008
|
+
source_credential_id: input.source_credential_id,
|
|
1981
2009
|
};
|
|
1982
2010
|
const res = await apiPost("/api/projects", createBody);
|
|
1983
2011
|
if (!res.ok) throw new Error(`[create] ${await res.text()}`);
|
|
@@ -1997,6 +2025,8 @@ server.registerTool(
|
|
|
1997
2025
|
if (input.restart_policy !== undefined) updateBody.restart_policy = input.restart_policy;
|
|
1998
2026
|
if (input.memory_limit_mb !== undefined) updateBody.memory_limit_mb = input.memory_limit_mb;
|
|
1999
2027
|
if (input.cpus !== undefined) updateBody.cpus = input.cpus;
|
|
2028
|
+
if (input.source_credential_id !== undefined)
|
|
2029
|
+
updateBody.source_credential_id = input.source_credential_id;
|
|
2000
2030
|
|
|
2001
2031
|
if (Object.keys(updateBody).length > 0) {
|
|
2002
2032
|
const res = await apiPut(`/api/projects/${existing.id}`, updateBody);
|