@access-mcp/shared 0.3.1 → 0.3.3
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/dist/__tests__/utils.test.js +2 -2
- package/dist/base-server.d.ts +59 -0
- package/dist/base-server.js +107 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/taxonomies.d.ts +144 -0
- package/dist/taxonomies.js +698 -0
- package/dist/types.d.ts +25 -58
- package/dist/types.js +1 -21
- package/dist/utils.d.ts +71 -0
- package/dist/utils.js +65 -0
- package/package.json +1 -1
|
@@ -8,8 +8,8 @@ describe("Utils", () => {
|
|
|
8
8
|
test("should keep valid characters", () => {
|
|
9
9
|
expect(sanitizeGroupId("test.group-123")).toBe("test.group-123");
|
|
10
10
|
});
|
|
11
|
-
test("should
|
|
12
|
-
expect(sanitizeGroupId("")).
|
|
11
|
+
test("should throw error for empty string", () => {
|
|
12
|
+
expect(() => sanitizeGroupId("")).toThrow("groupId parameter is required and cannot be null or undefined");
|
|
13
13
|
});
|
|
14
14
|
});
|
|
15
15
|
describe("formatApiUrl", () => {
|
package/dist/base-server.d.ts
CHANGED
|
@@ -16,7 +16,66 @@ export declare abstract class BaseAccessServer {
|
|
|
16
16
|
protected abstract getTools(): any[];
|
|
17
17
|
protected abstract getResources(): any[];
|
|
18
18
|
protected abstract handleToolCall(request: any): Promise<any>;
|
|
19
|
+
/**
|
|
20
|
+
* Get available prompts - override in subclasses to provide prompts
|
|
21
|
+
*/
|
|
22
|
+
protected getPrompts(): any[];
|
|
23
|
+
/**
|
|
24
|
+
* Handle resource read requests - override in subclasses
|
|
25
|
+
*/
|
|
19
26
|
protected handleResourceRead(request: any): Promise<any>;
|
|
27
|
+
/**
|
|
28
|
+
* Handle get prompt requests - override in subclasses
|
|
29
|
+
*/
|
|
30
|
+
protected handleGetPrompt(request: any): Promise<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Helper method to create a standard error response (MCP 2025 compliant)
|
|
33
|
+
* @param message The error message
|
|
34
|
+
* @param hint Optional suggestion for how to fix the error
|
|
35
|
+
*/
|
|
36
|
+
protected errorResponse(message: string, hint?: string): {
|
|
37
|
+
content: {
|
|
38
|
+
type: "text";
|
|
39
|
+
text: string;
|
|
40
|
+
}[];
|
|
41
|
+
isError: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Helper method to create a JSON resource response
|
|
45
|
+
* @param uri The resource URI
|
|
46
|
+
* @param data The data to return as JSON
|
|
47
|
+
*/
|
|
48
|
+
protected createJsonResource(uri: string, data: any): {
|
|
49
|
+
contents: {
|
|
50
|
+
uri: string;
|
|
51
|
+
mimeType: string;
|
|
52
|
+
text: string;
|
|
53
|
+
}[];
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Helper method to create a Markdown resource response
|
|
57
|
+
* @param uri The resource URI
|
|
58
|
+
* @param markdown The markdown content
|
|
59
|
+
*/
|
|
60
|
+
protected createMarkdownResource(uri: string, markdown: string): {
|
|
61
|
+
contents: {
|
|
62
|
+
uri: string;
|
|
63
|
+
mimeType: string;
|
|
64
|
+
text: string;
|
|
65
|
+
}[];
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Helper method to create a text resource response
|
|
69
|
+
* @param uri The resource URI
|
|
70
|
+
* @param text The plain text content
|
|
71
|
+
*/
|
|
72
|
+
protected createTextResource(uri: string, text: string): {
|
|
73
|
+
contents: {
|
|
74
|
+
uri: string;
|
|
75
|
+
mimeType: string;
|
|
76
|
+
text: string;
|
|
77
|
+
}[];
|
|
78
|
+
};
|
|
20
79
|
/**
|
|
21
80
|
* Start the MCP server with optional HTTP service layer for inter-server communication
|
|
22
81
|
*/
|
package/dist/base-server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
2
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
-
import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
+
import { CallToolRequestSchema, GetPromptRequestSchema, ListPromptsRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
4
4
|
import axios from "axios";
|
|
5
5
|
import express from "express";
|
|
6
6
|
export class BaseAccessServer {
|
|
@@ -23,6 +23,7 @@ export class BaseAccessServer {
|
|
|
23
23
|
capabilities: {
|
|
24
24
|
resources: {},
|
|
25
25
|
tools: {},
|
|
26
|
+
prompts: {},
|
|
26
27
|
},
|
|
27
28
|
});
|
|
28
29
|
this.transport = new StdioServerTransport();
|
|
@@ -77,9 +78,12 @@ export class BaseAccessServer {
|
|
|
77
78
|
content: [
|
|
78
79
|
{
|
|
79
80
|
type: "text",
|
|
80
|
-
text:
|
|
81
|
+
text: JSON.stringify({
|
|
82
|
+
error: errorMessage
|
|
83
|
+
}),
|
|
81
84
|
},
|
|
82
85
|
],
|
|
86
|
+
isError: true,
|
|
83
87
|
};
|
|
84
88
|
}
|
|
85
89
|
});
|
|
@@ -101,10 +105,111 @@ export class BaseAccessServer {
|
|
|
101
105
|
};
|
|
102
106
|
}
|
|
103
107
|
});
|
|
108
|
+
this.server.setRequestHandler(ListPromptsRequestSchema, async () => {
|
|
109
|
+
try {
|
|
110
|
+
return { prompts: this.getPrompts() };
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
// Silent error handling for MCP compatibility
|
|
114
|
+
return { prompts: [] };
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
this.server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
118
|
+
try {
|
|
119
|
+
return await this.handleGetPrompt(request);
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
123
|
+
console.error("Error getting prompt:", errorMessage);
|
|
124
|
+
throw error;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
104
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Get available prompts - override in subclasses to provide prompts
|
|
130
|
+
*/
|
|
131
|
+
getPrompts() {
|
|
132
|
+
return [];
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Handle resource read requests - override in subclasses
|
|
136
|
+
*/
|
|
105
137
|
async handleResourceRead(request) {
|
|
106
138
|
throw new Error("Resource reading not supported by this server");
|
|
107
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Handle get prompt requests - override in subclasses
|
|
142
|
+
*/
|
|
143
|
+
async handleGetPrompt(request) {
|
|
144
|
+
throw new Error("Prompt not found");
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Helper method to create a standard error response (MCP 2025 compliant)
|
|
148
|
+
* @param message The error message
|
|
149
|
+
* @param hint Optional suggestion for how to fix the error
|
|
150
|
+
*/
|
|
151
|
+
errorResponse(message, hint) {
|
|
152
|
+
return {
|
|
153
|
+
content: [
|
|
154
|
+
{
|
|
155
|
+
type: "text",
|
|
156
|
+
text: JSON.stringify({
|
|
157
|
+
error: message,
|
|
158
|
+
...(hint && { hint }),
|
|
159
|
+
}),
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
isError: true,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Helper method to create a JSON resource response
|
|
167
|
+
* @param uri The resource URI
|
|
168
|
+
* @param data The data to return as JSON
|
|
169
|
+
*/
|
|
170
|
+
createJsonResource(uri, data) {
|
|
171
|
+
return {
|
|
172
|
+
contents: [
|
|
173
|
+
{
|
|
174
|
+
uri,
|
|
175
|
+
mimeType: "application/json",
|
|
176
|
+
text: JSON.stringify(data, null, 2),
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Helper method to create a Markdown resource response
|
|
183
|
+
* @param uri The resource URI
|
|
184
|
+
* @param markdown The markdown content
|
|
185
|
+
*/
|
|
186
|
+
createMarkdownResource(uri, markdown) {
|
|
187
|
+
return {
|
|
188
|
+
contents: [
|
|
189
|
+
{
|
|
190
|
+
uri,
|
|
191
|
+
mimeType: "text/markdown",
|
|
192
|
+
text: markdown,
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Helper method to create a text resource response
|
|
199
|
+
* @param uri The resource URI
|
|
200
|
+
* @param text The plain text content
|
|
201
|
+
*/
|
|
202
|
+
createTextResource(uri, text) {
|
|
203
|
+
return {
|
|
204
|
+
contents: [
|
|
205
|
+
{
|
|
206
|
+
uri,
|
|
207
|
+
mimeType: "text/plain",
|
|
208
|
+
text: text,
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
};
|
|
212
|
+
}
|
|
108
213
|
/**
|
|
109
214
|
* Start the MCP server with optional HTTP service layer for inter-server communication
|
|
110
215
|
*/
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared taxonomies and reference data for ACCESS-CI MCP servers
|
|
3
|
+
* These provide context to AI assistants about the ACCESS-CI ecosystem
|
|
4
|
+
*/
|
|
5
|
+
export interface FieldOfScience {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
keywords: string[];
|
|
9
|
+
typical_resources: string[];
|
|
10
|
+
common_software: string[];
|
|
11
|
+
allocation_range?: {
|
|
12
|
+
min: number;
|
|
13
|
+
max: number;
|
|
14
|
+
typical: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* NSF Field of Science classification with ACCESS-CI context
|
|
19
|
+
* Based on NSF's formal classification system with added context about
|
|
20
|
+
* typical resource usage patterns and software requirements
|
|
21
|
+
*/
|
|
22
|
+
export declare const FIELDS_OF_SCIENCE: Record<string, FieldOfScience>;
|
|
23
|
+
/**
|
|
24
|
+
* ACCESS Allocation Types with definitions and typical use cases
|
|
25
|
+
*/
|
|
26
|
+
export interface AllocationType {
|
|
27
|
+
name: string;
|
|
28
|
+
description: string;
|
|
29
|
+
typical_duration: string;
|
|
30
|
+
credit_range: {
|
|
31
|
+
min: number;
|
|
32
|
+
max: number;
|
|
33
|
+
};
|
|
34
|
+
use_cases: string[];
|
|
35
|
+
eligibility: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const ALLOCATION_TYPES: Record<string, AllocationType>;
|
|
38
|
+
/**
|
|
39
|
+
* Common resource types and their characteristics
|
|
40
|
+
*/
|
|
41
|
+
export interface ResourceType {
|
|
42
|
+
name: string;
|
|
43
|
+
description: string;
|
|
44
|
+
typical_use_cases: string[];
|
|
45
|
+
key_features: string[];
|
|
46
|
+
}
|
|
47
|
+
export declare const RESOURCE_TYPES: Record<string, ResourceType>;
|
|
48
|
+
/**
|
|
49
|
+
* Get field of science by name or partial match
|
|
50
|
+
*/
|
|
51
|
+
export declare function getFieldOfScience(fieldName: string): FieldOfScience | null;
|
|
52
|
+
/**
|
|
53
|
+
* Get all field names
|
|
54
|
+
*/
|
|
55
|
+
export declare function getFieldNames(): string[];
|
|
56
|
+
/**
|
|
57
|
+
* Get allocation type by name
|
|
58
|
+
*/
|
|
59
|
+
export declare function getAllocationType(typeName: string): AllocationType | null;
|
|
60
|
+
/**
|
|
61
|
+
* ACCESS-CI Feature Codes
|
|
62
|
+
* These numeric codes identify capabilities and characteristics of ACCESS resources
|
|
63
|
+
* Derived from the ACCESS Operations API resource catalog
|
|
64
|
+
*/
|
|
65
|
+
export declare const ACCESS_FEATURE_CODES: Record<number, string>;
|
|
66
|
+
/**
|
|
67
|
+
* Get feature name by code
|
|
68
|
+
*/
|
|
69
|
+
export declare function getFeatureName(featureCode: number): string;
|
|
70
|
+
/**
|
|
71
|
+
* Get feature names for an array of codes
|
|
72
|
+
*/
|
|
73
|
+
export declare function getFeatureNames(featureCodes: number[]): string[];
|
|
74
|
+
/**
|
|
75
|
+
* Major ACCESS-CI Systems Catalog
|
|
76
|
+
* Based on https://ara.access-ci.org/ resource advisor
|
|
77
|
+
*/
|
|
78
|
+
export interface AccessSystem {
|
|
79
|
+
name: string;
|
|
80
|
+
organization: string;
|
|
81
|
+
description: string;
|
|
82
|
+
strengths: string[];
|
|
83
|
+
gpu_types?: string[];
|
|
84
|
+
max_memory_per_node?: string;
|
|
85
|
+
storage_capacity?: string;
|
|
86
|
+
user_interfaces: string[];
|
|
87
|
+
ideal_for: string[];
|
|
88
|
+
experience_level: string[];
|
|
89
|
+
}
|
|
90
|
+
export declare const ACCESS_SYSTEMS: Record<string, AccessSystem>;
|
|
91
|
+
/**
|
|
92
|
+
* Memory requirements guide
|
|
93
|
+
*/
|
|
94
|
+
export declare const MEMORY_REQUIREMENTS: {
|
|
95
|
+
"< 64 GB": {
|
|
96
|
+
description: string;
|
|
97
|
+
typical_uses: string[];
|
|
98
|
+
recommended_systems: string[];
|
|
99
|
+
};
|
|
100
|
+
"64-256 GB": {
|
|
101
|
+
description: string;
|
|
102
|
+
typical_uses: string[];
|
|
103
|
+
recommended_systems: string[];
|
|
104
|
+
};
|
|
105
|
+
"256-512 GB": {
|
|
106
|
+
description: string;
|
|
107
|
+
typical_uses: string[];
|
|
108
|
+
recommended_systems: string[];
|
|
109
|
+
};
|
|
110
|
+
"> 512 GB": {
|
|
111
|
+
description: string;
|
|
112
|
+
typical_uses: string[];
|
|
113
|
+
recommended_systems: string[];
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* GPU selection guide based on use case
|
|
118
|
+
*/
|
|
119
|
+
export declare const GPU_SELECTION_GUIDE: {
|
|
120
|
+
"Large Language Models": {
|
|
121
|
+
recommended_gpu: string;
|
|
122
|
+
recommended_systems: string[];
|
|
123
|
+
min_memory: string;
|
|
124
|
+
notes: string;
|
|
125
|
+
};
|
|
126
|
+
"Computer Vision": {
|
|
127
|
+
recommended_gpu: string;
|
|
128
|
+
recommended_systems: string[];
|
|
129
|
+
min_memory: string;
|
|
130
|
+
notes: string;
|
|
131
|
+
};
|
|
132
|
+
"Molecular Dynamics": {
|
|
133
|
+
recommended_gpu: string;
|
|
134
|
+
recommended_systems: string[];
|
|
135
|
+
min_memory: string;
|
|
136
|
+
notes: string;
|
|
137
|
+
};
|
|
138
|
+
"General AI/ML": {
|
|
139
|
+
recommended_gpu: string;
|
|
140
|
+
recommended_systems: string[];
|
|
141
|
+
min_memory: string;
|
|
142
|
+
notes: string;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
@@ -0,0 +1,698 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared taxonomies and reference data for ACCESS-CI MCP servers
|
|
3
|
+
* These provide context to AI assistants about the ACCESS-CI ecosystem
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* NSF Field of Science classification with ACCESS-CI context
|
|
7
|
+
* Based on NSF's formal classification system with added context about
|
|
8
|
+
* typical resource usage patterns and software requirements
|
|
9
|
+
*/
|
|
10
|
+
export const FIELDS_OF_SCIENCE = {
|
|
11
|
+
"Computer Science": {
|
|
12
|
+
name: "Computer Science",
|
|
13
|
+
description: "Research in algorithms, AI/ML, data science, cybersecurity, and high-performance computing",
|
|
14
|
+
keywords: [
|
|
15
|
+
"machine learning",
|
|
16
|
+
"artificial intelligence",
|
|
17
|
+
"deep learning",
|
|
18
|
+
"neural networks",
|
|
19
|
+
"data science",
|
|
20
|
+
"algorithms",
|
|
21
|
+
"distributed systems",
|
|
22
|
+
"parallel computing",
|
|
23
|
+
"HPC",
|
|
24
|
+
"cybersecurity",
|
|
25
|
+
"computer vision",
|
|
26
|
+
"natural language processing",
|
|
27
|
+
"NLP",
|
|
28
|
+
],
|
|
29
|
+
typical_resources: ["GPU", "high memory", "fast storage", "high-speed networking"],
|
|
30
|
+
common_software: [
|
|
31
|
+
"TensorFlow",
|
|
32
|
+
"PyTorch",
|
|
33
|
+
"scikit-learn",
|
|
34
|
+
"Python",
|
|
35
|
+
"CUDA",
|
|
36
|
+
"Jupyter",
|
|
37
|
+
"NumPy",
|
|
38
|
+
"Pandas",
|
|
39
|
+
],
|
|
40
|
+
allocation_range: {
|
|
41
|
+
min: 50000,
|
|
42
|
+
max: 1000000,
|
|
43
|
+
typical: 250000,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
"Biological Sciences": {
|
|
47
|
+
name: "Biological Sciences",
|
|
48
|
+
description: "Research in genomics, proteomics, structural biology, systems biology, and bioinformatics",
|
|
49
|
+
keywords: [
|
|
50
|
+
"genomics",
|
|
51
|
+
"proteomics",
|
|
52
|
+
"bioinformatics",
|
|
53
|
+
"structural biology",
|
|
54
|
+
"molecular dynamics",
|
|
55
|
+
"sequence analysis",
|
|
56
|
+
"protein folding",
|
|
57
|
+
"phylogenetics",
|
|
58
|
+
"systems biology",
|
|
59
|
+
"metagenomics",
|
|
60
|
+
],
|
|
61
|
+
typical_resources: ["high throughput", "large storage", "CPU clusters", "high memory"],
|
|
62
|
+
common_software: [
|
|
63
|
+
"BLAST",
|
|
64
|
+
"GROMACS",
|
|
65
|
+
"AMBER",
|
|
66
|
+
"NAMD",
|
|
67
|
+
"Rosetta",
|
|
68
|
+
"Bowtie",
|
|
69
|
+
"SAMtools",
|
|
70
|
+
"BioPython",
|
|
71
|
+
],
|
|
72
|
+
allocation_range: {
|
|
73
|
+
min: 100000,
|
|
74
|
+
max: 800000,
|
|
75
|
+
typical: 300000,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
"Physics": {
|
|
79
|
+
name: "Physics",
|
|
80
|
+
description: "Research in high energy physics, astrophysics, condensed matter, and computational physics",
|
|
81
|
+
keywords: [
|
|
82
|
+
"quantum mechanics",
|
|
83
|
+
"particle physics",
|
|
84
|
+
"astrophysics",
|
|
85
|
+
"cosmology",
|
|
86
|
+
"condensed matter",
|
|
87
|
+
"computational physics",
|
|
88
|
+
"molecular dynamics",
|
|
89
|
+
"lattice QCD",
|
|
90
|
+
"gravitational waves",
|
|
91
|
+
],
|
|
92
|
+
typical_resources: ["CPU clusters", "high memory", "GPU for simulations", "large storage"],
|
|
93
|
+
common_software: [
|
|
94
|
+
"LAMMPS",
|
|
95
|
+
"Quantum ESPRESSO",
|
|
96
|
+
"VASP",
|
|
97
|
+
"GROMACS",
|
|
98
|
+
"ROOT",
|
|
99
|
+
"Geant4",
|
|
100
|
+
"MATLAB",
|
|
101
|
+
"Mathematica",
|
|
102
|
+
],
|
|
103
|
+
allocation_range: {
|
|
104
|
+
min: 100000,
|
|
105
|
+
max: 2000000,
|
|
106
|
+
typical: 500000,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
"Chemistry": {
|
|
110
|
+
name: "Chemistry",
|
|
111
|
+
description: "Research in computational chemistry, molecular modeling, and materials science",
|
|
112
|
+
keywords: [
|
|
113
|
+
"molecular dynamics",
|
|
114
|
+
"quantum chemistry",
|
|
115
|
+
"computational chemistry",
|
|
116
|
+
"materials science",
|
|
117
|
+
"drug discovery",
|
|
118
|
+
"reaction mechanisms",
|
|
119
|
+
"DFT",
|
|
120
|
+
"ab initio",
|
|
121
|
+
],
|
|
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
|
+
],
|
|
133
|
+
allocation_range: {
|
|
134
|
+
min: 75000,
|
|
135
|
+
max: 1000000,
|
|
136
|
+
typical: 300000,
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
"Engineering": {
|
|
140
|
+
name: "Engineering",
|
|
141
|
+
description: "Research in computational engineering, CFD, structural analysis, and design optimization",
|
|
142
|
+
keywords: [
|
|
143
|
+
"computational fluid dynamics",
|
|
144
|
+
"CFD",
|
|
145
|
+
"finite element analysis",
|
|
146
|
+
"FEA",
|
|
147
|
+
"structural analysis",
|
|
148
|
+
"optimization",
|
|
149
|
+
"CAD",
|
|
150
|
+
"mechanical engineering",
|
|
151
|
+
"aerospace",
|
|
152
|
+
],
|
|
153
|
+
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
|
+
],
|
|
163
|
+
allocation_range: {
|
|
164
|
+
min: 100000,
|
|
165
|
+
max: 1500000,
|
|
166
|
+
typical: 400000,
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
"Earth Sciences": {
|
|
170
|
+
name: "Earth Sciences",
|
|
171
|
+
description: "Research in climate modeling, atmospheric science, geophysics, and environmental science",
|
|
172
|
+
keywords: [
|
|
173
|
+
"climate modeling",
|
|
174
|
+
"atmospheric science",
|
|
175
|
+
"weather prediction",
|
|
176
|
+
"oceanography",
|
|
177
|
+
"geophysics",
|
|
178
|
+
"seismology",
|
|
179
|
+
"remote sensing",
|
|
180
|
+
"environmental science",
|
|
181
|
+
],
|
|
182
|
+
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
|
+
],
|
|
193
|
+
allocation_range: {
|
|
194
|
+
min: 150000,
|
|
195
|
+
max: 2000000,
|
|
196
|
+
typical: 600000,
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
"Mathematics and Statistics": {
|
|
200
|
+
name: "Mathematics and Statistics",
|
|
201
|
+
description: "Research in numerical analysis, optimization, data analytics, and statistical modeling",
|
|
202
|
+
keywords: [
|
|
203
|
+
"numerical analysis",
|
|
204
|
+
"optimization",
|
|
205
|
+
"linear algebra",
|
|
206
|
+
"statistics",
|
|
207
|
+
"data analytics",
|
|
208
|
+
"monte carlo",
|
|
209
|
+
"stochastic processes",
|
|
210
|
+
"computational mathematics",
|
|
211
|
+
],
|
|
212
|
+
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
|
+
],
|
|
223
|
+
allocation_range: {
|
|
224
|
+
min: 50000,
|
|
225
|
+
max: 500000,
|
|
226
|
+
typical: 150000,
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
"Social Sciences": {
|
|
230
|
+
name: "Social Sciences",
|
|
231
|
+
description: "Research in economics, sociology, political science, and computational social science",
|
|
232
|
+
keywords: [
|
|
233
|
+
"econometrics",
|
|
234
|
+
"agent-based modeling",
|
|
235
|
+
"network analysis",
|
|
236
|
+
"social networks",
|
|
237
|
+
"political science",
|
|
238
|
+
"computational social science",
|
|
239
|
+
"survey analysis",
|
|
240
|
+
],
|
|
241
|
+
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
|
+
],
|
|
251
|
+
allocation_range: {
|
|
252
|
+
min: 25000,
|
|
253
|
+
max: 300000,
|
|
254
|
+
typical: 100000,
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
"Astronomy and Astrophysics": {
|
|
258
|
+
name: "Astronomy and Astrophysics",
|
|
259
|
+
description: "Research in observational astronomy, cosmological simulations, and data analysis",
|
|
260
|
+
keywords: [
|
|
261
|
+
"cosmology",
|
|
262
|
+
"galaxy formation",
|
|
263
|
+
"stellar evolution",
|
|
264
|
+
"exoplanets",
|
|
265
|
+
"gravitational waves",
|
|
266
|
+
"radio astronomy",
|
|
267
|
+
"optical astronomy",
|
|
268
|
+
"simulation",
|
|
269
|
+
],
|
|
270
|
+
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
|
+
],
|
|
281
|
+
allocation_range: {
|
|
282
|
+
min: 150000,
|
|
283
|
+
max: 2500000,
|
|
284
|
+
typical: 700000,
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
};
|
|
288
|
+
export const ALLOCATION_TYPES = {
|
|
289
|
+
Discover: {
|
|
290
|
+
name: "Discover ACCESS Credits",
|
|
291
|
+
description: "Small allocations for exploring ACCESS resources and conducting preliminary research",
|
|
292
|
+
typical_duration: "12 months",
|
|
293
|
+
credit_range: {
|
|
294
|
+
min: 1000,
|
|
295
|
+
max: 400000,
|
|
296
|
+
},
|
|
297
|
+
use_cases: [
|
|
298
|
+
"Preliminary research and feasibility studies",
|
|
299
|
+
"Code development and testing",
|
|
300
|
+
"Learning ACCESS systems",
|
|
301
|
+
"Small-scale computational experiments",
|
|
302
|
+
"Proof-of-concept work",
|
|
303
|
+
],
|
|
304
|
+
eligibility: "All researchers at US institutions",
|
|
305
|
+
},
|
|
306
|
+
Explore: {
|
|
307
|
+
name: "Explore ACCESS Credits",
|
|
308
|
+
description: "Medium allocations for established research projects",
|
|
309
|
+
typical_duration: "12 months",
|
|
310
|
+
credit_range: {
|
|
311
|
+
min: 400000,
|
|
312
|
+
max: 1500000,
|
|
313
|
+
},
|
|
314
|
+
use_cases: [
|
|
315
|
+
"Ongoing research projects",
|
|
316
|
+
"Production computations",
|
|
317
|
+
"Data analysis and processing",
|
|
318
|
+
"Multi-parameter studies",
|
|
319
|
+
"Medium-scale simulations",
|
|
320
|
+
],
|
|
321
|
+
eligibility: "Researchers with demonstrated need beyond Discover level",
|
|
322
|
+
},
|
|
323
|
+
Accelerate: {
|
|
324
|
+
name: "Accelerate ACCESS Credits",
|
|
325
|
+
description: "Large allocations for significant computational research",
|
|
326
|
+
typical_duration: "12 months",
|
|
327
|
+
credit_range: {
|
|
328
|
+
min: 1500000,
|
|
329
|
+
max: 10000000,
|
|
330
|
+
},
|
|
331
|
+
use_cases: [
|
|
332
|
+
"Large-scale simulations",
|
|
333
|
+
"Major research initiatives",
|
|
334
|
+
"High-throughput computing campaigns",
|
|
335
|
+
"Big data analytics",
|
|
336
|
+
"Multi-year projects",
|
|
337
|
+
],
|
|
338
|
+
eligibility: "Well-established research programs with significant computational needs",
|
|
339
|
+
},
|
|
340
|
+
Maximize: {
|
|
341
|
+
name: "Maximize ACCESS Credits",
|
|
342
|
+
description: "Very large allocations for exceptional computational research with broad impact",
|
|
343
|
+
typical_duration: "12 months",
|
|
344
|
+
credit_range: {
|
|
345
|
+
min: 10000000,
|
|
346
|
+
max: 50000000,
|
|
347
|
+
},
|
|
348
|
+
use_cases: [
|
|
349
|
+
"Grand challenge problems",
|
|
350
|
+
"Transformative research",
|
|
351
|
+
"National-scale computing campaigns",
|
|
352
|
+
"Major scientific breakthroughs",
|
|
353
|
+
"Leadership-class computing",
|
|
354
|
+
],
|
|
355
|
+
eligibility: "Exceptional projects with demonstrated transformative potential and broad impact",
|
|
356
|
+
},
|
|
357
|
+
};
|
|
358
|
+
export const RESOURCE_TYPES = {
|
|
359
|
+
CPU: {
|
|
360
|
+
name: "CPU Compute",
|
|
361
|
+
description: "General-purpose computing with standard processors",
|
|
362
|
+
typical_use_cases: [
|
|
363
|
+
"Serial and parallel applications",
|
|
364
|
+
"General scientific computing",
|
|
365
|
+
"Data processing",
|
|
366
|
+
"Simulations",
|
|
367
|
+
],
|
|
368
|
+
key_features: [
|
|
369
|
+
"High core counts",
|
|
370
|
+
"Good memory bandwidth",
|
|
371
|
+
"MPI support",
|
|
372
|
+
"Long-running jobs",
|
|
373
|
+
],
|
|
374
|
+
},
|
|
375
|
+
GPU: {
|
|
376
|
+
name: "GPU Accelerated",
|
|
377
|
+
description: "Systems with graphics processing units for accelerated computing",
|
|
378
|
+
typical_use_cases: [
|
|
379
|
+
"Machine learning and AI",
|
|
380
|
+
"Deep learning",
|
|
381
|
+
"Molecular dynamics",
|
|
382
|
+
"Image processing",
|
|
383
|
+
"CFD simulations",
|
|
384
|
+
],
|
|
385
|
+
key_features: [
|
|
386
|
+
"CUDA/ROCm support",
|
|
387
|
+
"High memory bandwidth",
|
|
388
|
+
"Tensor cores",
|
|
389
|
+
"Fast training",
|
|
390
|
+
],
|
|
391
|
+
},
|
|
392
|
+
"High Memory": {
|
|
393
|
+
name: "High Memory Systems",
|
|
394
|
+
description: "Systems with large RAM for memory-intensive applications",
|
|
395
|
+
typical_use_cases: [
|
|
396
|
+
"Large datasets in memory",
|
|
397
|
+
"Genome assembly",
|
|
398
|
+
"In-memory databases",
|
|
399
|
+
"Large-scale graph analysis",
|
|
400
|
+
],
|
|
401
|
+
key_features: [
|
|
402
|
+
"1TB+ memory per node",
|
|
403
|
+
"Fast memory access",
|
|
404
|
+
"Large working sets",
|
|
405
|
+
],
|
|
406
|
+
},
|
|
407
|
+
Storage: {
|
|
408
|
+
name: "Storage Resources",
|
|
409
|
+
description: "High-capacity storage systems for data-intensive research",
|
|
410
|
+
typical_use_cases: [
|
|
411
|
+
"Large datasets",
|
|
412
|
+
"Data archival",
|
|
413
|
+
"Intermediate results",
|
|
414
|
+
"Collaborative data sharing",
|
|
415
|
+
],
|
|
416
|
+
key_features: [
|
|
417
|
+
"Petabyte-scale capacity",
|
|
418
|
+
"High-speed I/O",
|
|
419
|
+
"Data management tools",
|
|
420
|
+
"Backup and archival",
|
|
421
|
+
],
|
|
422
|
+
},
|
|
423
|
+
Cloud: {
|
|
424
|
+
name: "Cloud Computing",
|
|
425
|
+
description: "Flexible cloud-based computing resources",
|
|
426
|
+
typical_use_cases: [
|
|
427
|
+
"Web services",
|
|
428
|
+
"Containers and microservices",
|
|
429
|
+
"Science gateways",
|
|
430
|
+
"Interactive computing",
|
|
431
|
+
"Elastic workloads",
|
|
432
|
+
],
|
|
433
|
+
key_features: [
|
|
434
|
+
"On-demand resources",
|
|
435
|
+
"Virtual machines",
|
|
436
|
+
"Container support",
|
|
437
|
+
"API access",
|
|
438
|
+
],
|
|
439
|
+
},
|
|
440
|
+
};
|
|
441
|
+
/**
|
|
442
|
+
* Get field of science by name or partial match
|
|
443
|
+
*/
|
|
444
|
+
export function getFieldOfScience(fieldName) {
|
|
445
|
+
// Exact match
|
|
446
|
+
if (FIELDS_OF_SCIENCE[fieldName]) {
|
|
447
|
+
return FIELDS_OF_SCIENCE[fieldName];
|
|
448
|
+
}
|
|
449
|
+
// Case-insensitive partial match
|
|
450
|
+
const lowerFieldName = fieldName.toLowerCase();
|
|
451
|
+
for (const [key, value] of Object.entries(FIELDS_OF_SCIENCE)) {
|
|
452
|
+
if (key.toLowerCase().includes(lowerFieldName) || lowerFieldName.includes(key.toLowerCase())) {
|
|
453
|
+
return value;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
return null;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Get all field names
|
|
460
|
+
*/
|
|
461
|
+
export function getFieldNames() {
|
|
462
|
+
return Object.keys(FIELDS_OF_SCIENCE);
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Get allocation type by name
|
|
466
|
+
*/
|
|
467
|
+
export function getAllocationType(typeName) {
|
|
468
|
+
// Exact match
|
|
469
|
+
if (ALLOCATION_TYPES[typeName]) {
|
|
470
|
+
return ALLOCATION_TYPES[typeName];
|
|
471
|
+
}
|
|
472
|
+
// Case-insensitive partial match
|
|
473
|
+
const lowerTypeName = typeName.toLowerCase();
|
|
474
|
+
for (const [key, value] of Object.entries(ALLOCATION_TYPES)) {
|
|
475
|
+
if (key.toLowerCase() === lowerTypeName) {
|
|
476
|
+
return value;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
return null;
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* ACCESS-CI Feature Codes
|
|
483
|
+
* These numeric codes identify capabilities and characteristics of ACCESS resources
|
|
484
|
+
* Derived from the ACCESS Operations API resource catalog
|
|
485
|
+
*/
|
|
486
|
+
export const ACCESS_FEATURE_CODES = {
|
|
487
|
+
// Core resource capabilities
|
|
488
|
+
100: "GPU Computing",
|
|
489
|
+
101: "High Memory Computing",
|
|
490
|
+
102: "High Performance Storage",
|
|
491
|
+
103: "High Throughput Computing",
|
|
492
|
+
104: "Large Scale Computing",
|
|
493
|
+
// Access and interface types
|
|
494
|
+
134: "Cloud Computing Platform",
|
|
495
|
+
135: "Container Support",
|
|
496
|
+
136: "Virtual Machine Support",
|
|
497
|
+
137: "Science Gateway Resource", // Often excluded from general listings
|
|
498
|
+
138: "Interactive Computing",
|
|
499
|
+
139: "ACCESS Allocated Resource", // Requires ACCESS allocation
|
|
500
|
+
// Specialized capabilities
|
|
501
|
+
140: "Data Transfer Node",
|
|
502
|
+
141: "Visualization Capabilities",
|
|
503
|
+
142: "GPU Acceleration",
|
|
504
|
+
143: "AI/ML Optimized",
|
|
505
|
+
144: "Quantum Computing",
|
|
506
|
+
// Network and I/O
|
|
507
|
+
145: "High-Speed Networking",
|
|
508
|
+
146: "Parallel I/O",
|
|
509
|
+
147: "Data Staging",
|
|
510
|
+
// Software and environment
|
|
511
|
+
148: "Specialized Software Stack",
|
|
512
|
+
149: "Custom Environments",
|
|
513
|
+
150: "Jupyter Support",
|
|
514
|
+
151: "RStudio Support",
|
|
515
|
+
// Note: This is a partial mapping based on observed feature IDs
|
|
516
|
+
// Complete documentation may be available from ACCESS Operations team
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* Get feature name by code
|
|
520
|
+
*/
|
|
521
|
+
export function getFeatureName(featureCode) {
|
|
522
|
+
return ACCESS_FEATURE_CODES[featureCode] || `Unknown Feature (${featureCode})`;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Get feature names for an array of codes
|
|
526
|
+
*/
|
|
527
|
+
export function getFeatureNames(featureCodes) {
|
|
528
|
+
return featureCodes.map(code => getFeatureName(code));
|
|
529
|
+
}
|
|
530
|
+
export const ACCESS_SYSTEMS = {
|
|
531
|
+
"Delta": {
|
|
532
|
+
name: "Delta",
|
|
533
|
+
organization: "NCSA (University of Illinois)",
|
|
534
|
+
description: "GPU-focused system with NVIDIA A100 and A40 GPUs",
|
|
535
|
+
strengths: ["AI/ML", "Deep Learning", "GPU Computing", "Large Models"],
|
|
536
|
+
gpu_types: ["NVIDIA A100 (40GB/80GB)", "NVIDIA A40"],
|
|
537
|
+
max_memory_per_node: "256 GB (CPU nodes), 2 TB (large memory)",
|
|
538
|
+
storage_capacity: "Large parallel filesystem",
|
|
539
|
+
user_interfaces: ["SSH", "Open OnDemand", "Jupyter"],
|
|
540
|
+
ideal_for: [
|
|
541
|
+
"Training large language models",
|
|
542
|
+
"Deep learning research",
|
|
543
|
+
"GPU-accelerated simulations",
|
|
544
|
+
"Computer vision",
|
|
545
|
+
],
|
|
546
|
+
experience_level: ["Intermediate", "Advanced"],
|
|
547
|
+
},
|
|
548
|
+
"Bridges-2": {
|
|
549
|
+
name: "Bridges-2",
|
|
550
|
+
organization: "PSC (Pittsburgh Supercomputing Center)",
|
|
551
|
+
description: "Versatile system with CPU, GPU, and high-memory nodes",
|
|
552
|
+
strengths: ["General Purpose", "High Memory", "GPU Computing", "Visualization"],
|
|
553
|
+
gpu_types: ["NVIDIA V100", "NVIDIA A100", "NVIDIA A40"],
|
|
554
|
+
max_memory_per_node: "4 TB Extreme Memory nodes",
|
|
555
|
+
storage_capacity: "15 PB",
|
|
556
|
+
user_interfaces: ["SSH", "Open OnDemand", "Jupyter", "RStudio", "VS Code"],
|
|
557
|
+
ideal_for: [
|
|
558
|
+
"Genome assembly",
|
|
559
|
+
"Large-scale data analytics",
|
|
560
|
+
"Mixed workloads (CPU+GPU)",
|
|
561
|
+
"Memory-intensive applications",
|
|
562
|
+
],
|
|
563
|
+
experience_level: ["Beginner", "Intermediate", "Advanced"],
|
|
564
|
+
},
|
|
565
|
+
"Anvil": {
|
|
566
|
+
name: "Anvil",
|
|
567
|
+
organization: "Purdue University",
|
|
568
|
+
description: "Composable subsystem architecture with flexible resource allocation",
|
|
569
|
+
strengths: ["Composable Architecture", "Flexible Resources", "CPU Computing"],
|
|
570
|
+
max_memory_per_node: "256 GB (standard), 1 TB (large memory)",
|
|
571
|
+
storage_capacity: "Multi-PB",
|
|
572
|
+
user_interfaces: ["SSH", "Open OnDemand", "Jupyter"],
|
|
573
|
+
ideal_for: [
|
|
574
|
+
"Parallel CPU applications",
|
|
575
|
+
"Genomics workflows",
|
|
576
|
+
"Data science",
|
|
577
|
+
"Gateway hosting",
|
|
578
|
+
],
|
|
579
|
+
experience_level: ["Beginner", "Intermediate", "Advanced"],
|
|
580
|
+
},
|
|
581
|
+
"Expanse": {
|
|
582
|
+
name: "Expanse",
|
|
583
|
+
organization: "SDSC (San Diego Supercomputing Center)",
|
|
584
|
+
description: "Balanced CPU and GPU computing with excellent storage",
|
|
585
|
+
strengths: ["Data-Intensive Computing", "GPU Computing", "CPU Computing"],
|
|
586
|
+
gpu_types: ["NVIDIA V100"],
|
|
587
|
+
max_memory_per_node: "2 TB",
|
|
588
|
+
storage_capacity: "7 PB parallel storage",
|
|
589
|
+
user_interfaces: ["SSH", "Jupyter", "RStudio"],
|
|
590
|
+
ideal_for: [
|
|
591
|
+
"Data analytics at scale",
|
|
592
|
+
"Bioinformatics",
|
|
593
|
+
"Machine learning",
|
|
594
|
+
"Simulation science",
|
|
595
|
+
],
|
|
596
|
+
experience_level: ["Intermediate", "Advanced"],
|
|
597
|
+
},
|
|
598
|
+
"Stampede3": {
|
|
599
|
+
name: "Stampede3",
|
|
600
|
+
organization: "TACC (Texas Advanced Computing Center)",
|
|
601
|
+
description: "Leadership-class supercomputer with NVIDIA Grace-Hopper",
|
|
602
|
+
strengths: ["Leadership Computing", "AI/ML", "Large-Scale Simulation"],
|
|
603
|
+
gpu_types: ["NVIDIA Grace Hopper Superchip"],
|
|
604
|
+
max_memory_per_node: "480 GB (Grace-Hopper)",
|
|
605
|
+
user_interfaces: ["SSH", "TACC Portal"],
|
|
606
|
+
ideal_for: [
|
|
607
|
+
"Grand challenge problems",
|
|
608
|
+
"Large-scale AI training",
|
|
609
|
+
"Extreme-scale simulations",
|
|
610
|
+
"Leadership-class workloads",
|
|
611
|
+
],
|
|
612
|
+
experience_level: ["Advanced", "Expert"],
|
|
613
|
+
},
|
|
614
|
+
"Jetstream2": {
|
|
615
|
+
name: "Jetstream2",
|
|
616
|
+
organization: "Indiana University",
|
|
617
|
+
description: "Cloud computing platform for interactive science and gateways",
|
|
618
|
+
strengths: ["Cloud Computing", "Interactive Computing", "Science Gateways", "Flexibility"],
|
|
619
|
+
gpu_types: ["NVIDIA A100"],
|
|
620
|
+
user_interfaces: ["Exosphere (web)", "OpenStack API", "Jupyter", "RStudio"],
|
|
621
|
+
ideal_for: [
|
|
622
|
+
"Science gateways",
|
|
623
|
+
"Web services",
|
|
624
|
+
"Interactive analysis",
|
|
625
|
+
"Classroom use",
|
|
626
|
+
"Container-based workflows",
|
|
627
|
+
],
|
|
628
|
+
experience_level: ["Beginner", "Intermediate"],
|
|
629
|
+
},
|
|
630
|
+
"Open Science Grid": {
|
|
631
|
+
name: "Open Science Grid",
|
|
632
|
+
organization: "OSG Consortium",
|
|
633
|
+
description: "High-throughput computing for distributed workflows",
|
|
634
|
+
strengths: ["High-Throughput Computing", "Distributed Computing", "Workflows"],
|
|
635
|
+
user_interfaces: ["HTCondor", "APIs"],
|
|
636
|
+
ideal_for: [
|
|
637
|
+
"High-throughput workflows",
|
|
638
|
+
"Parameter sweeps",
|
|
639
|
+
"Embarrassingly parallel tasks",
|
|
640
|
+
"Large-scale ensembles",
|
|
641
|
+
],
|
|
642
|
+
experience_level: ["Intermediate", "Advanced"],
|
|
643
|
+
},
|
|
644
|
+
};
|
|
645
|
+
/**
|
|
646
|
+
* Memory requirements guide
|
|
647
|
+
*/
|
|
648
|
+
export const MEMORY_REQUIREMENTS = {
|
|
649
|
+
"< 64 GB": {
|
|
650
|
+
description: "Standard memory for most applications",
|
|
651
|
+
typical_uses: ["Serial applications", "Small datasets", "Code development"],
|
|
652
|
+
recommended_systems: ["Anvil", "Bridges-2", "Expanse"],
|
|
653
|
+
},
|
|
654
|
+
"64-256 GB": {
|
|
655
|
+
description: "Medium memory for moderate-scale applications",
|
|
656
|
+
typical_uses: ["Parallel applications", "Medium datasets", "Ensemble runs"],
|
|
657
|
+
recommended_systems: ["Delta", "Anvil", "Bridges-2", "Expanse"],
|
|
658
|
+
},
|
|
659
|
+
"256-512 GB": {
|
|
660
|
+
description: "High memory for large-scale applications",
|
|
661
|
+
typical_uses: ["Large genomic assemblies", "Big data analytics", "In-memory databases"],
|
|
662
|
+
recommended_systems: ["Bridges-2", "Anvil"],
|
|
663
|
+
},
|
|
664
|
+
"> 512 GB": {
|
|
665
|
+
description: "Extreme memory for the largest problems",
|
|
666
|
+
typical_uses: ["Whole genome assembly", "Extreme-scale graph analytics", "Very large matrices"],
|
|
667
|
+
recommended_systems: ["Bridges-2 (up to 4TB)"],
|
|
668
|
+
},
|
|
669
|
+
};
|
|
670
|
+
/**
|
|
671
|
+
* GPU selection guide based on use case
|
|
672
|
+
*/
|
|
673
|
+
export const GPU_SELECTION_GUIDE = {
|
|
674
|
+
"Large Language Models": {
|
|
675
|
+
recommended_gpu: "NVIDIA A100 80GB or Grace-Hopper",
|
|
676
|
+
recommended_systems: ["Delta", "Stampede3"],
|
|
677
|
+
min_memory: "80 GB per GPU",
|
|
678
|
+
notes: "Multi-GPU required for models >10B parameters",
|
|
679
|
+
},
|
|
680
|
+
"Computer Vision": {
|
|
681
|
+
recommended_gpu: "NVIDIA A100 40GB or V100",
|
|
682
|
+
recommended_systems: ["Delta", "Bridges-2", "Expanse"],
|
|
683
|
+
min_memory: "16-40 GB per GPU",
|
|
684
|
+
notes: "A100 recommended for training, V100 sufficient for inference",
|
|
685
|
+
},
|
|
686
|
+
"Molecular Dynamics": {
|
|
687
|
+
recommended_gpu: "NVIDIA A100 or V100",
|
|
688
|
+
recommended_systems: ["Delta", "Bridges-2", "Expanse"],
|
|
689
|
+
min_memory: "16-40 GB per GPU",
|
|
690
|
+
notes: "Double-precision performance important",
|
|
691
|
+
},
|
|
692
|
+
"General AI/ML": {
|
|
693
|
+
recommended_gpu: "NVIDIA V100 or A100",
|
|
694
|
+
recommended_systems: ["Delta", "Bridges-2", "Expanse", "Jetstream2"],
|
|
695
|
+
min_memory: "16-40 GB per GPU",
|
|
696
|
+
notes: "V100 good for most workloads, A100 for larger models",
|
|
697
|
+
},
|
|
698
|
+
};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,58 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
start_date?: string | undefined;
|
|
27
|
-
end_date?: string | undefined;
|
|
28
|
-
location?: string | undefined;
|
|
29
|
-
}, {
|
|
30
|
-
title: string;
|
|
31
|
-
id: string;
|
|
32
|
-
description?: string | undefined;
|
|
33
|
-
start_date?: string | undefined;
|
|
34
|
-
end_date?: string | undefined;
|
|
35
|
-
location?: string | undefined;
|
|
36
|
-
}>;
|
|
37
|
-
export declare const KnowledgeBaseResourceSchema: z.ZodObject<{
|
|
38
|
-
id: z.ZodString;
|
|
39
|
-
title: z.ZodString;
|
|
40
|
-
content: z.ZodOptional<z.ZodString>;
|
|
41
|
-
category: z.ZodOptional<z.ZodString>;
|
|
42
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
43
|
-
}, "strip", z.ZodTypeAny, {
|
|
44
|
-
title: string;
|
|
45
|
-
id: string;
|
|
46
|
-
content?: string | undefined;
|
|
47
|
-
category?: string | undefined;
|
|
48
|
-
tags?: string[] | undefined;
|
|
49
|
-
}, {
|
|
50
|
-
title: string;
|
|
51
|
-
id: string;
|
|
52
|
-
content?: string | undefined;
|
|
53
|
-
category?: string | undefined;
|
|
54
|
-
tags?: string[] | undefined;
|
|
55
|
-
}>;
|
|
56
|
-
export type AffinityGroup = z.infer<typeof AffinityGroupSchema>;
|
|
57
|
-
export type Event = z.infer<typeof EventSchema>;
|
|
58
|
-
export type KnowledgeBaseResource = z.infer<typeof KnowledgeBaseResourceSchema>;
|
|
1
|
+
export interface UniversalSearchParams {
|
|
2
|
+
query?: string;
|
|
3
|
+
id?: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
tags?: string[];
|
|
6
|
+
date?: "today" | "upcoming" | "past" | "this_week" | "this_month";
|
|
7
|
+
limit?: number;
|
|
8
|
+
offset?: number;
|
|
9
|
+
sort?: string;
|
|
10
|
+
order?: "asc" | "desc";
|
|
11
|
+
}
|
|
12
|
+
export interface UniversalResponse<T> {
|
|
13
|
+
total: number;
|
|
14
|
+
items: T[];
|
|
15
|
+
}
|
|
16
|
+
export interface UniversalResponseWithHints<T> extends UniversalResponse<T> {
|
|
17
|
+
hints?: {
|
|
18
|
+
next?: string;
|
|
19
|
+
tags?: string[];
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface StandardErrorResponse {
|
|
23
|
+
error: string;
|
|
24
|
+
hint?: string;
|
|
25
|
+
}
|
package/dist/types.js
CHANGED
|
@@ -1,21 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export const AffinityGroupSchema = z.object({
|
|
3
|
-
group_id: z.string(),
|
|
4
|
-
name: z.string().optional(),
|
|
5
|
-
description: z.string().optional(),
|
|
6
|
-
});
|
|
7
|
-
export const EventSchema = z.object({
|
|
8
|
-
id: z.string(),
|
|
9
|
-
title: z.string(),
|
|
10
|
-
description: z.string().optional(),
|
|
11
|
-
start_date: z.string().optional(),
|
|
12
|
-
end_date: z.string().optional(),
|
|
13
|
-
location: z.string().optional(),
|
|
14
|
-
});
|
|
15
|
-
export const KnowledgeBaseResourceSchema = z.object({
|
|
16
|
-
id: z.string(),
|
|
17
|
-
title: z.string(),
|
|
18
|
-
content: z.string().optional(),
|
|
19
|
-
category: z.string().optional(),
|
|
20
|
-
tags: z.array(z.string()).optional(),
|
|
21
|
-
});
|
|
1
|
+
export {};
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,3 +1,74 @@
|
|
|
1
1
|
export declare function sanitizeGroupId(groupId: string): string;
|
|
2
2
|
export declare function formatApiUrl(version: string, endpoint: string): string;
|
|
3
3
|
export declare function handleApiError(error: any): string;
|
|
4
|
+
/**
|
|
5
|
+
* LLM-Friendly Response Utilities
|
|
6
|
+
*
|
|
7
|
+
* These utilities help create responses that guide LLMs through multi-step workflows,
|
|
8
|
+
* provide clear next actions, and improve error handling.
|
|
9
|
+
*/
|
|
10
|
+
export interface NextStep {
|
|
11
|
+
action: string;
|
|
12
|
+
description: string;
|
|
13
|
+
tool?: string;
|
|
14
|
+
parameters?: Record<string, any>;
|
|
15
|
+
}
|
|
16
|
+
export interface LLMResponse<T = any> {
|
|
17
|
+
data?: T;
|
|
18
|
+
count?: number;
|
|
19
|
+
next_steps?: NextStep[];
|
|
20
|
+
suggestions?: string[];
|
|
21
|
+
related_tools?: string[];
|
|
22
|
+
context?: Record<string, any>;
|
|
23
|
+
}
|
|
24
|
+
export interface LLMError {
|
|
25
|
+
error: string;
|
|
26
|
+
error_type: "validation" | "not_found" | "api_error" | "invalid_parameter";
|
|
27
|
+
suggestions?: string[];
|
|
28
|
+
next_steps?: NextStep[];
|
|
29
|
+
did_you_mean?: string[];
|
|
30
|
+
related_queries?: string[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Add helpful next steps to a successful response
|
|
34
|
+
*/
|
|
35
|
+
export declare function addNextSteps<T>(data: T, nextSteps: NextStep[]): LLMResponse<T>;
|
|
36
|
+
/**
|
|
37
|
+
* Create an LLM-friendly error response with suggestions
|
|
38
|
+
*/
|
|
39
|
+
export declare function createLLMError(error: string, errorType: LLMError["error_type"], options?: {
|
|
40
|
+
suggestions?: string[];
|
|
41
|
+
nextSteps?: NextStep[];
|
|
42
|
+
didYouMean?: string[];
|
|
43
|
+
relatedQueries?: string[];
|
|
44
|
+
}): LLMError;
|
|
45
|
+
/**
|
|
46
|
+
* Add discovery suggestions when returning empty results
|
|
47
|
+
*/
|
|
48
|
+
export declare function addDiscoverySuggestions<T>(data: T[], discoverySteps: NextStep[]): LLMResponse<T[]>;
|
|
49
|
+
/**
|
|
50
|
+
* Common next step templates for cross-server consistency
|
|
51
|
+
*/
|
|
52
|
+
export declare const CommonNextSteps: {
|
|
53
|
+
discoverResources: {
|
|
54
|
+
action: string;
|
|
55
|
+
description: string;
|
|
56
|
+
tool: string;
|
|
57
|
+
parameters: {
|
|
58
|
+
include_resource_ids: boolean;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
narrowResults: (currentCount: number, suggestedFilters: string[]) => {
|
|
62
|
+
action: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
exploreRelated: (relatedTool: string, description: string) => {
|
|
66
|
+
action: string;
|
|
67
|
+
description: string;
|
|
68
|
+
tool: string;
|
|
69
|
+
};
|
|
70
|
+
refineSearch: (suggestions: string[]) => {
|
|
71
|
+
action: string;
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
package/dist/utils.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export function sanitizeGroupId(groupId) {
|
|
2
|
+
if (!groupId) {
|
|
3
|
+
throw new Error("groupId parameter is required and cannot be null or undefined");
|
|
4
|
+
}
|
|
2
5
|
return groupId.replace(/[^a-zA-Z0-9.-]/g, "");
|
|
3
6
|
}
|
|
4
7
|
export function formatApiUrl(version, endpoint) {
|
|
@@ -13,3 +16,65 @@ export function handleApiError(error) {
|
|
|
13
16
|
}
|
|
14
17
|
return error.message || "Unknown API error";
|
|
15
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Add helpful next steps to a successful response
|
|
21
|
+
*/
|
|
22
|
+
export function addNextSteps(data, nextSteps) {
|
|
23
|
+
return {
|
|
24
|
+
data,
|
|
25
|
+
next_steps: nextSteps,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Create an LLM-friendly error response with suggestions
|
|
30
|
+
*/
|
|
31
|
+
export function createLLMError(error, errorType, options = {}) {
|
|
32
|
+
return {
|
|
33
|
+
error,
|
|
34
|
+
error_type: errorType,
|
|
35
|
+
...options,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Add discovery suggestions when returning empty results
|
|
40
|
+
*/
|
|
41
|
+
export function addDiscoverySuggestions(data, discoverySteps) {
|
|
42
|
+
if (data.length === 0) {
|
|
43
|
+
return {
|
|
44
|
+
data,
|
|
45
|
+
count: 0,
|
|
46
|
+
next_steps: discoverySteps,
|
|
47
|
+
suggestions: [
|
|
48
|
+
"No results found. Try the suggested next steps to discover available options.",
|
|
49
|
+
],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
data,
|
|
54
|
+
count: data.length,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Common next step templates for cross-server consistency
|
|
59
|
+
*/
|
|
60
|
+
export const CommonNextSteps = {
|
|
61
|
+
discoverResources: {
|
|
62
|
+
action: "discover_resources",
|
|
63
|
+
description: "Find available compute resources to filter by",
|
|
64
|
+
tool: "search_resources",
|
|
65
|
+
parameters: { include_resource_ids: true },
|
|
66
|
+
},
|
|
67
|
+
narrowResults: (currentCount, suggestedFilters) => ({
|
|
68
|
+
action: "narrow_results",
|
|
69
|
+
description: `Currently showing ${currentCount} results. Add filters to narrow down: ${suggestedFilters.join(", ")}`,
|
|
70
|
+
}),
|
|
71
|
+
exploreRelated: (relatedTool, description) => ({
|
|
72
|
+
action: "explore_related",
|
|
73
|
+
description,
|
|
74
|
+
tool: relatedTool,
|
|
75
|
+
}),
|
|
76
|
+
refineSearch: (suggestions) => ({
|
|
77
|
+
action: "refine_search",
|
|
78
|
+
description: `Try these refinements: ${suggestions.join(", ")}`,
|
|
79
|
+
}),
|
|
80
|
+
};
|