feat: full Komodo API coverage — 11 tools, ~336 endpoints
Expand from 7 tools to 11 tools covering 100% of the Komodo v2.3.2 API: New tools: - komodo_summary: resource summaries/stats - komodo_inspect: Docker object inspection (16 types) - komodo_search_logs: log search with query - komodo_list_detail: extended listing (27 types) Expanded existing tools: - 12 → 21 resource types (action, repo, builder, swarm, variable, user_group, alert, terminal, git_provider_account) - 37 → 100+ execute operations - komodo_logs: 4 resource types with proper endpoints Other changes: - API key auth support (X-Api-Key / X-Api-Secret headers) - 30s fetch timeout + structured error handling - Updated docs: references/api.md (483 lines), README.md (238 lines)
This commit is contained in:
+276
@@ -13,6 +13,15 @@ export const ResourceType = z.enum([
|
||||
"tag",
|
||||
"execution",
|
||||
"access_request",
|
||||
"action",
|
||||
"repo",
|
||||
"builder",
|
||||
"swarm",
|
||||
"variable",
|
||||
"user_group",
|
||||
"alert",
|
||||
"terminal",
|
||||
"git_provider_account",
|
||||
]);
|
||||
export type ResourceType = z.infer<typeof ResourceType>;
|
||||
|
||||
@@ -55,6 +64,73 @@ export const ExecuteOperation = z.enum([
|
||||
"run_deployment_logs",
|
||||
"run_sync_deployment",
|
||||
"get_mcp_token",
|
||||
"deploy",
|
||||
"deploy_stack_if_changed",
|
||||
"destroy_stack",
|
||||
"destroy_container",
|
||||
"destroy_deployment",
|
||||
"build_repo",
|
||||
"clone_repo",
|
||||
"pull_repo",
|
||||
"pull_deployment",
|
||||
"cancel_repo_build",
|
||||
"clear_repo_cache",
|
||||
"run_action",
|
||||
"cancel_action",
|
||||
"cancel_build",
|
||||
"cancel_procedure",
|
||||
"start_container",
|
||||
"stop_container",
|
||||
"restart_container",
|
||||
"pause_container",
|
||||
"unpause_container",
|
||||
"start_all_containers",
|
||||
"stop_all_containers",
|
||||
"restart_all_containers",
|
||||
"pause_all_containers",
|
||||
"unpause_all_containers",
|
||||
"start_deployment",
|
||||
"stop_deployment",
|
||||
"restart_deployment",
|
||||
"pause_deployment",
|
||||
"unpause_deployment",
|
||||
"start_stack",
|
||||
"prune_buildx",
|
||||
"prune_docker_builders",
|
||||
"prune_system",
|
||||
"prune_volumes",
|
||||
"delete_image",
|
||||
"delete_network",
|
||||
"delete_volume",
|
||||
"remove_swarm_nodes",
|
||||
"remove_swarm_services",
|
||||
"remove_swarm_configs",
|
||||
"remove_swarm_secrets",
|
||||
"remove_swarm_stacks",
|
||||
"create_swarm_config",
|
||||
"create_swarm_secret",
|
||||
"rotate_swarm_config",
|
||||
"rotate_swarm_secret",
|
||||
"update_swarm_node",
|
||||
"batch_run_build",
|
||||
"batch_deploy_stack",
|
||||
"batch_deploy_stack_if_changed",
|
||||
"batch_deploy",
|
||||
"batch_pull_stack",
|
||||
"batch_pull_repo",
|
||||
"batch_build_repo",
|
||||
"batch_clone_repo",
|
||||
"batch_run_procedure",
|
||||
"batch_run_action",
|
||||
"batch_destroy_deployment",
|
||||
"batch_destroy_stack",
|
||||
"backup_core_database",
|
||||
"rotate_core_keys",
|
||||
"rotate_all_server_keys",
|
||||
"global_auto_update",
|
||||
"send_alert",
|
||||
"test_alerter",
|
||||
"sleep",
|
||||
]);
|
||||
export type ExecuteOperation = z.infer<typeof ExecuteOperation>;
|
||||
|
||||
@@ -72,6 +148,15 @@ export const LIST_REQUEST_MAP: Record<ResourceType, string> = {
|
||||
tag: "ListTags",
|
||||
execution: "ListExecutions",
|
||||
access_request: "ListAccessRequests",
|
||||
action: "ListActions",
|
||||
repo: "ListRepos",
|
||||
builder: "ListBuilders",
|
||||
swarm: "ListSwarms",
|
||||
variable: "ListVariables",
|
||||
user_group: "ListUserGroups",
|
||||
alert: "ListAlerts",
|
||||
terminal: "ListTerminals",
|
||||
git_provider_account: "ListGitProviderAccounts",
|
||||
};
|
||||
|
||||
// Maps resource_type to the search RPC request name
|
||||
@@ -88,6 +173,15 @@ export const SEARCH_REQUEST_MAP: Record<ResourceType, string> = {
|
||||
tag: "ListTags",
|
||||
execution: "ListExecutions",
|
||||
access_request: "ListAccessRequests",
|
||||
action: "ListActions",
|
||||
repo: "ListRepos",
|
||||
builder: "ListBuilders",
|
||||
swarm: "ListSwarms",
|
||||
variable: "ListVariables",
|
||||
user_group: "ListUserGroups",
|
||||
alert: "ListAlerts",
|
||||
terminal: "ListTerminals",
|
||||
git_provider_account: "ListGitProviderAccounts",
|
||||
};
|
||||
|
||||
// Maps resource_type to the get RPC request name
|
||||
@@ -104,6 +198,15 @@ export const GET_REQUEST_MAP: Record<ResourceType, string> = {
|
||||
tag: "GetTag",
|
||||
execution: "GetExecution",
|
||||
access_request: "GetAccessRequest",
|
||||
action: "GetAction",
|
||||
repo: "GetRepo",
|
||||
builder: "GetBuilder",
|
||||
swarm: "GetSwarm",
|
||||
variable: "GetVariable",
|
||||
user_group: "GetUserGroup",
|
||||
alert: "GetAlert",
|
||||
terminal: "GetTerminal",
|
||||
git_provider_account: "GetGitProviderAccount",
|
||||
};
|
||||
|
||||
// Maps resource_type to the create RPC request name
|
||||
@@ -117,6 +220,14 @@ export const CREATE_REQUEST_MAP: Partial<Record<ResourceType, string>> = {
|
||||
image_registry_account: "CreateImageRegistryAccount",
|
||||
sync_resource: "CreateSyncResource",
|
||||
tag: "AddTag",
|
||||
action: "CreateAction",
|
||||
repo: "CreateRepo",
|
||||
builder: "CreateBuilder",
|
||||
swarm: "CreateSwarm",
|
||||
variable: "CreateVariable",
|
||||
user_group: "CreateUserGroup",
|
||||
terminal: "CreateTerminal",
|
||||
git_provider_account: "CreateGitProviderAccount",
|
||||
};
|
||||
|
||||
// Maps resource_type to the update RPC request name
|
||||
@@ -131,6 +242,13 @@ export const UPDATE_REQUEST_MAP: Partial<Record<ResourceType, string>> = {
|
||||
sync_resource: "UpdateSyncResource",
|
||||
user: "UpdateUser",
|
||||
tag: "UpdateTag",
|
||||
action: "UpdateAction",
|
||||
repo: "UpdateRepo",
|
||||
builder: "UpdateBuilder",
|
||||
swarm: "UpdateSwarm",
|
||||
variable: "UpdateVariableValue",
|
||||
user_group: "UpdateUserGroup",
|
||||
git_provider_account: "UpdateGitProviderAccount",
|
||||
};
|
||||
|
||||
// Maps resource_type to the delete RPC request name
|
||||
@@ -143,6 +261,14 @@ export const DELETE_REQUEST_MAP: Partial<Record<ResourceType, string>> = {
|
||||
alerter: "DeleteAlerter",
|
||||
sync_resource: "DeleteSyncResource",
|
||||
tag: "DeleteTag",
|
||||
action: "DeleteAction",
|
||||
repo: "DeleteRepo",
|
||||
builder: "DeleteBuilder",
|
||||
swarm: "DeleteSwarm",
|
||||
variable: "DeleteVariable",
|
||||
user_group: "DeleteUserGroup",
|
||||
terminal: "DeleteTerminal",
|
||||
git_provider_account: "DeleteGitProviderAccount",
|
||||
};
|
||||
|
||||
// Maps execute operation to the RPC request name and the route
|
||||
@@ -230,4 +356,154 @@ export const EXECUTE_REQUEST_MAP: Record<
|
||||
run_deployment_logs: { route: "execute", name: "RunDeploymentLogs" },
|
||||
run_sync_deployment: { route: "execute", name: "RunSyncDeployment" },
|
||||
get_mcp_token: { route: "execute", name: "GetMcpToken" },
|
||||
deploy: { route: "execute", name: "Deploy" },
|
||||
deploy_stack_if_changed: { route: "execute", name: "DeployStackIfChanged" },
|
||||
destroy_stack: { route: "execute", name: "DestroyStack" },
|
||||
destroy_container: { route: "execute", name: "DestroyContainer" },
|
||||
destroy_deployment: { route: "execute", name: "DestroyDeployment" },
|
||||
build_repo: { route: "execute", name: "BuildRepo" },
|
||||
clone_repo: { route: "execute", name: "CloneRepo" },
|
||||
pull_repo: { route: "execute", name: "PullRepo" },
|
||||
pull_deployment: { route: "execute", name: "PullDeployment" },
|
||||
cancel_repo_build: { route: "execute", name: "CancelRepoBuild" },
|
||||
clear_repo_cache: { route: "execute", name: "ClearRepoCache" },
|
||||
run_action: { route: "execute", name: "RunAction" },
|
||||
cancel_action: { route: "execute", name: "CancelAction" },
|
||||
cancel_build: { route: "execute", name: "CancelBuild" },
|
||||
cancel_procedure: { route: "execute", name: "CancelProcedure" },
|
||||
start_container: { route: "execute", name: "StartContainer" },
|
||||
stop_container: { route: "execute", name: "StopContainer" },
|
||||
restart_container: { route: "execute", name: "RestartContainer" },
|
||||
pause_container: { route: "execute", name: "PauseContainer" },
|
||||
unpause_container: { route: "execute", name: "UnpauseContainer" },
|
||||
start_all_containers: { route: "execute", name: "StartAllContainers" },
|
||||
stop_all_containers: { route: "execute", name: "StopAllContainers" },
|
||||
restart_all_containers: { route: "execute", name: "RestartAllContainers" },
|
||||
pause_all_containers: { route: "execute", name: "PauseAllContainers" },
|
||||
unpause_all_containers: { route: "execute", name: "UnpauseAllContainers" },
|
||||
start_deployment: { route: "execute", name: "StartDeployment" },
|
||||
stop_deployment: { route: "execute", name: "StopDeployment" },
|
||||
restart_deployment: { route: "execute", name: "RestartDeployment" },
|
||||
pause_deployment: { route: "execute", name: "PauseDeployment" },
|
||||
unpause_deployment: { route: "execute", name: "UnpauseDeployment" },
|
||||
start_stack: { route: "execute", name: "StartStack" },
|
||||
prune_buildx: { route: "execute", name: "PruneBuildx" },
|
||||
prune_docker_builders: { route: "execute", name: "PruneDockerBuilders" },
|
||||
prune_system: { route: "execute", name: "PruneSystem" },
|
||||
prune_volumes: { route: "execute", name: "PruneVolumes" },
|
||||
delete_image: { route: "execute", name: "DeleteImage" },
|
||||
delete_network: { route: "execute", name: "DeleteNetwork" },
|
||||
delete_volume: { route: "execute", name: "DeleteVolume" },
|
||||
remove_swarm_nodes: { route: "execute", name: "RemoveSwarmNodes" },
|
||||
remove_swarm_services: { route: "execute", name: "RemoveSwarmServices" },
|
||||
remove_swarm_configs: { route: "execute", name: "RemoveSwarmConfigs" },
|
||||
remove_swarm_secrets: { route: "execute", name: "RemoveSwarmSecrets" },
|
||||
remove_swarm_stacks: { route: "execute", name: "RemoveSwarmStacks" },
|
||||
create_swarm_config: { route: "execute", name: "CreateSwarmConfig" },
|
||||
create_swarm_secret: { route: "execute", name: "CreateSwarmSecret" },
|
||||
rotate_swarm_config: { route: "execute", name: "RotateSwarmConfig" },
|
||||
rotate_swarm_secret: { route: "execute", name: "RotateSwarmSecret" },
|
||||
update_swarm_node: { route: "execute", name: "UpdateSwarmNode" },
|
||||
batch_run_build: { route: "execute", name: "BatchRunBuild" },
|
||||
batch_deploy_stack: { route: "execute", name: "BatchDeployStack" },
|
||||
batch_deploy_stack_if_changed: {
|
||||
route: "execute",
|
||||
name: "BatchDeployStackIfChanged",
|
||||
},
|
||||
batch_deploy: { route: "execute", name: "BatchDeploy" },
|
||||
batch_pull_stack: { route: "execute", name: "BatchPullStack" },
|
||||
batch_pull_repo: { route: "execute", name: "BatchPullRepo" },
|
||||
batch_build_repo: { route: "execute", name: "BatchBuildRepo" },
|
||||
batch_clone_repo: { route: "execute", name: "BatchCloneRepo" },
|
||||
batch_run_procedure: { route: "execute", name: "BatchRunProcedure" },
|
||||
batch_run_action: { route: "execute", name: "BatchRunAction" },
|
||||
batch_destroy_deployment: {
|
||||
route: "execute",
|
||||
name: "BatchDestroyDeployment",
|
||||
},
|
||||
batch_destroy_stack: { route: "execute", name: "BatchDestroyStack" },
|
||||
backup_core_database: { route: "execute", name: "BackupCoreDatabase" },
|
||||
rotate_core_keys: { route: "execute", name: "RotateCoreKeys" },
|
||||
rotate_all_server_keys: {
|
||||
route: "execute",
|
||||
name: "RotateAllServerKeys",
|
||||
},
|
||||
global_auto_update: { route: "execute", name: "GlobalAutoUpdate" },
|
||||
send_alert: { route: "execute", name: "SendAlert" },
|
||||
test_alerter: { route: "execute", name: "TestAlerter" },
|
||||
sleep: { route: "execute", name: "Sleep" },
|
||||
};
|
||||
|
||||
// Maps resource_type to the summary RPC request name
|
||||
export const SUMMARY_REQUEST_MAP: Partial<Record<ResourceType, string>> = {
|
||||
build: "GetBuildsSummary",
|
||||
deployment: "GetDeploymentsSummary",
|
||||
server: "GetServersSummary",
|
||||
stack: "GetStacksSummary",
|
||||
alerter: "GetAlertersSummary",
|
||||
procedure: "GetProceduresSummary",
|
||||
sync_resource: "GetResourceSyncsSummary",
|
||||
repo: "GetReposSummary",
|
||||
builder: "GetBuildersSummary",
|
||||
swarm: "GetSwarmsSummary",
|
||||
action: "GetActionsSummary",
|
||||
};
|
||||
|
||||
// Maps inspect type to the inspect RPC request name
|
||||
export const INSPECT_REQUEST_MAP: Record<string, string> = {
|
||||
container: "InspectContainer",
|
||||
image: "InspectImage",
|
||||
network: "InspectNetwork",
|
||||
volume: "InspectVolume",
|
||||
deployment_container: "InspectDeploymentContainer",
|
||||
deployment_swarm_service: "InspectDeploymentSwarmService",
|
||||
stack_container: "InspectStackContainer",
|
||||
stack_swarm_info: "InspectStackSwarmInfo",
|
||||
stack_swarm_service: "InspectStackSwarmService",
|
||||
swarm: "InspectSwarm",
|
||||
swarm_config: "InspectSwarmConfig",
|
||||
swarm_node: "InspectSwarmNode",
|
||||
swarm_secret: "InspectSwarmSecret",
|
||||
swarm_service: "InspectSwarmService",
|
||||
swarm_stack: "InspectSwarmStack",
|
||||
swarm_task: "InspectSwarmTask",
|
||||
};
|
||||
|
||||
// Maps search log type to the RPC request name
|
||||
export const SEARCH_LOG_REQUEST_MAP: Record<string, string> = {
|
||||
container: "SearchContainerLog",
|
||||
deployment: "SearchDeploymentLog",
|
||||
stack: "SearchStackLog",
|
||||
swarm_service: "SearchSwarmServiceLog",
|
||||
};
|
||||
|
||||
// Maps list detail type to the RPC request name
|
||||
export const LIST_DETAIL_REQUEST_MAP: Record<string, string> = {
|
||||
containers: "ListContainers",
|
||||
all_containers: "ListAllContainers",
|
||||
images: "ListImages",
|
||||
networks: "ListNetworks",
|
||||
volumes: "ListVolumes",
|
||||
system_processes: "ListSystemProcesses",
|
||||
schedules: "ListSchedules",
|
||||
permissions: "ListPermissions",
|
||||
api_keys: "ListApiKeys",
|
||||
api_keys_for_service_user: "ListApiKeysForServiceUser",
|
||||
onboarding_keys: "ListOnboardingKeys",
|
||||
secrets: "ListSecrets",
|
||||
updates: "ListUpdates",
|
||||
build_versions: "ListBuildVersions",
|
||||
compose_projects: "ListComposeProjects",
|
||||
user_target_permissions: "ListUserTargetPermissions",
|
||||
full_stacks: "ListFullStacks",
|
||||
full_builds: "ListFullBuilds",
|
||||
full_servers: "ListFullServers",
|
||||
full_deployments: "ListFullDeployments",
|
||||
full_procedures: "ListFullProcedures",
|
||||
full_repos: "ListFullRepos",
|
||||
full_builders: "ListFullBuilders",
|
||||
full_swarms: "ListFullSwarms",
|
||||
full_actions: "ListFullActions",
|
||||
full_alerters: "ListFullAlerters",
|
||||
full_resource_syncs: "ListFullResourceSyncs",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user