cloudgpu-mcp 0.16.6 → 0.16.7

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/README.md CHANGED
@@ -182,6 +182,7 @@ The server also provides a `train_on_cloudgpu` prompt.
182
182
  - **Bounded local MCP inputs.** A tool call may contain at most 10,000 combined array entries and object members, including nested values. Larger calls are rejected before tool-schema validation or API/SSH handlers. This includes inline ComfyUI workflows; simplify oversized workflows rather than splitting a paid operation or silently dropping fields. The stdio transport also retains its 10 MiB buffered-input limit. These are local MCP limits, not a claim about the remote service.
183
183
 
184
184
  - **A quote first.** `create_instance` only takes a `quote_id` from `estimate_cost` and `user_confirmed=true`.
185
+ - **Restoring a Workspace on a new rental.** Set `workspace_restore_required: true` in `estimate_cost` and use its confirmed quote for `create_instance`. A `workspace_route_unavailable` response means review another configuration or region before renting. Transfer rates vary by route. Managed Jobs bind this requirement automatically when given `workspace_version_id`.
185
186
  - **Server-side limits.** Every instance is created with `max_spend_usd`, `max_hours` and an idle limit (60 minutes by default). CloudGPU's servers check them and destroy the instance when one is hit, even if your client has disconnected or your laptop is asleep.
186
187
  - **Your own ceiling.** `CLOUDGPU_MAX_SPEND_USD` and `CLOUDGPU_MAX_HOURS` cap what the agent may set.
187
188
  - **Results before shutdown.** After commands have run, `stop_instance` refuses until something has been downloaded, unless the user confirms `force=true`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudgpu-mcp",
3
- "version": "0.16.6",
3
+ "version": "0.16.7",
4
4
  "mcpName": "io.github.cloudgpu-app/cloudgpu-mcp",
5
5
  "description": "MCP server and command-line tool for cloudgpu.app: let Claude Code, Cursor, Cline, opencode, goose and other MCP clients (or you, from a terminal) rent a GPU with explicit billing quotes, run a job, fetch the results and shut it down, with spending limits the platform enforces.",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -42,7 +42,7 @@ import {
42
42
  shq,
43
43
  } from "./guards.js";
44
44
 
45
- const VERSION = "0.16.6";
45
+ const VERSION = "0.16.7";
46
46
  const HERE = path.dirname(fileURLToPath(import.meta.url));
47
47
  const RULES = fs.readFileSync(path.join(HERE, "..", "rules", "cloudgpu.md"), "utf8");
48
48
 
@@ -239,11 +239,12 @@ server.registerTool(
239
239
  gpu_model: z.string().describe("GPU model exactly as list_gpus returns it"),
240
240
  gpu_count: z.number().int().min(1).max(8).default(1),
241
241
  hours: z.number().positive().describe("Expected run time in hours"),
242
+ workspace_restore_required: z.boolean().optional().describe("Reserve a rental for restoring a saved Workspace. Excludes suppliers with known impaired restore routes."),
242
243
  template: z.string().optional().describe("Template id from list_templates; omit for a plain GPU with Python and CUDA"),
243
244
  },
244
245
  annotations: { readOnlyHint: true, openWorldHint: true },
245
246
  },
246
- wrap(async ({ gpu_model, gpu_count = 1, hours, template, continent }) => {
247
+ wrap(async ({ gpu_model, gpu_count = 1, hours, template, continent, workspace_restore_required }) => {
247
248
  const [offers, account] = await Promise.all([api.offers(), api.account().catch(() => null)]);
248
249
  const offer = offers.find((o) => String(o.gpu_model).toLowerCase() === gpu_model.toLowerCase());
249
250
  if (!offer) {
@@ -252,7 +253,10 @@ server.registerTool(
252
253
  if (gpu_count < (offer.min_gpu_count || 1)) {
253
254
  return fail(`${offer.gpu_model} is rented in groups of at least ${offer.min_gpu_count} GPUs.`);
254
255
  }
255
- const billing = await api.rentalBillingQuote({gpuModel:offer.gpu_model,gpuCount:gpu_count,...(continent?{continent}:{}),...(template?{templateId:template}:{})});
256
+ const billing = await api.rentalBillingQuote({gpuModel:offer.gpu_model,gpuCount:gpu_count,...(continent?{continent}:{}),...(template?{templateId:template}:{}),...(workspace_restore_required?{workspaceRestoreRequired:true}:{})});
257
+ if (workspace_restore_required && billing.workspaceRestoreRequired !== true) {
258
+ return fail("workspace_route_unavailable: Select another configuration or region before renting for this Workspace.");
259
+ }
256
260
  if(continent&&billing.continent!==continent)return fail("The billing quote did not bind the requested continent. No rental was started.");
257
261
  const {hourly,increment,estimate}=rentalBilling(billing,hours);
258
262
  const balance = account ? Number(account.balance_usd) : null;
@@ -267,6 +271,7 @@ server.registerTool(
267
271
  const quote_id = quotes.put({ continent, gpu_model: offer.gpu_model, gpu_count, template, hourly, hours, estimate, billingQuoteId:billing.billingQuoteId, billingExpiresAt:billing.expiresAt, minimumChargeUsd:Number(billing.minimumChargeUsd), billingIncrementSeconds:increment });
268
272
  return ok({
269
273
  quote_id,
274
+ ...(workspace_restore_required?{workspace_restore_required:true}:{}),
270
275
  continent:continent||null,
271
276
  gpu_model: offer.gpu_model,
272
277
  gpu_count,