@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.
- package/dist/modules/atheletebridge/index.cjs +4 -4
- package/dist/modules/atheletebridge/index.cjs.map +1 -1
- package/dist/modules/atheletebridge/index.js +4 -4
- package/dist/modules/atheletebridge/index.js.map +1 -1
- package/dist/modules/integrations/index.cjs +43 -9
- package/dist/modules/integrations/index.cjs.map +1 -1
- package/dist/modules/integrations/index.js +43 -9
- package/dist/modules/integrations/index.js.map +1 -1
- package/dist/modules/scheduler/index.cjs +5 -5
- package/dist/modules/scheduler/index.cjs.map +1 -1
- package/dist/modules/scheduler/index.js +5 -5
- package/dist/modules/scheduler/index.js.map +1 -1
- package/dist/modules/vibecontrols/index.cjs +848 -0
- package/dist/modules/vibecontrols/index.cjs.map +1 -1
- package/dist/modules/vibecontrols/index.js +634 -1
- package/dist/modules/vibecontrols/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LIST_AGENTS, GET_AGENT, CREATE_AGENT, UPDATE_AGENT, DELETE_AGENT, PROBE_AGENT_CONNECTION, AGENT_HEALTH_PROBES, AGENT_PLUGINS, INSTALL_AGENT_PLUGIN, REMOVE_AGENT_PLUGIN, LIST_VIBES, GET_VIBE, CREATE_VIBE, UPDATE_VIBE, DELETE_VIBE, UPDATE_VIBE_STATUS, ARCHIVE_VIBE, RESTORE_VIBE, VIBE_HIERARCHY, SEARCH_VIBES, MOVE_VIBE, UPDATE_VIBE_GIT, LIST_SESSIONS, GET_SESSION, CREATE_SESSION, START_SESSION, STOP_SESSION, RESTART_SESSION, TERMINATE_SESSION, SEND_SESSION_INPUT, START_SESSION_TERMINAL, SESSION_OUTPUT, ACTIVE_SESSIONS, CHECK_SESSION_HEALTH, BULK_RESTART_SESSIONS, BULK_STOP_SESSIONS, BULK_TERMINATE_SESSIONS, UPDATE_SESSION, UPDATE_SESSION_STATUS, DELETE_SESSION, KILL_SESSION, STOP_SESSION_TERMINAL, RESTART_SESSION_TERMINAL, START_TARGET_TERMINAL, STOP_TARGET_TERMINAL, EXPORT_SESSIONS, LIST_NOTES, GET_NOTE, CREATE_NOTE, UPDATE_NOTE, DELETE_NOTE, SEARCH_NOTES, PIN_NOTE, UNPIN_NOTE, LIST_CONFIGURATIONS, GET_CONFIGURATION, SET_CONFIGURATION, DELETE_CONFIGURATION, CONFIGURATIONS_BY_SCOPE, SECURITY_PROVIDERS_Q, SET_SECURITY_PROVIDER_M, MY_SECURITY_SCANS_Q, ALL_SECURITY_SCANS_Q, SECURITY_SCAN_Q, RUN_SECURITY_SCAN_M, CANCEL_SECURITY_SCAN_M, SECURITY_FINDINGS_Q, UPDATE_SECURITY_FINDING_STATUS_M, SECURITY_POLICY_DECISION_Q, SECURITY_STATUS_Q, REPOSITORY_SECURITY_CONFIG_Q, UPDATE_REPOSITORY_SECURITY_CONFIG_M, CREATE_SECURITY_EXCEPTION_M, REVOKE_SECURITY_EXCEPTION_M, PRESIGN_SECURITY_EVIDENCE_M, PUSH_SECURITY_SCAN_RUN_M, GET_CI_STATUS_Q, REFRESH_CI_STATUS_M, GET_CI_PIPELINE_RUNS_Q, GET_CI_PIPELINE_DETAILS_Q, GET_REPO_STATS_Q, REFRESH_REPO_STATS_M, LIST_GITOPS_PROVIDERS_Q, GET_GITOPS_PROVIDER_Q, CREATE_GITOPS_PROVIDER_M, UPDATE_GITOPS_PROVIDER_M, DELETE_GITOPS_PROVIDER_M, MY_SETTINGS_Q, MY_SETTINGS_BY_CATEGORY_Q, RESET_SETTINGS_M, UPDATE_PREFERENCES_M, UPDATE_NOTIFICATION_PREFERENCES_M, UPDATE_WORKSPACE_DEFAULTS_M, LIST_SETTINGS_SECRETS_Q, SET_SETTINGS_SECRET_M, DELETE_SETTINGS_SECRET_M, RESOLVE_INTEGRATION_TOKEN_M, LIST_WEBHOOKS, GET_WEBHOOK, CREATE_WEBHOOK, UPDATE_WEBHOOK, DELETE_WEBHOOK, TEST_WEBHOOK, TRIGGER_WEBHOOK, GET_UI_SESSION, SAVE_UI_SESSION, CLEAR_UI_SESSION, LIST_AI_TOOL_EVENTS, CREATE_AI_TOOL_EVENT, RECENT_AI_TOOL_EVENTS, LIST_TARGETS, GET_TARGET, CREATE_TARGET, UPDATE_TARGET, DELETE_TARGET, TEST_TARGET, IMPORT_TARGETS_FROM_CONFIG, SCAN_SSH_CONFIG, INSTALL_AGENT_ON_TARGET, LIST_VIBEDECKS, GET_VIBEDECK, CREATE_VIBEDECK, UPDATE_VIBEDECK, DELETE_VIBEDECK, DUPLICATE_VIBEDECK, SET_DEFAULT_VIBEDECK, LIST_VIBEDECK_BUTTONS, CREATE_VIBEDECK_BUTTON, UPDATE_VIBEDECK_BUTTON, DELETE_VIBEDECK_BUTTON, EXECUTE_VIBEDECK_BUTTON, LIST_DOCS_SITES, GET_DOCS_SITE, CREATE_DOCS_SITE, UPDATE_DOCS_SITE, DELETE_DOCS_SITE, LIST_DOCS_PAGES, GET_DOCS_PAGE, CREATE_DOCS_PAGE, UPDATE_DOCS_PAGE, DELETE_DOCS_PAGE, COMPILE_DOCS_SITE, PUBLISH_DOCS_REVISION, ROLLBACK_DOCS_REVISION, SHARE_SESSION, CREATE_SESSION_SHARE_LINK, REVOKE_SESSION_SHARE, REVOKE_SESSION_SHARE_LINK, SESSION_SHARES, SESSION_SHARE_LINKS, SESSION_COLLABORATORS, SESSIONS_SHARED_WITH_ME, UPDATE_SESSION_SHARE, JOIN_SHARED_SESSION, LEAVE_SHARED_SESSION, REQUEST_SESSION_CONTROL, RELEASE_SESSION_CONTROL, TRANSFER_SESSION_CONTROL, LIST_AUDIT_LOGS, GET_AUDIT_LOG, AUDIT_LOG_STATS, EXPORT_AUDIT_LOGS, DELETE_AUDIT_LOG, LIST_ACTIONS, GET_ACTION, CREATE_ACTION, UPDATE_ACTION, DELETE_ACTION, EXECUTE_ACTION, LIST_ACTION_EXECUTIONS, DUPLICATE_ACTION, INSTALL_ACTION_FROM_STORE, CANCEL_ACTION_EXECUTION, CREATE_SCHEDULED_JOB, DELETE_SCHEDULED_JOB, LIST_SCHEDULED_JOBS, LIST_AI_PROMPTS, GET_AI_PROMPT, CREATE_AI_PROMPT, UPDATE_AI_PROMPT, DELETE_AI_PROMPT, DUPLICATE_AI_PROMPT, RENDER_AI_PROMPT, RECORD_AI_PROMPT_USAGE, LIST_VIBE_DECK_SHARE_LINKS, CREATE_VIBE_DECK_SHARE_LINK, UPDATE_VIBE_DECK_SHARE_LINK, REVOKE_VIBE_DECK_SHARE_LINK, VALIDATE_VIBE_DECK_SHARE_LINK, SHARED_VIBE_DECK, EXECUTE_SHARED_VIBE_DECK_BUTTON, VIBECONTROLS_ANALYTICS, LIST_CATALOGS, GET_CATALOG, GET_CATALOG_DEPENDENCY_GRAPH, GET_CATALOG_SBOM, CREATE_CATALOG, UPDATE_CATALOG, DELETE_CATALOG, ADD_COMPONENT_TO_CATALOG, REMOVE_COMPONENT_FROM_CATALOG, ADD_VIBE_TO_CATALOG, REMOVE_VIBE_FROM_CATALOG, LIST_COMPONENTS, GET_COMPONENT, CREATE_COMPONENT, UPDATE_COMPONENT, DELETE_COMPONENT, FORK_GITHUB_REPO, PUBLISH_COMPONENT_AS_TEMPLATE, LIST_TEMPLATES, GET_TEMPLATE, UPDATE_TEMPLATE, DELETE_TEMPLATE, INSTANTIATE_TEMPLATE, GET_SCORECARD, UPSERT_SCORECARD, ADD_SCORECARD_METRIC, UPDATE_SCORECARD_METRIC, REMOVE_SCORECARD_METRIC, LIST_TUNNELS, PINNED_NOTES, GET_TUNNEL, GET_TUNNEL_BY_SLUG, CREATE_TUNNEL, UPDATE_TUNNEL, DELETE_TUNNEL, START_TUNNEL, STOP_TUNNEL, ROTATE_TUNNEL_CREDENTIALS, ISSUE_TUNNEL_SESSION, REVOKE_TUNNEL_SESSION, LIST_TUNNEL_SESSIONS, LIST_TUNNEL_PROVIDERS, GET_TUNNEL_PROVIDER, LIST_TUNNEL_SHARDS, TUNNEL_USAGE, TUNNEL_AUDIT, LIST_TUNNEL_DOMAINS, GET_TUNNEL_DOMAIN, RESERVE_TUNNEL_SUBDOMAIN, REGISTER_CUSTOM_TUNNEL_DOMAIN, VERIFY_TUNNEL_DOMAIN, ATTACH_TUNNEL_DOMAIN, DETACH_TUNNEL_DOMAIN, DELETE_TUNNEL_DOMAIN, PROBE_AGENT_TUNNEL, ADD_AGENT_FROM_TUNNEL } from '../../chunk-XITZQYB2.js';
|
|
1
|
+
import { LIST_AGENTS, GET_AGENT, CREATE_AGENT, UPDATE_AGENT, DELETE_AGENT, PROBE_AGENT_CONNECTION, AGENT_HEALTH_PROBES, AGENT_PLUGINS, INSTALL_AGENT_PLUGIN, REMOVE_AGENT_PLUGIN, LIST_VIBES, GET_VIBE, CREATE_VIBE, UPDATE_VIBE, DELETE_VIBE, UPDATE_VIBE_STATUS, ARCHIVE_VIBE, RESTORE_VIBE, VIBE_HIERARCHY, SEARCH_VIBES, MOVE_VIBE, UPDATE_VIBE_GIT, LIST_SESSIONS, GET_SESSION, CREATE_SESSION, START_SESSION, STOP_SESSION, RESTART_SESSION, TERMINATE_SESSION, SEND_SESSION_INPUT, START_SESSION_TERMINAL, SESSION_OUTPUT, ACTIVE_SESSIONS, CHECK_SESSION_HEALTH, BULK_RESTART_SESSIONS, BULK_STOP_SESSIONS, BULK_TERMINATE_SESSIONS, UPDATE_SESSION, UPDATE_SESSION_STATUS, DELETE_SESSION, KILL_SESSION, STOP_SESSION_TERMINAL, RESTART_SESSION_TERMINAL, START_TARGET_TERMINAL, STOP_TARGET_TERMINAL, EXPORT_SESSIONS, LIST_NOTES, GET_NOTE, CREATE_NOTE, UPDATE_NOTE, DELETE_NOTE, SEARCH_NOTES, PIN_NOTE, UNPIN_NOTE, LIST_CONFIGURATIONS, GET_CONFIGURATION, SET_CONFIGURATION, DELETE_CONFIGURATION, CONFIGURATIONS_BY_SCOPE, SECURITY_PROVIDERS_Q, SET_SECURITY_PROVIDER_M, MY_SECURITY_SCANS_Q, ALL_SECURITY_SCANS_Q, SECURITY_SCAN_Q, RUN_SECURITY_SCAN_M, CANCEL_SECURITY_SCAN_M, SECURITY_FINDINGS_Q, UPDATE_SECURITY_FINDING_STATUS_M, SECURITY_POLICY_DECISION_Q, SECURITY_STATUS_Q, REPOSITORY_SECURITY_CONFIG_Q, UPDATE_REPOSITORY_SECURITY_CONFIG_M, CREATE_SECURITY_EXCEPTION_M, REVOKE_SECURITY_EXCEPTION_M, PRESIGN_SECURITY_EVIDENCE_M, PUSH_SECURITY_SCAN_RUN_M, GET_CI_STATUS_Q, REFRESH_CI_STATUS_M, GET_CI_PIPELINE_RUNS_Q, GET_CI_PIPELINE_DETAILS_Q, GET_REPO_STATS_Q, REFRESH_REPO_STATS_M, LIST_GITOPS_PROVIDERS_Q, GET_GITOPS_PROVIDER_Q, CREATE_GITOPS_PROVIDER_M, UPDATE_GITOPS_PROVIDER_M, DELETE_GITOPS_PROVIDER_M, MY_SETTINGS_Q, MY_SETTINGS_BY_CATEGORY_Q, RESET_SETTINGS_M, UPDATE_PREFERENCES_M, UPDATE_NOTIFICATION_PREFERENCES_M, UPDATE_WORKSPACE_DEFAULTS_M, LIST_SETTINGS_SECRETS_Q, SET_SETTINGS_SECRET_M, DELETE_SETTINGS_SECRET_M, RESOLVE_INTEGRATION_TOKEN_M, LIST_WEBHOOKS, GET_WEBHOOK, CREATE_WEBHOOK, UPDATE_WEBHOOK, DELETE_WEBHOOK, TEST_WEBHOOK, TRIGGER_WEBHOOK, GET_UI_SESSION, SAVE_UI_SESSION, CLEAR_UI_SESSION, LIST_AI_TOOL_EVENTS, CREATE_AI_TOOL_EVENT, RECENT_AI_TOOL_EVENTS, LIST_TARGETS, GET_TARGET, CREATE_TARGET, UPDATE_TARGET, DELETE_TARGET, TEST_TARGET, IMPORT_TARGETS_FROM_CONFIG, SCAN_SSH_CONFIG, INSTALL_AGENT_ON_TARGET, LIST_VIBEDECKS, GET_VIBEDECK, CREATE_VIBEDECK, UPDATE_VIBEDECK, DELETE_VIBEDECK, DUPLICATE_VIBEDECK, SET_DEFAULT_VIBEDECK, LIST_VIBEDECK_BUTTONS, CREATE_VIBEDECK_BUTTON, UPDATE_VIBEDECK_BUTTON, DELETE_VIBEDECK_BUTTON, EXECUTE_VIBEDECK_BUTTON, LIST_DOCS_SITES, GET_DOCS_SITE, CREATE_DOCS_SITE, UPDATE_DOCS_SITE, DELETE_DOCS_SITE, LIST_DOCS_PAGES, GET_DOCS_PAGE, CREATE_DOCS_PAGE, UPDATE_DOCS_PAGE, DELETE_DOCS_PAGE, COMPILE_DOCS_SITE, PUBLISH_DOCS_REVISION, ROLLBACK_DOCS_REVISION, SHARE_SESSION, CREATE_SESSION_SHARE_LINK, REVOKE_SESSION_SHARE, REVOKE_SESSION_SHARE_LINK, SESSION_SHARES, SESSION_SHARE_LINKS, SESSION_COLLABORATORS, SESSIONS_SHARED_WITH_ME, UPDATE_SESSION_SHARE, JOIN_SHARED_SESSION, LEAVE_SHARED_SESSION, REQUEST_SESSION_CONTROL, RELEASE_SESSION_CONTROL, TRANSFER_SESSION_CONTROL, LIST_AUDIT_LOGS, GET_AUDIT_LOG, AUDIT_LOG_STATS, EXPORT_AUDIT_LOGS, DELETE_AUDIT_LOG, LIST_ACTIONS, GET_ACTION, CREATE_ACTION, UPDATE_ACTION, DELETE_ACTION, EXECUTE_ACTION, LIST_ACTION_EXECUTIONS, DUPLICATE_ACTION, INSTALL_ACTION_FROM_STORE, CANCEL_ACTION_EXECUTION, CREATE_SCHEDULED_JOB, DELETE_SCHEDULED_JOB, LIST_SCHEDULED_JOBS, LIST_AI_PROMPTS, GET_AI_PROMPT, CREATE_AI_PROMPT, UPDATE_AI_PROMPT, DELETE_AI_PROMPT, DUPLICATE_AI_PROMPT, RENDER_AI_PROMPT, RECORD_AI_PROMPT_USAGE, LIST_VIBE_DECK_SHARE_LINKS, CREATE_VIBE_DECK_SHARE_LINK, UPDATE_VIBE_DECK_SHARE_LINK, REVOKE_VIBE_DECK_SHARE_LINK, VALIDATE_VIBE_DECK_SHARE_LINK, SHARED_VIBE_DECK, EXECUTE_SHARED_VIBE_DECK_BUTTON, VIBECONTROLS_ANALYTICS, LIST_CATALOGS, GET_CATALOG, GET_CATALOG_DEPENDENCY_GRAPH, GET_CATALOG_SBOM, CREATE_CATALOG, UPDATE_CATALOG, DELETE_CATALOG, ADD_COMPONENT_TO_CATALOG, REMOVE_COMPONENT_FROM_CATALOG, ADD_VIBE_TO_CATALOG, REMOVE_VIBE_FROM_CATALOG, LIST_COMPONENTS, GET_COMPONENT, CREATE_COMPONENT, UPDATE_COMPONENT, DELETE_COMPONENT, FORK_GITHUB_REPO, PUBLISH_COMPONENT_AS_TEMPLATE, LIST_TEMPLATES, GET_TEMPLATE, UPDATE_TEMPLATE, DELETE_TEMPLATE, INSTANTIATE_TEMPLATE, GET_SCORECARD, UPSERT_SCORECARD, ADD_SCORECARD_METRIC, UPDATE_SCORECARD_METRIC, REMOVE_SCORECARD_METRIC, LIST_TUNNELS, PINNED_NOTES, GET_TUNNEL, GET_TUNNEL_BY_SLUG, CREATE_TUNNEL, UPDATE_TUNNEL, DELETE_TUNNEL, START_TUNNEL, STOP_TUNNEL, ROTATE_TUNNEL_CREDENTIALS, ISSUE_TUNNEL_SESSION, REVOKE_TUNNEL_SESSION, LIST_TUNNEL_SESSIONS, LIST_TUNNEL_PROVIDERS, GET_TUNNEL_PROVIDER, LIST_TUNNEL_SHARDS, TUNNEL_USAGE, TUNNEL_AUDIT, LIST_TUNNEL_DOMAINS, GET_TUNNEL_DOMAIN, RESERVE_TUNNEL_SUBDOMAIN, REGISTER_CUSTOM_TUNNEL_DOMAIN, VERIFY_TUNNEL_DOMAIN, ATTACH_TUNNEL_DOMAIN, DETACH_TUNNEL_DOMAIN, DELETE_TUNNEL_DOMAIN, PROBE_AGENT_TUNNEL, ADD_AGENT_FROM_TUNNEL, LIST_SANDBOXES, GET_SANDBOX, CREATE_SANDBOX, DELETE_SANDBOX, START_SANDBOX, STOP_SANDBOX, EXTEND_SANDBOX_TTL, GET_SANDBOX_CONFIG, UPDATE_SANDBOX_CONFIG, GET_SANDBOX_STATS, GET_SANDBOX_LOGS, TAG_SANDBOX, UNTAG_SANDBOX, GET_SANDBOX_TAGS, REPLACE_SANDBOX_TAGS, CREATE_SANDBOX_TAG, AVAILABLE_SANDBOX_TAGS, LIST_SANDBOX_TEMPLATES, GET_SANDBOX_TEMPLATE, CREATE_SANDBOX_TEMPLATE, UPDATE_SANDBOX_TEMPLATE, DELETE_SANDBOX_TEMPLATE, EXPORT_SANDBOXES, GET_SANDBOX_EXPORT_JOB, LIST_SANDBOX_EXPORT_JOBS, GET_SANDBOX_ARTIFACT_BYTES, GET_ACTIVE_SANDBOXES, GET_RECENT_SANDBOX_ACTIVITY, LIST_ALL_SANDBOXES, LIST_SANDBOX_NODES, PROXY_SANDBOX_REQUEST } from '../../chunk-XITZQYB2.js';
|
|
2
2
|
import { getAuth } from '../../chunk-WWFVD7BO.js';
|
|
3
3
|
import { mcpToolName, jsonResult, errorResult } from '../../chunk-H2OYWLOA.js';
|
|
4
4
|
import { z } from 'zod';
|
|
@@ -5905,6 +5905,638 @@ function registerTunnelTools(server, ctx, track) {
|
|
|
5905
5905
|
}
|
|
5906
5906
|
);
|
|
5907
5907
|
}
|
|
5908
|
+
var NO_WORKSPACE = "No workspace set. Run the auth workspace_set tool first.";
|
|
5909
|
+
var sandboxTemplate = z.enum([
|
|
5910
|
+
"AI_BUILDER",
|
|
5911
|
+
"WORKFLOW_MULTI_NODE",
|
|
5912
|
+
"MISC_SHELL",
|
|
5913
|
+
"CUSTOM",
|
|
5914
|
+
"VIBECONTROLS"
|
|
5915
|
+
]);
|
|
5916
|
+
var sandboxStatus = z.enum([
|
|
5917
|
+
"PENDING",
|
|
5918
|
+
"PROVISIONING",
|
|
5919
|
+
"RUNNING",
|
|
5920
|
+
"STOPPING",
|
|
5921
|
+
"STOPPED",
|
|
5922
|
+
"EXPIRED",
|
|
5923
|
+
"FAILED"
|
|
5924
|
+
]);
|
|
5925
|
+
var sandboxMode = z.enum(["DEPLOYMENT", "JOB"]);
|
|
5926
|
+
var storageMode = z.enum(["NONE", "EPHEMERAL", "PERSISTENT"]);
|
|
5927
|
+
var sandboxExportFormat = z.enum(["CSV", "JSON"]);
|
|
5928
|
+
var resourcesSchema = z.object({
|
|
5929
|
+
cpuRequest: z.string().optional(),
|
|
5930
|
+
cpuLimit: z.string().optional(),
|
|
5931
|
+
memoryRequest: z.string().optional(),
|
|
5932
|
+
memoryLimit: z.string().optional()
|
|
5933
|
+
});
|
|
5934
|
+
var storageSchema = z.object({
|
|
5935
|
+
mode: storageMode.optional().describe("Storage mode: NONE, EPHEMERAL, PERSISTENT"),
|
|
5936
|
+
sizeGi: z.number().optional(),
|
|
5937
|
+
mountPath: z.string().optional(),
|
|
5938
|
+
retainOnDelete: z.boolean().optional()
|
|
5939
|
+
});
|
|
5940
|
+
var containersSchema = z.array(z.record(z.unknown())).describe(
|
|
5941
|
+
"Container specs: [{ name, image, ports?[{ containerPort, name?, protocol? }], env?[{ name, value }], command?[], args?[], resources?{ requestsCpu, requestsMemory, limitsCpu, limitsMemory } }]"
|
|
5942
|
+
);
|
|
5943
|
+
function registerSandboxTools(server, ctx, track) {
|
|
5944
|
+
const w = ctx.gql.workspace;
|
|
5945
|
+
const tool = (name, title, description, inputSchema, handler) => {
|
|
5946
|
+
server.registerTool(
|
|
5947
|
+
track(mcpToolName(ctx.productName, name)),
|
|
5948
|
+
{ title, description, inputSchema },
|
|
5949
|
+
async (args) => {
|
|
5950
|
+
try {
|
|
5951
|
+
const data = await handler(args);
|
|
5952
|
+
return jsonResult(data);
|
|
5953
|
+
} catch (error) {
|
|
5954
|
+
ctx.logger.error(`vibecontrols_${name} failed`, { error });
|
|
5955
|
+
return errorResult(`Failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
5956
|
+
}
|
|
5957
|
+
}
|
|
5958
|
+
);
|
|
5959
|
+
};
|
|
5960
|
+
const readWorkspaceId = () => {
|
|
5961
|
+
const auth = ctx.auth.read();
|
|
5962
|
+
return auth?.workspaceId;
|
|
5963
|
+
};
|
|
5964
|
+
tool(
|
|
5965
|
+
"sandboxes_list",
|
|
5966
|
+
"List Sandboxes",
|
|
5967
|
+
"List sandboxes in the current workspace with optional template/status filters.",
|
|
5968
|
+
{
|
|
5969
|
+
template: sandboxTemplate.optional(),
|
|
5970
|
+
status: sandboxStatus.optional(),
|
|
5971
|
+
limit: z.number().optional(),
|
|
5972
|
+
offset: z.number().optional(),
|
|
5973
|
+
page: z.number().optional()
|
|
5974
|
+
},
|
|
5975
|
+
async ({ template, status, limit, offset, page }) => {
|
|
5976
|
+
const workspaceId = readWorkspaceId();
|
|
5977
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
5978
|
+
const filter = {};
|
|
5979
|
+
if (template !== void 0) filter.template = template;
|
|
5980
|
+
if (status !== void 0) filter.status = status;
|
|
5981
|
+
const pagination = {};
|
|
5982
|
+
if (limit !== void 0) pagination.limit = limit;
|
|
5983
|
+
if (offset !== void 0) pagination.offset = offset;
|
|
5984
|
+
if (page !== void 0) pagination.page = page;
|
|
5985
|
+
const data = await w.request(LIST_SANDBOXES, {
|
|
5986
|
+
filter: Object.keys(filter).length ? filter : void 0,
|
|
5987
|
+
pagination: Object.keys(pagination).length ? pagination : void 0,
|
|
5988
|
+
context: { workspaceId }
|
|
5989
|
+
});
|
|
5990
|
+
return data.listSandboxes;
|
|
5991
|
+
}
|
|
5992
|
+
);
|
|
5993
|
+
tool(
|
|
5994
|
+
"sandboxes_get",
|
|
5995
|
+
"Get Sandbox",
|
|
5996
|
+
"Get a sandbox by ID.",
|
|
5997
|
+
{ id: z.string().describe("Sandbox ID") },
|
|
5998
|
+
async ({ id }) => {
|
|
5999
|
+
const workspaceId = readWorkspaceId();
|
|
6000
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6001
|
+
const data = await w.request(GET_SANDBOX, {
|
|
6002
|
+
id,
|
|
6003
|
+
context: { workspaceId }
|
|
6004
|
+
});
|
|
6005
|
+
return data.getSandbox;
|
|
6006
|
+
}
|
|
6007
|
+
);
|
|
6008
|
+
tool(
|
|
6009
|
+
"sandboxes_create",
|
|
6010
|
+
"Create Sandbox",
|
|
6011
|
+
"Create a sandbox from a template + container specs. Workspace context is injected from auth.",
|
|
6012
|
+
{
|
|
6013
|
+
name: z.string(),
|
|
6014
|
+
template: sandboxTemplate,
|
|
6015
|
+
containers: containersSchema,
|
|
6016
|
+
description: z.string().optional(),
|
|
6017
|
+
mode: sandboxMode.optional().describe("Sandbox mode: DEPLOYMENT or JOB"),
|
|
6018
|
+
resources: resourcesSchema.optional(),
|
|
6019
|
+
storage: storageSchema.optional(),
|
|
6020
|
+
ttlSeconds: z.number().optional(),
|
|
6021
|
+
metadata: z.record(z.unknown()).optional(),
|
|
6022
|
+
templateId: z.string().optional()
|
|
6023
|
+
},
|
|
6024
|
+
async (args) => {
|
|
6025
|
+
const workspaceId = readWorkspaceId();
|
|
6026
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6027
|
+
const input = { ...args, context: { workspaceId } };
|
|
6028
|
+
const data = await w.request(CREATE_SANDBOX, { input });
|
|
6029
|
+
return data.createSandbox;
|
|
6030
|
+
}
|
|
6031
|
+
);
|
|
6032
|
+
tool(
|
|
6033
|
+
"sandboxes_delete",
|
|
6034
|
+
"Delete Sandbox",
|
|
6035
|
+
"Delete a sandbox by ID.",
|
|
6036
|
+
{ id: z.string() },
|
|
6037
|
+
async ({ id }) => {
|
|
6038
|
+
const workspaceId = readWorkspaceId();
|
|
6039
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6040
|
+
const data = await w.request(DELETE_SANDBOX, {
|
|
6041
|
+
id,
|
|
6042
|
+
context: { workspaceId }
|
|
6043
|
+
});
|
|
6044
|
+
return { deleted: data.deleteSandbox, id };
|
|
6045
|
+
}
|
|
6046
|
+
);
|
|
6047
|
+
tool(
|
|
6048
|
+
"sandboxes_start",
|
|
6049
|
+
"Start Sandbox",
|
|
6050
|
+
"Start (resume) a stopped sandbox.",
|
|
6051
|
+
{ id: z.string() },
|
|
6052
|
+
async ({ id }) => {
|
|
6053
|
+
const workspaceId = readWorkspaceId();
|
|
6054
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6055
|
+
const data = await w.request(START_SANDBOX, {
|
|
6056
|
+
id,
|
|
6057
|
+
context: { workspaceId }
|
|
6058
|
+
});
|
|
6059
|
+
return data.startSandbox;
|
|
6060
|
+
}
|
|
6061
|
+
);
|
|
6062
|
+
tool(
|
|
6063
|
+
"sandboxes_stop",
|
|
6064
|
+
"Stop Sandbox",
|
|
6065
|
+
"Stop a running sandbox.",
|
|
6066
|
+
{ id: z.string() },
|
|
6067
|
+
async ({ id }) => {
|
|
6068
|
+
const workspaceId = readWorkspaceId();
|
|
6069
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6070
|
+
const data = await w.request(STOP_SANDBOX, {
|
|
6071
|
+
id,
|
|
6072
|
+
context: { workspaceId }
|
|
6073
|
+
});
|
|
6074
|
+
return data.stopSandbox;
|
|
6075
|
+
}
|
|
6076
|
+
);
|
|
6077
|
+
tool(
|
|
6078
|
+
"sandboxes_extend_ttl",
|
|
6079
|
+
"Extend Sandbox TTL",
|
|
6080
|
+
"Extend a sandbox time-to-live by an additional number of seconds.",
|
|
6081
|
+
{
|
|
6082
|
+
id: z.string(),
|
|
6083
|
+
additionalSeconds: z.number().describe("Seconds to add to the current TTL")
|
|
6084
|
+
},
|
|
6085
|
+
async ({ id, additionalSeconds }) => {
|
|
6086
|
+
const workspaceId = readWorkspaceId();
|
|
6087
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6088
|
+
const data = await w.request(EXTEND_SANDBOX_TTL, {
|
|
6089
|
+
id,
|
|
6090
|
+
additionalSeconds,
|
|
6091
|
+
context: { workspaceId }
|
|
6092
|
+
});
|
|
6093
|
+
return data.extendSandboxTTL;
|
|
6094
|
+
}
|
|
6095
|
+
);
|
|
6096
|
+
tool(
|
|
6097
|
+
"sandboxes_get_config",
|
|
6098
|
+
"Get Sandbox Config",
|
|
6099
|
+
"Get the sandbox provisioning config (TTL/concurrency/resource defaults) for the workspace.",
|
|
6100
|
+
{},
|
|
6101
|
+
async () => {
|
|
6102
|
+
const workspaceId = readWorkspaceId();
|
|
6103
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6104
|
+
const data = await w.request(GET_SANDBOX_CONFIG, {
|
|
6105
|
+
context: { workspaceId }
|
|
6106
|
+
});
|
|
6107
|
+
return data.getSandboxConfig;
|
|
6108
|
+
}
|
|
6109
|
+
);
|
|
6110
|
+
tool(
|
|
6111
|
+
"sandboxes_update_config",
|
|
6112
|
+
"Update Sandbox Config",
|
|
6113
|
+
"Update the workspace sandbox config. Workspace context is injected from auth.",
|
|
6114
|
+
{
|
|
6115
|
+
defaultTtlSeconds: z.number().optional(),
|
|
6116
|
+
maxTtlSeconds: z.number().optional(),
|
|
6117
|
+
allowedTemplates: z.array(sandboxTemplate).optional(),
|
|
6118
|
+
maxConcurrentPerUser: z.number().optional(),
|
|
6119
|
+
maxConcurrentPerWorkspace: z.number().optional(),
|
|
6120
|
+
defaultCpuRequest: z.string().optional(),
|
|
6121
|
+
defaultCpuLimit: z.string().optional(),
|
|
6122
|
+
defaultMemoryRequest: z.string().optional(),
|
|
6123
|
+
defaultMemoryLimit: z.string().optional()
|
|
6124
|
+
},
|
|
6125
|
+
async (args) => {
|
|
6126
|
+
const workspaceId = readWorkspaceId();
|
|
6127
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6128
|
+
const input = { ...args, context: { workspaceId } };
|
|
6129
|
+
const data = await w.request(UPDATE_SANDBOX_CONFIG, {
|
|
6130
|
+
input
|
|
6131
|
+
});
|
|
6132
|
+
return data.updateSandboxConfig;
|
|
6133
|
+
}
|
|
6134
|
+
);
|
|
6135
|
+
tool(
|
|
6136
|
+
"sandboxes_get_stats",
|
|
6137
|
+
"Get Sandbox Stats",
|
|
6138
|
+
"Get aggregate sandbox statistics for the workspace.",
|
|
6139
|
+
{},
|
|
6140
|
+
async () => {
|
|
6141
|
+
const workspaceId = readWorkspaceId();
|
|
6142
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6143
|
+
const data = await w.request(GET_SANDBOX_STATS, {
|
|
6144
|
+
context: { workspaceId }
|
|
6145
|
+
});
|
|
6146
|
+
return data.getSandboxStats;
|
|
6147
|
+
}
|
|
6148
|
+
);
|
|
6149
|
+
tool(
|
|
6150
|
+
"sandboxes_get_logs",
|
|
6151
|
+
"Get Sandbox Logs",
|
|
6152
|
+
"Fetch container logs for a sandbox.",
|
|
6153
|
+
{
|
|
6154
|
+
id: z.string(),
|
|
6155
|
+
containerName: z.string(),
|
|
6156
|
+
tailLines: z.number().optional().describe("Number of trailing log lines to return")
|
|
6157
|
+
},
|
|
6158
|
+
async ({ id, containerName, tailLines }) => {
|
|
6159
|
+
const workspaceId = readWorkspaceId();
|
|
6160
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6161
|
+
const data = await w.request(GET_SANDBOX_LOGS, {
|
|
6162
|
+
context: { workspaceId },
|
|
6163
|
+
id,
|
|
6164
|
+
containerName,
|
|
6165
|
+
tailLines
|
|
6166
|
+
});
|
|
6167
|
+
return data.getSandboxLogs;
|
|
6168
|
+
}
|
|
6169
|
+
);
|
|
6170
|
+
tool(
|
|
6171
|
+
"sandboxes_tags_attach",
|
|
6172
|
+
"Tag Sandbox",
|
|
6173
|
+
"Attach an existing tag to a sandbox.",
|
|
6174
|
+
{
|
|
6175
|
+
sandboxId: z.string(),
|
|
6176
|
+
tagId: z.string(),
|
|
6177
|
+
source: z.string().optional(),
|
|
6178
|
+
validFrom: z.string().optional(),
|
|
6179
|
+
validTo: z.string().optional(),
|
|
6180
|
+
metadata: z.record(z.unknown()).optional()
|
|
6181
|
+
},
|
|
6182
|
+
async (args) => {
|
|
6183
|
+
const data = await w.request(TAG_SANDBOX, { input: args });
|
|
6184
|
+
return data.tagSandbox;
|
|
6185
|
+
}
|
|
6186
|
+
);
|
|
6187
|
+
tool(
|
|
6188
|
+
"sandboxes_tags_detach",
|
|
6189
|
+
"Untag Sandbox",
|
|
6190
|
+
"Remove a tag from a sandbox.",
|
|
6191
|
+
{ sandboxId: z.string(), tagId: z.string() },
|
|
6192
|
+
async (args) => {
|
|
6193
|
+
const data = await w.request(UNTAG_SANDBOX, { input: args });
|
|
6194
|
+
return data.untagSandbox;
|
|
6195
|
+
}
|
|
6196
|
+
);
|
|
6197
|
+
tool(
|
|
6198
|
+
"sandboxes_tags_get",
|
|
6199
|
+
"Get Sandbox Tags",
|
|
6200
|
+
"Get all tag assignments for a sandbox.",
|
|
6201
|
+
{ sandboxId: z.string() },
|
|
6202
|
+
async (args) => {
|
|
6203
|
+
const data = await w.request(GET_SANDBOX_TAGS, { input: args });
|
|
6204
|
+
return data.getSandboxTags;
|
|
6205
|
+
}
|
|
6206
|
+
);
|
|
6207
|
+
tool(
|
|
6208
|
+
"sandboxes_tags_replace",
|
|
6209
|
+
"Replace Sandbox Tags",
|
|
6210
|
+
"Replace the full set of tags on a sandbox with the provided tag IDs.",
|
|
6211
|
+
{ sandboxId: z.string(), tagIds: z.array(z.string()) },
|
|
6212
|
+
async (args) => {
|
|
6213
|
+
const data = await w.request(REPLACE_SANDBOX_TAGS, {
|
|
6214
|
+
input: args
|
|
6215
|
+
});
|
|
6216
|
+
return data.replaceSandboxTags;
|
|
6217
|
+
}
|
|
6218
|
+
);
|
|
6219
|
+
tool(
|
|
6220
|
+
"sandboxes_tags_create",
|
|
6221
|
+
"Create Sandbox Tag",
|
|
6222
|
+
"Create a new sandbox tag definition.",
|
|
6223
|
+
{ label: z.string(), color: z.string().optional() },
|
|
6224
|
+
async (args) => {
|
|
6225
|
+
const data = await w.request(CREATE_SANDBOX_TAG, {
|
|
6226
|
+
input: args
|
|
6227
|
+
});
|
|
6228
|
+
return data.createSandboxTag;
|
|
6229
|
+
}
|
|
6230
|
+
);
|
|
6231
|
+
tool(
|
|
6232
|
+
"sandboxes_tags_available",
|
|
6233
|
+
"Available Sandbox Tags",
|
|
6234
|
+
"List available sandbox tags, optionally filtered by a search query.",
|
|
6235
|
+
{
|
|
6236
|
+
query: z.string().optional(),
|
|
6237
|
+
limit: z.number().optional()
|
|
6238
|
+
},
|
|
6239
|
+
async ({ query, limit }) => {
|
|
6240
|
+
const data = await w.request(AVAILABLE_SANDBOX_TAGS, {
|
|
6241
|
+
query,
|
|
6242
|
+
limit
|
|
6243
|
+
});
|
|
6244
|
+
return data.availableSandboxTags;
|
|
6245
|
+
}
|
|
6246
|
+
);
|
|
6247
|
+
tool(
|
|
6248
|
+
"sandboxes_templates_list",
|
|
6249
|
+
"List Sandbox Templates",
|
|
6250
|
+
"List sandbox template configs, optionally filtered by template type.",
|
|
6251
|
+
{
|
|
6252
|
+
template: sandboxTemplate.optional(),
|
|
6253
|
+
limit: z.number().optional(),
|
|
6254
|
+
offset: z.number().optional(),
|
|
6255
|
+
page: z.number().optional()
|
|
6256
|
+
},
|
|
6257
|
+
async ({ template, limit, offset, page }) => {
|
|
6258
|
+
const workspaceId = readWorkspaceId();
|
|
6259
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6260
|
+
const pagination = {};
|
|
6261
|
+
if (limit !== void 0) pagination.limit = limit;
|
|
6262
|
+
if (offset !== void 0) pagination.offset = offset;
|
|
6263
|
+
if (page !== void 0) pagination.page = page;
|
|
6264
|
+
const data = await w.request(LIST_SANDBOX_TEMPLATES, {
|
|
6265
|
+
context: { workspaceId },
|
|
6266
|
+
template,
|
|
6267
|
+
pagination: Object.keys(pagination).length ? pagination : void 0
|
|
6268
|
+
});
|
|
6269
|
+
return data.listSandboxTemplates;
|
|
6270
|
+
}
|
|
6271
|
+
);
|
|
6272
|
+
tool(
|
|
6273
|
+
"sandboxes_templates_get",
|
|
6274
|
+
"Get Sandbox Template",
|
|
6275
|
+
"Get a sandbox template config by ID.",
|
|
6276
|
+
{ id: z.string() },
|
|
6277
|
+
async ({ id }) => {
|
|
6278
|
+
const workspaceId = readWorkspaceId();
|
|
6279
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6280
|
+
const data = await w.request(GET_SANDBOX_TEMPLATE, {
|
|
6281
|
+
context: { workspaceId },
|
|
6282
|
+
id
|
|
6283
|
+
});
|
|
6284
|
+
return data.getSandboxTemplate;
|
|
6285
|
+
}
|
|
6286
|
+
);
|
|
6287
|
+
tool(
|
|
6288
|
+
"sandboxes_templates_create",
|
|
6289
|
+
"Create Sandbox Template",
|
|
6290
|
+
"Create a reusable sandbox template config. Workspace context is injected from auth.",
|
|
6291
|
+
{
|
|
6292
|
+
name: z.string(),
|
|
6293
|
+
template: sandboxTemplate,
|
|
6294
|
+
description: z.string().optional(),
|
|
6295
|
+
isDefault: z.boolean().optional(),
|
|
6296
|
+
containers: containersSchema.optional(),
|
|
6297
|
+
resources: resourcesSchema.optional(),
|
|
6298
|
+
storage: storageSchema.optional(),
|
|
6299
|
+
ttlSeconds: z.number().optional(),
|
|
6300
|
+
config: z.record(z.unknown()).optional(),
|
|
6301
|
+
metadata: z.record(z.unknown()).optional(),
|
|
6302
|
+
allowedImages: z.array(z.string()).optional()
|
|
6303
|
+
},
|
|
6304
|
+
async (args) => {
|
|
6305
|
+
const workspaceId = readWorkspaceId();
|
|
6306
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6307
|
+
const input = { ...args, context: { workspaceId } };
|
|
6308
|
+
const data = await w.request(CREATE_SANDBOX_TEMPLATE, {
|
|
6309
|
+
input
|
|
6310
|
+
});
|
|
6311
|
+
return data.createSandboxTemplate;
|
|
6312
|
+
}
|
|
6313
|
+
);
|
|
6314
|
+
tool(
|
|
6315
|
+
"sandboxes_templates_update",
|
|
6316
|
+
"Update Sandbox Template",
|
|
6317
|
+
"Update an existing sandbox template config. Workspace context is injected from auth.",
|
|
6318
|
+
{
|
|
6319
|
+
id: z.string(),
|
|
6320
|
+
name: z.string().optional(),
|
|
6321
|
+
description: z.string().optional(),
|
|
6322
|
+
isDefault: z.boolean().optional(),
|
|
6323
|
+
containers: containersSchema.optional(),
|
|
6324
|
+
resources: resourcesSchema.optional(),
|
|
6325
|
+
storage: storageSchema.optional(),
|
|
6326
|
+
ttlSeconds: z.number().optional(),
|
|
6327
|
+
config: z.record(z.unknown()).optional(),
|
|
6328
|
+
metadata: z.record(z.unknown()).optional(),
|
|
6329
|
+
allowedImages: z.array(z.string()).optional()
|
|
6330
|
+
},
|
|
6331
|
+
async (args) => {
|
|
6332
|
+
const workspaceId = readWorkspaceId();
|
|
6333
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6334
|
+
const input = { ...args, context: { workspaceId } };
|
|
6335
|
+
const data = await w.request(UPDATE_SANDBOX_TEMPLATE, {
|
|
6336
|
+
input
|
|
6337
|
+
});
|
|
6338
|
+
return data.updateSandboxTemplate;
|
|
6339
|
+
}
|
|
6340
|
+
);
|
|
6341
|
+
tool(
|
|
6342
|
+
"sandboxes_templates_delete",
|
|
6343
|
+
"Delete Sandbox Template",
|
|
6344
|
+
"Delete a sandbox template config by ID.",
|
|
6345
|
+
{ id: z.string() },
|
|
6346
|
+
async ({ id }) => {
|
|
6347
|
+
const workspaceId = readWorkspaceId();
|
|
6348
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6349
|
+
const data = await w.request(DELETE_SANDBOX_TEMPLATE, {
|
|
6350
|
+
context: { workspaceId },
|
|
6351
|
+
id
|
|
6352
|
+
});
|
|
6353
|
+
return { deleted: data.deleteSandboxTemplate, id };
|
|
6354
|
+
}
|
|
6355
|
+
);
|
|
6356
|
+
tool(
|
|
6357
|
+
"sandboxes_export_create",
|
|
6358
|
+
"Export Sandboxes",
|
|
6359
|
+
"Start an async export job of sandboxes. Workspace + context injected from auth.",
|
|
6360
|
+
{
|
|
6361
|
+
format: sandboxExportFormat.describe("Export format: CSV or JSON"),
|
|
6362
|
+
template: sandboxTemplate.optional().describe("Filter: template type"),
|
|
6363
|
+
status: sandboxStatus.optional().describe("Filter: sandbox status"),
|
|
6364
|
+
includeUsageEvents: z.boolean().optional()
|
|
6365
|
+
},
|
|
6366
|
+
async ({ format, template, status, includeUsageEvents }) => {
|
|
6367
|
+
const workspaceId = readWorkspaceId();
|
|
6368
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6369
|
+
const filter = {};
|
|
6370
|
+
if (template !== void 0) filter.template = template;
|
|
6371
|
+
if (status !== void 0) filter.status = status;
|
|
6372
|
+
const input = {
|
|
6373
|
+
workspaceId,
|
|
6374
|
+
format,
|
|
6375
|
+
context: { workspaceId }
|
|
6376
|
+
};
|
|
6377
|
+
if (includeUsageEvents !== void 0) input.includeUsageEvents = includeUsageEvents;
|
|
6378
|
+
if (Object.keys(filter).length) input.filter = filter;
|
|
6379
|
+
const data = await w.request(EXPORT_SANDBOXES, { input });
|
|
6380
|
+
return data.exportSandboxes;
|
|
6381
|
+
}
|
|
6382
|
+
);
|
|
6383
|
+
tool(
|
|
6384
|
+
"sandboxes_export_get",
|
|
6385
|
+
"Get Sandbox Export Job",
|
|
6386
|
+
"Get a sandbox export job by ID.",
|
|
6387
|
+
{ jobId: z.string() },
|
|
6388
|
+
async ({ jobId }) => {
|
|
6389
|
+
const workspaceId = readWorkspaceId();
|
|
6390
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6391
|
+
const data = await w.request(GET_SANDBOX_EXPORT_JOB, {
|
|
6392
|
+
workspaceId,
|
|
6393
|
+
jobId,
|
|
6394
|
+
context: { workspaceId }
|
|
6395
|
+
});
|
|
6396
|
+
return data.getSandboxExportJob;
|
|
6397
|
+
}
|
|
6398
|
+
);
|
|
6399
|
+
tool(
|
|
6400
|
+
"sandboxes_export_list",
|
|
6401
|
+
"List Sandbox Export Jobs",
|
|
6402
|
+
"List sandbox export jobs for the workspace.",
|
|
6403
|
+
{
|
|
6404
|
+
limit: z.number().optional(),
|
|
6405
|
+
offset: z.number().optional(),
|
|
6406
|
+
page: z.number().optional()
|
|
6407
|
+
},
|
|
6408
|
+
async ({ limit, offset, page }) => {
|
|
6409
|
+
const workspaceId = readWorkspaceId();
|
|
6410
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6411
|
+
const pagination = {};
|
|
6412
|
+
if (limit !== void 0) pagination.limit = limit;
|
|
6413
|
+
if (offset !== void 0) pagination.offset = offset;
|
|
6414
|
+
if (page !== void 0) pagination.page = page;
|
|
6415
|
+
const data = await w.request(LIST_SANDBOX_EXPORT_JOBS, {
|
|
6416
|
+
workspaceId,
|
|
6417
|
+
context: { workspaceId },
|
|
6418
|
+
pagination: Object.keys(pagination).length ? pagination : void 0
|
|
6419
|
+
});
|
|
6420
|
+
return data.listSandboxExportJobs;
|
|
6421
|
+
}
|
|
6422
|
+
);
|
|
6423
|
+
tool(
|
|
6424
|
+
"sandboxes_export_get_artifact_bytes",
|
|
6425
|
+
"Get Sandbox Artifact Bytes",
|
|
6426
|
+
"Fetch raw bytes (base64) of a file artifact from a sandbox session. Context injected from auth.",
|
|
6427
|
+
{
|
|
6428
|
+
sandboxId: z.string(),
|
|
6429
|
+
sessionId: z.string(),
|
|
6430
|
+
path: z.string().describe("Path of the artifact file inside the sandbox"),
|
|
6431
|
+
onBehalfOfUserId: z.string().optional()
|
|
6432
|
+
},
|
|
6433
|
+
async (args) => {
|
|
6434
|
+
const workspaceId = readWorkspaceId();
|
|
6435
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6436
|
+
const input = { ...args, context: { workspaceId } };
|
|
6437
|
+
const data = await w.request(
|
|
6438
|
+
GET_SANDBOX_ARTIFACT_BYTES,
|
|
6439
|
+
{
|
|
6440
|
+
input
|
|
6441
|
+
}
|
|
6442
|
+
);
|
|
6443
|
+
return data.getSandboxArtifactBytes;
|
|
6444
|
+
}
|
|
6445
|
+
);
|
|
6446
|
+
tool(
|
|
6447
|
+
"sandboxes_admin_get_active",
|
|
6448
|
+
"Get Active Sandboxes",
|
|
6449
|
+
"Admin: list all currently active sandboxes across the workspace.",
|
|
6450
|
+
{},
|
|
6451
|
+
async () => {
|
|
6452
|
+
const workspaceId = readWorkspaceId();
|
|
6453
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6454
|
+
const data = await w.request(GET_ACTIVE_SANDBOXES, {
|
|
6455
|
+
context: { workspaceId }
|
|
6456
|
+
});
|
|
6457
|
+
return data.getActiveSandboxes;
|
|
6458
|
+
}
|
|
6459
|
+
);
|
|
6460
|
+
tool(
|
|
6461
|
+
"sandboxes_admin_get_recent_activity",
|
|
6462
|
+
"Get Recent Sandbox Activity",
|
|
6463
|
+
"Admin: list recent sandbox activity/audit entries.",
|
|
6464
|
+
{ limit: z.number().optional() },
|
|
6465
|
+
async ({ limit }) => {
|
|
6466
|
+
const workspaceId = readWorkspaceId();
|
|
6467
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6468
|
+
const data = await w.request(
|
|
6469
|
+
GET_RECENT_SANDBOX_ACTIVITY,
|
|
6470
|
+
{ context: { workspaceId }, limit }
|
|
6471
|
+
);
|
|
6472
|
+
return data.getRecentSandboxActivity;
|
|
6473
|
+
}
|
|
6474
|
+
);
|
|
6475
|
+
tool(
|
|
6476
|
+
"sandboxes_admin_list_all",
|
|
6477
|
+
"List All Sandboxes",
|
|
6478
|
+
"Admin: list all sandboxes (including other users) with optional filters.",
|
|
6479
|
+
{
|
|
6480
|
+
template: sandboxTemplate.optional(),
|
|
6481
|
+
status: sandboxStatus.optional(),
|
|
6482
|
+
limit: z.number().optional(),
|
|
6483
|
+
offset: z.number().optional(),
|
|
6484
|
+
page: z.number().optional()
|
|
6485
|
+
},
|
|
6486
|
+
async ({ template, status, limit, offset, page }) => {
|
|
6487
|
+
const workspaceId = readWorkspaceId();
|
|
6488
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6489
|
+
const filter = {};
|
|
6490
|
+
if (template !== void 0) filter.template = template;
|
|
6491
|
+
if (status !== void 0) filter.status = status;
|
|
6492
|
+
const pagination = {};
|
|
6493
|
+
if (limit !== void 0) pagination.limit = limit;
|
|
6494
|
+
if (offset !== void 0) pagination.offset = offset;
|
|
6495
|
+
if (page !== void 0) pagination.page = page;
|
|
6496
|
+
const data = await w.request(LIST_ALL_SANDBOXES, {
|
|
6497
|
+
context: { workspaceId },
|
|
6498
|
+
filter: Object.keys(filter).length ? filter : void 0,
|
|
6499
|
+
pagination: Object.keys(pagination).length ? pagination : void 0
|
|
6500
|
+
});
|
|
6501
|
+
return data.listAllSandboxes;
|
|
6502
|
+
}
|
|
6503
|
+
);
|
|
6504
|
+
tool(
|
|
6505
|
+
"sandboxes_admin_list_nodes",
|
|
6506
|
+
"List Sandbox Nodes",
|
|
6507
|
+
"Admin: list cluster nodes available for sandbox scheduling with capacity info.",
|
|
6508
|
+
{},
|
|
6509
|
+
async () => {
|
|
6510
|
+
const workspaceId = readWorkspaceId();
|
|
6511
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6512
|
+
const data = await w.request(LIST_SANDBOX_NODES, {
|
|
6513
|
+
context: { workspaceId }
|
|
6514
|
+
});
|
|
6515
|
+
return data.listSandboxNodes;
|
|
6516
|
+
}
|
|
6517
|
+
);
|
|
6518
|
+
tool(
|
|
6519
|
+
"sandboxes_proxy_request",
|
|
6520
|
+
"Proxy Sandbox Request",
|
|
6521
|
+
"Proxy an HTTP request into a running sandbox container. Context injected from auth.",
|
|
6522
|
+
{
|
|
6523
|
+
sandboxId: z.string(),
|
|
6524
|
+
method: z.string().describe("HTTP method, e.g. GET, POST, PUT, DELETE"),
|
|
6525
|
+
path: z.string().describe("Request path inside the sandbox"),
|
|
6526
|
+
body: z.record(z.unknown()).optional(),
|
|
6527
|
+
containerName: z.string().optional()
|
|
6528
|
+
},
|
|
6529
|
+
async (args) => {
|
|
6530
|
+
const workspaceId = readWorkspaceId();
|
|
6531
|
+
if (!workspaceId) throw new Error(NO_WORKSPACE);
|
|
6532
|
+
const input = { ...args, context: { workspaceId } };
|
|
6533
|
+
const data = await w.request(PROXY_SANDBOX_REQUEST, {
|
|
6534
|
+
input
|
|
6535
|
+
});
|
|
6536
|
+
return data.proxySandboxRequest;
|
|
6537
|
+
}
|
|
6538
|
+
);
|
|
6539
|
+
}
|
|
5908
6540
|
function registerUISessionTools(server, ctx, track) {
|
|
5909
6541
|
server.registerTool(
|
|
5910
6542
|
track(mcpToolName(ctx.productName, "ui_session_get")),
|
|
@@ -7545,6 +8177,7 @@ var vibecontrolsModule = {
|
|
|
7545
8177
|
registerConfigSettingsTools(server, ctx, trackTool);
|
|
7546
8178
|
registerWebhookTools(server, ctx, trackTool);
|
|
7547
8179
|
registerTunnelTools(server, ctx, trackTool);
|
|
8180
|
+
registerSandboxTools(server, ctx, trackTool);
|
|
7548
8181
|
registerUISessionTools(server, ctx, trackTool);
|
|
7549
8182
|
registerAiEventTools(server, ctx, trackTool);
|
|
7550
8183
|
registerTargetTools(server, ctx, trackTool);
|