@burdenoff/mcp-libs 2026.629.1 → 2026.703.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.
@@ -1218,6 +1218,221 @@ var DELETE_AUDIT_LOG = `
1218
1218
  deleteVibeAuditLog(id: $id, reason: $reason)
1219
1219
  }
1220
1220
  `;
1221
+ var SANDBOX_FIELDS = `
1222
+ id name description template mode status
1223
+ crdName podName namespace runtimeClass
1224
+ containers { name image ports { containerPort name protocol } env { name value } command args resources { requestsCpu requestsMemory limitsCpu limitsMemory } }
1225
+ containerStatuses { name ready port restartCount }
1226
+ resources { cpuRequest cpuLimit memoryRequest memoryLimit }
1227
+ storage { mode sizeGi mountPath retainOnDelete }
1228
+ network { exposeService internalUrl containerUrls serviceName }
1229
+ ttlSeconds expiresAt metadata errorMessage
1230
+ workspaceId createdBy createdAt updatedAt stoppedAt
1231
+ `;
1232
+ var LIST_SANDBOXES = `
1233
+ query ListSandboxes($filter: SandboxFilterInput, $pagination: SandboxPaginationInput, $context: ContextInput!) {
1234
+ listSandboxes(filter: $filter, pagination: $pagination, context: $context) {
1235
+ items { ${SANDBOX_FIELDS} }
1236
+ total hasMore
1237
+ }
1238
+ }
1239
+ `;
1240
+ var GET_SANDBOX = `
1241
+ query GetSandbox($id: ID!, $context: ContextInput!) {
1242
+ getSandbox(id: $id, context: $context) { ${SANDBOX_FIELDS} }
1243
+ }
1244
+ `;
1245
+ var CREATE_SANDBOX = `
1246
+ mutation CreateSandbox($input: CreateSandboxInput!) {
1247
+ createSandbox(input: $input) { ${SANDBOX_FIELDS} }
1248
+ }
1249
+ `;
1250
+ var DELETE_SANDBOX = `
1251
+ mutation DeleteSandbox($id: ID!, $context: ContextInput!) {
1252
+ deleteSandbox(id: $id, context: $context)
1253
+ }
1254
+ `;
1255
+ var STOP_SANDBOX = `
1256
+ mutation StopSandbox($id: ID!, $context: ContextInput!) {
1257
+ stopSandbox(id: $id, context: $context) { ${SANDBOX_FIELDS} }
1258
+ }
1259
+ `;
1260
+ var START_SANDBOX = `
1261
+ mutation StartSandbox($id: ID!, $context: ContextInput!) {
1262
+ startSandbox(id: $id, context: $context) { ${SANDBOX_FIELDS} }
1263
+ }
1264
+ `;
1265
+ var EXTEND_SANDBOX_TTL = `
1266
+ mutation ExtendSandboxTTL($id: ID!, $additionalSeconds: Int!, $context: ContextInput!) {
1267
+ extendSandboxTTL(id: $id, additionalSeconds: $additionalSeconds, context: $context) { ${SANDBOX_FIELDS} }
1268
+ }
1269
+ `;
1270
+ var SANDBOX_TEMPLATE_FIELDS = `
1271
+ id name description template isDefault ttlSeconds
1272
+ containers { name image }
1273
+ resources { cpuRequest cpuLimit memoryRequest memoryLimit }
1274
+ storage { mode sizeGi mountPath retainOnDelete }
1275
+ config metadata allowedImages
1276
+ workspaceId createdBy createdAt updatedAt
1277
+ `;
1278
+ var LIST_SANDBOX_TEMPLATES = `
1279
+ query ListSandboxTemplates($context: ContextInput!, $template: SandboxTemplate, $pagination: SandboxPaginationInput) {
1280
+ listSandboxTemplates(context: $context, template: $template, pagination: $pagination) {
1281
+ items { ${SANDBOX_TEMPLATE_FIELDS} } total hasMore
1282
+ }
1283
+ }
1284
+ `;
1285
+ var GET_SANDBOX_TEMPLATE = `
1286
+ query GetSandboxTemplate($context: ContextInput!, $id: ID!) {
1287
+ getSandboxTemplate(context: $context, id: $id) { ${SANDBOX_TEMPLATE_FIELDS} }
1288
+ }
1289
+ `;
1290
+ var CREATE_SANDBOX_TEMPLATE = `
1291
+ mutation CreateSandboxTemplate($input: CreateSandboxTemplateInput!) {
1292
+ createSandboxTemplate(input: $input) { ${SANDBOX_TEMPLATE_FIELDS} }
1293
+ }
1294
+ `;
1295
+ var UPDATE_SANDBOX_TEMPLATE = `
1296
+ mutation UpdateSandboxTemplate($input: UpdateSandboxTemplateInput!) {
1297
+ updateSandboxTemplate(input: $input) { ${SANDBOX_TEMPLATE_FIELDS} }
1298
+ }
1299
+ `;
1300
+ var DELETE_SANDBOX_TEMPLATE = `
1301
+ mutation DeleteSandboxTemplate($context: ContextInput!, $id: ID!) {
1302
+ deleteSandboxTemplate(context: $context, id: $id)
1303
+ }
1304
+ `;
1305
+ var AVAILABLE_SANDBOX_TAGS = `
1306
+ query AvailableSandboxTags($query: String, $limit: Int) {
1307
+ availableSandboxTags(query: $query, limit: $limit) { id key label color }
1308
+ }
1309
+ `;
1310
+ var GET_SANDBOX_TAGS = `
1311
+ query GetSandboxTags($input: GetSandboxTagsInput!) {
1312
+ getSandboxTags(input: $input) {
1313
+ id entityId entityType tagId source assignedAt assignedBy
1314
+ }
1315
+ }
1316
+ `;
1317
+ var CREATE_SANDBOX_TAG = `
1318
+ mutation CreateSandboxTag($input: CreateSandboxTagInput!) {
1319
+ createSandboxTag(input: $input) { id key label color }
1320
+ }
1321
+ `;
1322
+ var TAG_SANDBOX = `
1323
+ mutation TagSandbox($input: TagSandboxInput!) {
1324
+ tagSandbox(input: $input) {
1325
+ id entityId tagId source assignedAt
1326
+ }
1327
+ }
1328
+ `;
1329
+ var UNTAG_SANDBOX = `
1330
+ mutation UntagSandbox($input: UntagSandboxInput!) {
1331
+ untagSandbox(input: $input)
1332
+ }
1333
+ `;
1334
+ var REPLACE_SANDBOX_TAGS = `
1335
+ mutation ReplaceSandboxTags($input: ReplaceSandboxTagsInput!) {
1336
+ replaceSandboxTags(input: $input) {
1337
+ id entityId tagId source assignedAt
1338
+ }
1339
+ }
1340
+ `;
1341
+ var LIST_ALL_SANDBOXES = `
1342
+ query ListAllSandboxes($context: ContextInput!, $filter: SandboxFilterInput, $pagination: SandboxPaginationInput) {
1343
+ listAllSandboxes(context: $context, filter: $filter, pagination: $pagination) {
1344
+ items { ${SANDBOX_FIELDS} } total hasMore
1345
+ }
1346
+ }
1347
+ `;
1348
+ var LIST_SANDBOX_NODES = `
1349
+ query ListSandboxNodes($context: ContextInput!) {
1350
+ listSandboxNodes(context: $context) {
1351
+ name status allocatableCpu allocatableMemory sandboxPodCount labels
1352
+ }
1353
+ }
1354
+ `;
1355
+ var GET_ACTIVE_SANDBOXES = `
1356
+ query GetActiveSandboxes($context: ContextInput!) {
1357
+ getActiveSandboxes(context: $context) { ${SANDBOX_FIELDS} }
1358
+ }
1359
+ `;
1360
+ var GET_RECENT_SANDBOX_ACTIVITY = `
1361
+ query GetRecentSandboxActivity($context: ContextInput!, $limit: Int) {
1362
+ getRecentSandboxActivity(context: $context, limit: $limit) {
1363
+ items { id action actorId status sandboxName sandboxId createdAt }
1364
+ total
1365
+ }
1366
+ }
1367
+ `;
1368
+ var GET_SANDBOX_STATS = `
1369
+ query GetSandboxStats($context: ContextInput!) {
1370
+ getSandboxStats(context: $context) {
1371
+ activeSandboxes activeUserSandboxes activeInternalSandboxes
1372
+ totalCreated totalDeleted totalUserCreated totalInternalCreated
1373
+ runningNow provisioningNow stoppedNow expiredCount failedCount
1374
+ totalCpuUsed totalMemoryUsed
1375
+ }
1376
+ }
1377
+ `;
1378
+ var GET_SANDBOX_LOGS = `
1379
+ query GetSandboxLogs($context: ContextInput!, $id: ID!, $containerName: String!, $tailLines: Int) {
1380
+ getSandboxLogs(context: $context, id: $id, containerName: $containerName, tailLines: $tailLines)
1381
+ }
1382
+ `;
1383
+ var GET_SANDBOX_CONFIG = `
1384
+ query GetSandboxConfig($context: ContextInput!) {
1385
+ getSandboxConfig(context: $context) {
1386
+ id defaultTtlSeconds maxTtlSeconds allowedTemplates
1387
+ maxConcurrentPerUser maxConcurrentPerWorkspace
1388
+ defaultCpuRequest defaultCpuLimit defaultMemoryRequest defaultMemoryLimit
1389
+ workspaceId updatedAt
1390
+ }
1391
+ }
1392
+ `;
1393
+ var UPDATE_SANDBOX_CONFIG = `
1394
+ mutation UpdateSandboxConfig($input: UpdateSandboxConfigInput!) {
1395
+ updateSandboxConfig(input: $input) {
1396
+ id defaultTtlSeconds maxTtlSeconds allowedTemplates
1397
+ maxConcurrentPerUser maxConcurrentPerWorkspace
1398
+ defaultCpuRequest defaultCpuLimit defaultMemoryRequest defaultMemoryLimit
1399
+ workspaceId updatedAt
1400
+ }
1401
+ }
1402
+ `;
1403
+ var SANDBOX_EXPORT_JOB_FIELDS = `
1404
+ id workspaceId format status requestedBy rowCount
1405
+ downloadUrl errorMessage expiresAt createdAt updatedAt
1406
+ `;
1407
+ var EXPORT_SANDBOXES = `
1408
+ mutation ExportSandboxes($input: ExportSandboxesInput!) {
1409
+ exportSandboxes(input: $input) { ${SANDBOX_EXPORT_JOB_FIELDS} }
1410
+ }
1411
+ `;
1412
+ var GET_SANDBOX_EXPORT_JOB = `
1413
+ query GetSandboxExportJob($workspaceId: ID!, $jobId: ID!, $context: ContextInput!) {
1414
+ getSandboxExportJob(workspaceId: $workspaceId, jobId: $jobId, context: $context) {
1415
+ ${SANDBOX_EXPORT_JOB_FIELDS}
1416
+ }
1417
+ }
1418
+ `;
1419
+ var LIST_SANDBOX_EXPORT_JOBS = `
1420
+ query ListSandboxExportJobs($workspaceId: ID!, $context: ContextInput!, $pagination: SandboxPaginationInput) {
1421
+ listSandboxExportJobs(workspaceId: $workspaceId, context: $context, pagination: $pagination) {
1422
+ ${SANDBOX_EXPORT_JOB_FIELDS}
1423
+ }
1424
+ }
1425
+ `;
1426
+ var GET_SANDBOX_ARTIFACT_BYTES = `
1427
+ query GetSandboxArtifactBytes($input: SandboxArtifactBytesInput!) {
1428
+ getSandboxArtifactBytes(input: $input) { filename mimeType size contentBase64 }
1429
+ }
1430
+ `;
1431
+ var PROXY_SANDBOX_REQUEST = `
1432
+ mutation ProxySandboxRequest($input: ProxySandboxRequestInput!) {
1433
+ proxySandboxRequest(input: $input) { status body }
1434
+ }
1435
+ `;
1221
1436
  var VIBECONTROLS_ANALYTICS = `
1222
1437
  query VibecontrolsAnalytics($input: VibecontrolsAnalyticsInput!) {
1223
1438
  vibecontrolsAnalytics(input: $input) {
@@ -7566,6 +7781,638 @@ function registerTunnelTools(server, ctx, track) {
7566
7781
  }
7567
7782
  );
7568
7783
  }
7784
+ var NO_WORKSPACE = "No workspace set. Run the auth workspace_set tool first.";
7785
+ var sandboxTemplate = zod.z.enum([
7786
+ "AI_BUILDER",
7787
+ "WORKFLOW_MULTI_NODE",
7788
+ "MISC_SHELL",
7789
+ "CUSTOM",
7790
+ "VIBECONTROLS"
7791
+ ]);
7792
+ var sandboxStatus = zod.z.enum([
7793
+ "PENDING",
7794
+ "PROVISIONING",
7795
+ "RUNNING",
7796
+ "STOPPING",
7797
+ "STOPPED",
7798
+ "EXPIRED",
7799
+ "FAILED"
7800
+ ]);
7801
+ var sandboxMode = zod.z.enum(["DEPLOYMENT", "JOB"]);
7802
+ var storageMode = zod.z.enum(["NONE", "EPHEMERAL", "PERSISTENT"]);
7803
+ var sandboxExportFormat = zod.z.enum(["CSV", "JSON"]);
7804
+ var resourcesSchema = zod.z.object({
7805
+ cpuRequest: zod.z.string().optional(),
7806
+ cpuLimit: zod.z.string().optional(),
7807
+ memoryRequest: zod.z.string().optional(),
7808
+ memoryLimit: zod.z.string().optional()
7809
+ });
7810
+ var storageSchema = zod.z.object({
7811
+ mode: storageMode.optional().describe("Storage mode: NONE, EPHEMERAL, PERSISTENT"),
7812
+ sizeGi: zod.z.number().optional(),
7813
+ mountPath: zod.z.string().optional(),
7814
+ retainOnDelete: zod.z.boolean().optional()
7815
+ });
7816
+ var containersSchema = zod.z.array(zod.z.record(zod.z.unknown())).describe(
7817
+ "Container specs: [{ name, image, ports?[{ containerPort, name?, protocol? }], env?[{ name, value }], command?[], args?[], resources?{ requestsCpu, requestsMemory, limitsCpu, limitsMemory } }]"
7818
+ );
7819
+ function registerSandboxTools(server, ctx, track) {
7820
+ const w = ctx.gql.workspace;
7821
+ const tool = (name, title, description, inputSchema, handler) => {
7822
+ server.registerTool(
7823
+ track(mcpToolName(ctx.productName, name)),
7824
+ { title, description, inputSchema },
7825
+ async (args) => {
7826
+ try {
7827
+ const data = await handler(args);
7828
+ return jsonResult(data);
7829
+ } catch (error) {
7830
+ ctx.logger.error(`vibecontrols_${name} failed`, { error });
7831
+ return errorResult(`Failed: ${error instanceof Error ? error.message : String(error)}`);
7832
+ }
7833
+ }
7834
+ );
7835
+ };
7836
+ const readWorkspaceId = () => {
7837
+ const auth = ctx.auth.read();
7838
+ return auth?.workspaceId;
7839
+ };
7840
+ tool(
7841
+ "sandboxes_list",
7842
+ "List Sandboxes",
7843
+ "List sandboxes in the current workspace with optional template/status filters.",
7844
+ {
7845
+ template: sandboxTemplate.optional(),
7846
+ status: sandboxStatus.optional(),
7847
+ limit: zod.z.number().optional(),
7848
+ offset: zod.z.number().optional(),
7849
+ page: zod.z.number().optional()
7850
+ },
7851
+ async ({ template, status, limit, offset, page }) => {
7852
+ const workspaceId = readWorkspaceId();
7853
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
7854
+ const filter = {};
7855
+ if (template !== void 0) filter.template = template;
7856
+ if (status !== void 0) filter.status = status;
7857
+ const pagination = {};
7858
+ if (limit !== void 0) pagination.limit = limit;
7859
+ if (offset !== void 0) pagination.offset = offset;
7860
+ if (page !== void 0) pagination.page = page;
7861
+ const data = await w.request(LIST_SANDBOXES, {
7862
+ filter: Object.keys(filter).length ? filter : void 0,
7863
+ pagination: Object.keys(pagination).length ? pagination : void 0,
7864
+ context: { workspaceId }
7865
+ });
7866
+ return data.listSandboxes;
7867
+ }
7868
+ );
7869
+ tool(
7870
+ "sandboxes_get",
7871
+ "Get Sandbox",
7872
+ "Get a sandbox by ID.",
7873
+ { id: zod.z.string().describe("Sandbox ID") },
7874
+ async ({ id }) => {
7875
+ const workspaceId = readWorkspaceId();
7876
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
7877
+ const data = await w.request(GET_SANDBOX, {
7878
+ id,
7879
+ context: { workspaceId }
7880
+ });
7881
+ return data.getSandbox;
7882
+ }
7883
+ );
7884
+ tool(
7885
+ "sandboxes_create",
7886
+ "Create Sandbox",
7887
+ "Create a sandbox from a template + container specs. Workspace context is injected from auth.",
7888
+ {
7889
+ name: zod.z.string(),
7890
+ template: sandboxTemplate,
7891
+ containers: containersSchema,
7892
+ description: zod.z.string().optional(),
7893
+ mode: sandboxMode.optional().describe("Sandbox mode: DEPLOYMENT or JOB"),
7894
+ resources: resourcesSchema.optional(),
7895
+ storage: storageSchema.optional(),
7896
+ ttlSeconds: zod.z.number().optional(),
7897
+ metadata: zod.z.record(zod.z.unknown()).optional(),
7898
+ templateId: zod.z.string().optional()
7899
+ },
7900
+ async (args) => {
7901
+ const workspaceId = readWorkspaceId();
7902
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
7903
+ const input = { ...args, context: { workspaceId } };
7904
+ const data = await w.request(CREATE_SANDBOX, { input });
7905
+ return data.createSandbox;
7906
+ }
7907
+ );
7908
+ tool(
7909
+ "sandboxes_delete",
7910
+ "Delete Sandbox",
7911
+ "Delete a sandbox by ID.",
7912
+ { id: zod.z.string() },
7913
+ async ({ id }) => {
7914
+ const workspaceId = readWorkspaceId();
7915
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
7916
+ const data = await w.request(DELETE_SANDBOX, {
7917
+ id,
7918
+ context: { workspaceId }
7919
+ });
7920
+ return { deleted: data.deleteSandbox, id };
7921
+ }
7922
+ );
7923
+ tool(
7924
+ "sandboxes_start",
7925
+ "Start Sandbox",
7926
+ "Start (resume) a stopped sandbox.",
7927
+ { id: zod.z.string() },
7928
+ async ({ id }) => {
7929
+ const workspaceId = readWorkspaceId();
7930
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
7931
+ const data = await w.request(START_SANDBOX, {
7932
+ id,
7933
+ context: { workspaceId }
7934
+ });
7935
+ return data.startSandbox;
7936
+ }
7937
+ );
7938
+ tool(
7939
+ "sandboxes_stop",
7940
+ "Stop Sandbox",
7941
+ "Stop a running sandbox.",
7942
+ { id: zod.z.string() },
7943
+ async ({ id }) => {
7944
+ const workspaceId = readWorkspaceId();
7945
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
7946
+ const data = await w.request(STOP_SANDBOX, {
7947
+ id,
7948
+ context: { workspaceId }
7949
+ });
7950
+ return data.stopSandbox;
7951
+ }
7952
+ );
7953
+ tool(
7954
+ "sandboxes_extend_ttl",
7955
+ "Extend Sandbox TTL",
7956
+ "Extend a sandbox time-to-live by an additional number of seconds.",
7957
+ {
7958
+ id: zod.z.string(),
7959
+ additionalSeconds: zod.z.number().describe("Seconds to add to the current TTL")
7960
+ },
7961
+ async ({ id, additionalSeconds }) => {
7962
+ const workspaceId = readWorkspaceId();
7963
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
7964
+ const data = await w.request(EXTEND_SANDBOX_TTL, {
7965
+ id,
7966
+ additionalSeconds,
7967
+ context: { workspaceId }
7968
+ });
7969
+ return data.extendSandboxTTL;
7970
+ }
7971
+ );
7972
+ tool(
7973
+ "sandboxes_get_config",
7974
+ "Get Sandbox Config",
7975
+ "Get the sandbox provisioning config (TTL/concurrency/resource defaults) for the workspace.",
7976
+ {},
7977
+ async () => {
7978
+ const workspaceId = readWorkspaceId();
7979
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
7980
+ const data = await w.request(GET_SANDBOX_CONFIG, {
7981
+ context: { workspaceId }
7982
+ });
7983
+ return data.getSandboxConfig;
7984
+ }
7985
+ );
7986
+ tool(
7987
+ "sandboxes_update_config",
7988
+ "Update Sandbox Config",
7989
+ "Update the workspace sandbox config. Workspace context is injected from auth.",
7990
+ {
7991
+ defaultTtlSeconds: zod.z.number().optional(),
7992
+ maxTtlSeconds: zod.z.number().optional(),
7993
+ allowedTemplates: zod.z.array(sandboxTemplate).optional(),
7994
+ maxConcurrentPerUser: zod.z.number().optional(),
7995
+ maxConcurrentPerWorkspace: zod.z.number().optional(),
7996
+ defaultCpuRequest: zod.z.string().optional(),
7997
+ defaultCpuLimit: zod.z.string().optional(),
7998
+ defaultMemoryRequest: zod.z.string().optional(),
7999
+ defaultMemoryLimit: zod.z.string().optional()
8000
+ },
8001
+ async (args) => {
8002
+ const workspaceId = readWorkspaceId();
8003
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8004
+ const input = { ...args, context: { workspaceId } };
8005
+ const data = await w.request(UPDATE_SANDBOX_CONFIG, {
8006
+ input
8007
+ });
8008
+ return data.updateSandboxConfig;
8009
+ }
8010
+ );
8011
+ tool(
8012
+ "sandboxes_get_stats",
8013
+ "Get Sandbox Stats",
8014
+ "Get aggregate sandbox statistics for the workspace.",
8015
+ {},
8016
+ async () => {
8017
+ const workspaceId = readWorkspaceId();
8018
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8019
+ const data = await w.request(GET_SANDBOX_STATS, {
8020
+ context: { workspaceId }
8021
+ });
8022
+ return data.getSandboxStats;
8023
+ }
8024
+ );
8025
+ tool(
8026
+ "sandboxes_get_logs",
8027
+ "Get Sandbox Logs",
8028
+ "Fetch container logs for a sandbox.",
8029
+ {
8030
+ id: zod.z.string(),
8031
+ containerName: zod.z.string(),
8032
+ tailLines: zod.z.number().optional().describe("Number of trailing log lines to return")
8033
+ },
8034
+ async ({ id, containerName, tailLines }) => {
8035
+ const workspaceId = readWorkspaceId();
8036
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8037
+ const data = await w.request(GET_SANDBOX_LOGS, {
8038
+ context: { workspaceId },
8039
+ id,
8040
+ containerName,
8041
+ tailLines
8042
+ });
8043
+ return data.getSandboxLogs;
8044
+ }
8045
+ );
8046
+ tool(
8047
+ "sandboxes_tags_attach",
8048
+ "Tag Sandbox",
8049
+ "Attach an existing tag to a sandbox.",
8050
+ {
8051
+ sandboxId: zod.z.string(),
8052
+ tagId: zod.z.string(),
8053
+ source: zod.z.string().optional(),
8054
+ validFrom: zod.z.string().optional(),
8055
+ validTo: zod.z.string().optional(),
8056
+ metadata: zod.z.record(zod.z.unknown()).optional()
8057
+ },
8058
+ async (args) => {
8059
+ const data = await w.request(TAG_SANDBOX, { input: args });
8060
+ return data.tagSandbox;
8061
+ }
8062
+ );
8063
+ tool(
8064
+ "sandboxes_tags_detach",
8065
+ "Untag Sandbox",
8066
+ "Remove a tag from a sandbox.",
8067
+ { sandboxId: zod.z.string(), tagId: zod.z.string() },
8068
+ async (args) => {
8069
+ const data = await w.request(UNTAG_SANDBOX, { input: args });
8070
+ return data.untagSandbox;
8071
+ }
8072
+ );
8073
+ tool(
8074
+ "sandboxes_tags_get",
8075
+ "Get Sandbox Tags",
8076
+ "Get all tag assignments for a sandbox.",
8077
+ { sandboxId: zod.z.string() },
8078
+ async (args) => {
8079
+ const data = await w.request(GET_SANDBOX_TAGS, { input: args });
8080
+ return data.getSandboxTags;
8081
+ }
8082
+ );
8083
+ tool(
8084
+ "sandboxes_tags_replace",
8085
+ "Replace Sandbox Tags",
8086
+ "Replace the full set of tags on a sandbox with the provided tag IDs.",
8087
+ { sandboxId: zod.z.string(), tagIds: zod.z.array(zod.z.string()) },
8088
+ async (args) => {
8089
+ const data = await w.request(REPLACE_SANDBOX_TAGS, {
8090
+ input: args
8091
+ });
8092
+ return data.replaceSandboxTags;
8093
+ }
8094
+ );
8095
+ tool(
8096
+ "sandboxes_tags_create",
8097
+ "Create Sandbox Tag",
8098
+ "Create a new sandbox tag definition.",
8099
+ { label: zod.z.string(), color: zod.z.string().optional() },
8100
+ async (args) => {
8101
+ const data = await w.request(CREATE_SANDBOX_TAG, {
8102
+ input: args
8103
+ });
8104
+ return data.createSandboxTag;
8105
+ }
8106
+ );
8107
+ tool(
8108
+ "sandboxes_tags_available",
8109
+ "Available Sandbox Tags",
8110
+ "List available sandbox tags, optionally filtered by a search query.",
8111
+ {
8112
+ query: zod.z.string().optional(),
8113
+ limit: zod.z.number().optional()
8114
+ },
8115
+ async ({ query, limit }) => {
8116
+ const data = await w.request(AVAILABLE_SANDBOX_TAGS, {
8117
+ query,
8118
+ limit
8119
+ });
8120
+ return data.availableSandboxTags;
8121
+ }
8122
+ );
8123
+ tool(
8124
+ "sandboxes_templates_list",
8125
+ "List Sandbox Templates",
8126
+ "List sandbox template configs, optionally filtered by template type.",
8127
+ {
8128
+ template: sandboxTemplate.optional(),
8129
+ limit: zod.z.number().optional(),
8130
+ offset: zod.z.number().optional(),
8131
+ page: zod.z.number().optional()
8132
+ },
8133
+ async ({ template, limit, offset, page }) => {
8134
+ const workspaceId = readWorkspaceId();
8135
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8136
+ const pagination = {};
8137
+ if (limit !== void 0) pagination.limit = limit;
8138
+ if (offset !== void 0) pagination.offset = offset;
8139
+ if (page !== void 0) pagination.page = page;
8140
+ const data = await w.request(LIST_SANDBOX_TEMPLATES, {
8141
+ context: { workspaceId },
8142
+ template,
8143
+ pagination: Object.keys(pagination).length ? pagination : void 0
8144
+ });
8145
+ return data.listSandboxTemplates;
8146
+ }
8147
+ );
8148
+ tool(
8149
+ "sandboxes_templates_get",
8150
+ "Get Sandbox Template",
8151
+ "Get a sandbox template config by ID.",
8152
+ { id: zod.z.string() },
8153
+ async ({ id }) => {
8154
+ const workspaceId = readWorkspaceId();
8155
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8156
+ const data = await w.request(GET_SANDBOX_TEMPLATE, {
8157
+ context: { workspaceId },
8158
+ id
8159
+ });
8160
+ return data.getSandboxTemplate;
8161
+ }
8162
+ );
8163
+ tool(
8164
+ "sandboxes_templates_create",
8165
+ "Create Sandbox Template",
8166
+ "Create a reusable sandbox template config. Workspace context is injected from auth.",
8167
+ {
8168
+ name: zod.z.string(),
8169
+ template: sandboxTemplate,
8170
+ description: zod.z.string().optional(),
8171
+ isDefault: zod.z.boolean().optional(),
8172
+ containers: containersSchema.optional(),
8173
+ resources: resourcesSchema.optional(),
8174
+ storage: storageSchema.optional(),
8175
+ ttlSeconds: zod.z.number().optional(),
8176
+ config: zod.z.record(zod.z.unknown()).optional(),
8177
+ metadata: zod.z.record(zod.z.unknown()).optional(),
8178
+ allowedImages: zod.z.array(zod.z.string()).optional()
8179
+ },
8180
+ async (args) => {
8181
+ const workspaceId = readWorkspaceId();
8182
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8183
+ const input = { ...args, context: { workspaceId } };
8184
+ const data = await w.request(CREATE_SANDBOX_TEMPLATE, {
8185
+ input
8186
+ });
8187
+ return data.createSandboxTemplate;
8188
+ }
8189
+ );
8190
+ tool(
8191
+ "sandboxes_templates_update",
8192
+ "Update Sandbox Template",
8193
+ "Update an existing sandbox template config. Workspace context is injected from auth.",
8194
+ {
8195
+ id: zod.z.string(),
8196
+ name: zod.z.string().optional(),
8197
+ description: zod.z.string().optional(),
8198
+ isDefault: zod.z.boolean().optional(),
8199
+ containers: containersSchema.optional(),
8200
+ resources: resourcesSchema.optional(),
8201
+ storage: storageSchema.optional(),
8202
+ ttlSeconds: zod.z.number().optional(),
8203
+ config: zod.z.record(zod.z.unknown()).optional(),
8204
+ metadata: zod.z.record(zod.z.unknown()).optional(),
8205
+ allowedImages: zod.z.array(zod.z.string()).optional()
8206
+ },
8207
+ async (args) => {
8208
+ const workspaceId = readWorkspaceId();
8209
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8210
+ const input = { ...args, context: { workspaceId } };
8211
+ const data = await w.request(UPDATE_SANDBOX_TEMPLATE, {
8212
+ input
8213
+ });
8214
+ return data.updateSandboxTemplate;
8215
+ }
8216
+ );
8217
+ tool(
8218
+ "sandboxes_templates_delete",
8219
+ "Delete Sandbox Template",
8220
+ "Delete a sandbox template config by ID.",
8221
+ { id: zod.z.string() },
8222
+ async ({ id }) => {
8223
+ const workspaceId = readWorkspaceId();
8224
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8225
+ const data = await w.request(DELETE_SANDBOX_TEMPLATE, {
8226
+ context: { workspaceId },
8227
+ id
8228
+ });
8229
+ return { deleted: data.deleteSandboxTemplate, id };
8230
+ }
8231
+ );
8232
+ tool(
8233
+ "sandboxes_export_create",
8234
+ "Export Sandboxes",
8235
+ "Start an async export job of sandboxes. Workspace + context injected from auth.",
8236
+ {
8237
+ format: sandboxExportFormat.describe("Export format: CSV or JSON"),
8238
+ template: sandboxTemplate.optional().describe("Filter: template type"),
8239
+ status: sandboxStatus.optional().describe("Filter: sandbox status"),
8240
+ includeUsageEvents: zod.z.boolean().optional()
8241
+ },
8242
+ async ({ format, template, status, includeUsageEvents }) => {
8243
+ const workspaceId = readWorkspaceId();
8244
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8245
+ const filter = {};
8246
+ if (template !== void 0) filter.template = template;
8247
+ if (status !== void 0) filter.status = status;
8248
+ const input = {
8249
+ workspaceId,
8250
+ format,
8251
+ context: { workspaceId }
8252
+ };
8253
+ if (includeUsageEvents !== void 0) input.includeUsageEvents = includeUsageEvents;
8254
+ if (Object.keys(filter).length) input.filter = filter;
8255
+ const data = await w.request(EXPORT_SANDBOXES, { input });
8256
+ return data.exportSandboxes;
8257
+ }
8258
+ );
8259
+ tool(
8260
+ "sandboxes_export_get",
8261
+ "Get Sandbox Export Job",
8262
+ "Get a sandbox export job by ID.",
8263
+ { jobId: zod.z.string() },
8264
+ async ({ jobId }) => {
8265
+ const workspaceId = readWorkspaceId();
8266
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8267
+ const data = await w.request(GET_SANDBOX_EXPORT_JOB, {
8268
+ workspaceId,
8269
+ jobId,
8270
+ context: { workspaceId }
8271
+ });
8272
+ return data.getSandboxExportJob;
8273
+ }
8274
+ );
8275
+ tool(
8276
+ "sandboxes_export_list",
8277
+ "List Sandbox Export Jobs",
8278
+ "List sandbox export jobs for the workspace.",
8279
+ {
8280
+ limit: zod.z.number().optional(),
8281
+ offset: zod.z.number().optional(),
8282
+ page: zod.z.number().optional()
8283
+ },
8284
+ async ({ limit, offset, page }) => {
8285
+ const workspaceId = readWorkspaceId();
8286
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8287
+ const pagination = {};
8288
+ if (limit !== void 0) pagination.limit = limit;
8289
+ if (offset !== void 0) pagination.offset = offset;
8290
+ if (page !== void 0) pagination.page = page;
8291
+ const data = await w.request(LIST_SANDBOX_EXPORT_JOBS, {
8292
+ workspaceId,
8293
+ context: { workspaceId },
8294
+ pagination: Object.keys(pagination).length ? pagination : void 0
8295
+ });
8296
+ return data.listSandboxExportJobs;
8297
+ }
8298
+ );
8299
+ tool(
8300
+ "sandboxes_export_get_artifact_bytes",
8301
+ "Get Sandbox Artifact Bytes",
8302
+ "Fetch raw bytes (base64) of a file artifact from a sandbox session. Context injected from auth.",
8303
+ {
8304
+ sandboxId: zod.z.string(),
8305
+ sessionId: zod.z.string(),
8306
+ path: zod.z.string().describe("Path of the artifact file inside the sandbox"),
8307
+ onBehalfOfUserId: zod.z.string().optional()
8308
+ },
8309
+ async (args) => {
8310
+ const workspaceId = readWorkspaceId();
8311
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8312
+ const input = { ...args, context: { workspaceId } };
8313
+ const data = await w.request(
8314
+ GET_SANDBOX_ARTIFACT_BYTES,
8315
+ {
8316
+ input
8317
+ }
8318
+ );
8319
+ return data.getSandboxArtifactBytes;
8320
+ }
8321
+ );
8322
+ tool(
8323
+ "sandboxes_admin_get_active",
8324
+ "Get Active Sandboxes",
8325
+ "Admin: list all currently active sandboxes across the workspace.",
8326
+ {},
8327
+ async () => {
8328
+ const workspaceId = readWorkspaceId();
8329
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8330
+ const data = await w.request(GET_ACTIVE_SANDBOXES, {
8331
+ context: { workspaceId }
8332
+ });
8333
+ return data.getActiveSandboxes;
8334
+ }
8335
+ );
8336
+ tool(
8337
+ "sandboxes_admin_get_recent_activity",
8338
+ "Get Recent Sandbox Activity",
8339
+ "Admin: list recent sandbox activity/audit entries.",
8340
+ { limit: zod.z.number().optional() },
8341
+ async ({ limit }) => {
8342
+ const workspaceId = readWorkspaceId();
8343
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8344
+ const data = await w.request(
8345
+ GET_RECENT_SANDBOX_ACTIVITY,
8346
+ { context: { workspaceId }, limit }
8347
+ );
8348
+ return data.getRecentSandboxActivity;
8349
+ }
8350
+ );
8351
+ tool(
8352
+ "sandboxes_admin_list_all",
8353
+ "List All Sandboxes",
8354
+ "Admin: list all sandboxes (including other users) with optional filters.",
8355
+ {
8356
+ template: sandboxTemplate.optional(),
8357
+ status: sandboxStatus.optional(),
8358
+ limit: zod.z.number().optional(),
8359
+ offset: zod.z.number().optional(),
8360
+ page: zod.z.number().optional()
8361
+ },
8362
+ async ({ template, status, limit, offset, page }) => {
8363
+ const workspaceId = readWorkspaceId();
8364
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8365
+ const filter = {};
8366
+ if (template !== void 0) filter.template = template;
8367
+ if (status !== void 0) filter.status = status;
8368
+ const pagination = {};
8369
+ if (limit !== void 0) pagination.limit = limit;
8370
+ if (offset !== void 0) pagination.offset = offset;
8371
+ if (page !== void 0) pagination.page = page;
8372
+ const data = await w.request(LIST_ALL_SANDBOXES, {
8373
+ context: { workspaceId },
8374
+ filter: Object.keys(filter).length ? filter : void 0,
8375
+ pagination: Object.keys(pagination).length ? pagination : void 0
8376
+ });
8377
+ return data.listAllSandboxes;
8378
+ }
8379
+ );
8380
+ tool(
8381
+ "sandboxes_admin_list_nodes",
8382
+ "List Sandbox Nodes",
8383
+ "Admin: list cluster nodes available for sandbox scheduling with capacity info.",
8384
+ {},
8385
+ async () => {
8386
+ const workspaceId = readWorkspaceId();
8387
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8388
+ const data = await w.request(LIST_SANDBOX_NODES, {
8389
+ context: { workspaceId }
8390
+ });
8391
+ return data.listSandboxNodes;
8392
+ }
8393
+ );
8394
+ tool(
8395
+ "sandboxes_proxy_request",
8396
+ "Proxy Sandbox Request",
8397
+ "Proxy an HTTP request into a running sandbox container. Context injected from auth.",
8398
+ {
8399
+ sandboxId: zod.z.string(),
8400
+ method: zod.z.string().describe("HTTP method, e.g. GET, POST, PUT, DELETE"),
8401
+ path: zod.z.string().describe("Request path inside the sandbox"),
8402
+ body: zod.z.record(zod.z.unknown()).optional(),
8403
+ containerName: zod.z.string().optional()
8404
+ },
8405
+ async (args) => {
8406
+ const workspaceId = readWorkspaceId();
8407
+ if (!workspaceId) throw new Error(NO_WORKSPACE);
8408
+ const input = { ...args, context: { workspaceId } };
8409
+ const data = await w.request(PROXY_SANDBOX_REQUEST, {
8410
+ input
8411
+ });
8412
+ return data.proxySandboxRequest;
8413
+ }
8414
+ );
8415
+ }
7569
8416
  function registerUISessionTools(server, ctx, track) {
7570
8417
  server.registerTool(
7571
8418
  track(mcpToolName(ctx.productName, "ui_session_get")),
@@ -9474,6 +10321,7 @@ var vibecontrolsModule = {
9474
10321
  registerConfigSettingsTools(server, ctx, trackTool);
9475
10322
  registerWebhookTools(server, ctx, trackTool);
9476
10323
  registerTunnelTools(server, ctx, trackTool);
10324
+ registerSandboxTools(server, ctx, trackTool);
9477
10325
  registerUISessionTools(server, ctx, trackTool);
9478
10326
  registerAiEventTools(server, ctx, trackTool);
9479
10327
  registerTargetTools(server, ctx, trackTool);