@access-mcp/shared 0.3.3 → 0.6.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.
@@ -75,7 +75,7 @@ export const FIELDS_OF_SCIENCE = {
75
75
  typical: 300000,
76
76
  },
77
77
  },
78
- "Physics": {
78
+ Physics: {
79
79
  name: "Physics",
80
80
  description: "Research in high energy physics, astrophysics, condensed matter, and computational physics",
81
81
  keywords: [
@@ -106,7 +106,7 @@ export const FIELDS_OF_SCIENCE = {
106
106
  typical: 500000,
107
107
  },
108
108
  },
109
- "Chemistry": {
109
+ Chemistry: {
110
110
  name: "Chemistry",
111
111
  description: "Research in computational chemistry, molecular modeling, and materials science",
112
112
  keywords: [
@@ -120,23 +120,14 @@ export const FIELDS_OF_SCIENCE = {
120
120
  "ab initio",
121
121
  ],
122
122
  typical_resources: ["CPU clusters", "high memory", "GPU acceleration", "fast storage"],
123
- common_software: [
124
- "Gaussian",
125
- "GAMESS",
126
- "NWChem",
127
- "ORCA",
128
- "AMBER",
129
- "NAMD",
130
- "LAMMPS",
131
- "VMD",
132
- ],
123
+ common_software: ["Gaussian", "GAMESS", "NWChem", "ORCA", "AMBER", "NAMD", "LAMMPS", "VMD"],
133
124
  allocation_range: {
134
125
  min: 75000,
135
126
  max: 1000000,
136
127
  typical: 300000,
137
128
  },
138
129
  },
139
- "Engineering": {
130
+ Engineering: {
140
131
  name: "Engineering",
141
132
  description: "Research in computational engineering, CFD, structural analysis, and design optimization",
142
133
  keywords: [
@@ -151,15 +142,7 @@ export const FIELDS_OF_SCIENCE = {
151
142
  "aerospace",
152
143
  ],
153
144
  typical_resources: ["CPU clusters", "high memory", "GPU for visualization", "parallel I/O"],
154
- common_software: [
155
- "ANSYS",
156
- "OpenFOAM",
157
- "COMSOL",
158
- "ABAQUS",
159
- "LS-DYNA",
160
- "SU2",
161
- "ParaView",
162
- ],
145
+ common_software: ["ANSYS", "OpenFOAM", "COMSOL", "ABAQUS", "LS-DYNA", "SU2", "ParaView"],
163
146
  allocation_range: {
164
147
  min: 100000,
165
148
  max: 1500000,
@@ -180,16 +163,7 @@ export const FIELDS_OF_SCIENCE = {
180
163
  "environmental science",
181
164
  ],
182
165
  typical_resources: ["large storage", "CPU clusters", "high I/O", "data analytics"],
183
- common_software: [
184
- "WRF",
185
- "CESM",
186
- "NCAR",
187
- "netCDF",
188
- "GDAL",
189
- "Python",
190
- "R",
191
- "MATLAB",
192
- ],
166
+ common_software: ["WRF", "CESM", "NCAR", "netCDF", "GDAL", "Python", "R", "MATLAB"],
193
167
  allocation_range: {
194
168
  min: 150000,
195
169
  max: 2000000,
@@ -210,16 +184,7 @@ export const FIELDS_OF_SCIENCE = {
210
184
  "computational mathematics",
211
185
  ],
212
186
  typical_resources: ["CPU clusters", "high memory", "GPU for linear algebra"],
213
- common_software: [
214
- "MATLAB",
215
- "R",
216
- "Python",
217
- "Julia",
218
- "Mathematica",
219
- "SAS",
220
- "SPSS",
221
- "Octave",
222
- ],
187
+ common_software: ["MATLAB", "R", "Python", "Julia", "Mathematica", "SAS", "SPSS", "Octave"],
223
188
  allocation_range: {
224
189
  min: 50000,
225
190
  max: 500000,
@@ -239,15 +204,7 @@ export const FIELDS_OF_SCIENCE = {
239
204
  "survey analysis",
240
205
  ],
241
206
  typical_resources: ["data analytics", "storage", "CPU clusters for simulations"],
242
- common_software: [
243
- "R",
244
- "Python",
245
- "Stata",
246
- "SPSS",
247
- "NetLogo",
248
- "Gephi",
249
- "Julia",
250
- ],
207
+ common_software: ["R", "Python", "Stata", "SPSS", "NetLogo", "Gephi", "Julia"],
251
208
  allocation_range: {
252
209
  min: 25000,
253
210
  max: 300000,
@@ -268,16 +225,7 @@ export const FIELDS_OF_SCIENCE = {
268
225
  "simulation",
269
226
  ],
270
227
  typical_resources: ["large storage", "CPU clusters", "GPU for visualization", "data pipelines"],
271
- common_software: [
272
- "Gadget",
273
- "FLASH",
274
- "Enzo",
275
- "Athena",
276
- "IRAF",
277
- "DS9",
278
- "Python",
279
- "astropy",
280
- ],
228
+ common_software: ["Gadget", "FLASH", "Enzo", "Athena", "IRAF", "DS9", "Python", "astropy"],
281
229
  allocation_range: {
282
230
  min: 150000,
283
231
  max: 2500000,
@@ -365,12 +313,7 @@ export const RESOURCE_TYPES = {
365
313
  "Data processing",
366
314
  "Simulations",
367
315
  ],
368
- key_features: [
369
- "High core counts",
370
- "Good memory bandwidth",
371
- "MPI support",
372
- "Long-running jobs",
373
- ],
316
+ key_features: ["High core counts", "Good memory bandwidth", "MPI support", "Long-running jobs"],
374
317
  },
375
318
  GPU: {
376
319
  name: "GPU Accelerated",
@@ -382,12 +325,7 @@ export const RESOURCE_TYPES = {
382
325
  "Image processing",
383
326
  "CFD simulations",
384
327
  ],
385
- key_features: [
386
- "CUDA/ROCm support",
387
- "High memory bandwidth",
388
- "Tensor cores",
389
- "Fast training",
390
- ],
328
+ key_features: ["CUDA/ROCm support", "High memory bandwidth", "Tensor cores", "Fast training"],
391
329
  },
392
330
  "High Memory": {
393
331
  name: "High Memory Systems",
@@ -398,11 +336,7 @@ export const RESOURCE_TYPES = {
398
336
  "In-memory databases",
399
337
  "Large-scale graph analysis",
400
338
  ],
401
- key_features: [
402
- "1TB+ memory per node",
403
- "Fast memory access",
404
- "Large working sets",
405
- ],
339
+ key_features: ["1TB+ memory per node", "Fast memory access", "Large working sets"],
406
340
  },
407
341
  Storage: {
408
342
  name: "Storage Resources",
@@ -430,12 +364,7 @@ export const RESOURCE_TYPES = {
430
364
  "Interactive computing",
431
365
  "Elastic workloads",
432
366
  ],
433
- key_features: [
434
- "On-demand resources",
435
- "Virtual machines",
436
- "Container support",
437
- "API access",
438
- ],
367
+ key_features: ["On-demand resources", "Virtual machines", "Container support", "API access"],
439
368
  },
440
369
  };
441
370
  /**
@@ -525,10 +454,10 @@ export function getFeatureName(featureCode) {
525
454
  * Get feature names for an array of codes
526
455
  */
527
456
  export function getFeatureNames(featureCodes) {
528
- return featureCodes.map(code => getFeatureName(code));
457
+ return featureCodes.map((code) => getFeatureName(code));
529
458
  }
530
459
  export const ACCESS_SYSTEMS = {
531
- "Delta": {
460
+ Delta: {
532
461
  name: "Delta",
533
462
  organization: "NCSA (University of Illinois)",
534
463
  description: "GPU-focused system with NVIDIA A100 and A40 GPUs",
@@ -562,7 +491,7 @@ export const ACCESS_SYSTEMS = {
562
491
  ],
563
492
  experience_level: ["Beginner", "Intermediate", "Advanced"],
564
493
  },
565
- "Anvil": {
494
+ Anvil: {
566
495
  name: "Anvil",
567
496
  organization: "Purdue University",
568
497
  description: "Composable subsystem architecture with flexible resource allocation",
@@ -578,7 +507,7 @@ export const ACCESS_SYSTEMS = {
578
507
  ],
579
508
  experience_level: ["Beginner", "Intermediate", "Advanced"],
580
509
  },
581
- "Expanse": {
510
+ Expanse: {
582
511
  name: "Expanse",
583
512
  organization: "SDSC (San Diego Supercomputing Center)",
584
513
  description: "Balanced CPU and GPU computing with excellent storage",
@@ -595,7 +524,7 @@ export const ACCESS_SYSTEMS = {
595
524
  ],
596
525
  experience_level: ["Intermediate", "Advanced"],
597
526
  },
598
- "Stampede3": {
527
+ Stampede3: {
599
528
  name: "Stampede3",
600
529
  organization: "TACC (Texas Advanced Computing Center)",
601
530
  description: "Leadership-class supercomputer with NVIDIA Grace-Hopper",
@@ -611,7 +540,7 @@ export const ACCESS_SYSTEMS = {
611
540
  ],
612
541
  experience_level: ["Advanced", "Expert"],
613
542
  },
614
- "Jetstream2": {
543
+ Jetstream2: {
615
544
  name: "Jetstream2",
616
545
  organization: "Indiana University",
617
546
  description: "Cloud computing platform for interactive science and gateways",
package/dist/utils.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export declare function sanitizeGroupId(groupId: string): string;
2
2
  export declare function formatApiUrl(version: string, endpoint: string): string;
3
- export declare function handleApiError(error: any): string;
3
+ export declare function handleApiError(error: unknown): string;
4
4
  /**
5
5
  * LLM-Friendly Response Utilities
6
6
  *
@@ -11,15 +11,15 @@ export interface NextStep {
11
11
  action: string;
12
12
  description: string;
13
13
  tool?: string;
14
- parameters?: Record<string, any>;
14
+ parameters?: Record<string, unknown>;
15
15
  }
16
- export interface LLMResponse<T = any> {
16
+ export interface LLMResponse<T = unknown> {
17
17
  data?: T;
18
18
  count?: number;
19
19
  next_steps?: NextStep[];
20
20
  suggestions?: string[];
21
21
  related_tools?: string[];
22
- context?: Record<string, any>;
22
+ context?: Record<string, unknown>;
23
23
  }
24
24
  export interface LLMError {
25
25
  error: string;
package/dist/utils.js CHANGED
@@ -8,13 +8,17 @@ export function formatApiUrl(version, endpoint) {
8
8
  return `/${version}/${endpoint}`;
9
9
  }
10
10
  export function handleApiError(error) {
11
- if (error.response?.data?.message) {
12
- return error.response.data.message;
11
+ const axiosError = error;
12
+ if (axiosError.response?.data?.message) {
13
+ return axiosError.response.data.message;
13
14
  }
14
- if (error.response?.status) {
15
- return `API error: ${error.response.status} ${error.response.statusText}`;
15
+ if (axiosError.response?.status) {
16
+ return `API error: ${axiosError.response.status} ${axiosError.response.statusText}`;
16
17
  }
17
- return error.message || "Unknown API error";
18
+ if (error instanceof Error) {
19
+ return error.message;
20
+ }
21
+ return "Unknown API error";
18
22
  }
19
23
  /**
20
24
  * Add helpful next steps to a successful response
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@access-mcp/shared",
3
- "version": "0.3.3",
3
+ "version": "0.6.0",
4
4
  "description": "Shared utilities for ACCESS-CI MCP servers",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",