Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.
TypeScript browser-shellcontrol-planefile-managerhomelabmobile-firstnextjsptyreactself-hostedserver-managementshadcn-uisysadmintailwindcssterminaltypescriptvpsweb-desktopweb-terminal
feat: add bounded Dokploy Dockerfile build operation
Rahman46c9fa52be49
diff --git a/lib/infra/clients.ts b/lib/infra/clients.tsindex 451b74a6..4f1cb0ac 100644--- a/lib/infra/clients.ts+++ b/lib/infra/clients.ts@@ -10,7 +10,7 @@ import { doctorHostinger } from "./hostinger";import { doctorComposio } from "./composio";export { listCloudflareZones, upsertCloudflareDns } from "./cloudflare";-export { ensureDokployProject, listDokployProjects, listDokployApplications, listDokployDeployments, readDokployDeploymentLogs, inspectDokployApplication, listDokployGitProviders, listDokployGithubRepositories, inspectDokployGithubProvider, testDokployGithubProvider, ensureDokployGithubApplication, ensureDokployApplicationDomain, recoverDokployPublicGithubToHttpsGit, deployDokployApplication, upsertDokployPublicBuildEnv } from "./dokploy";+export { ensureDokployProject, listDokployProjects, listDokployApplications, listDokployDeployments, readDokployDeploymentLogs, inspectDokployApplication, listDokployGitProviders, listDokployGithubRepositories, inspectDokployGithubProvider, testDokployGithubProvider, ensureDokployGithubApplication, ensureDokployApplicationDomain, recoverDokployPublicGithubToHttpsGit, deployDokployApplication, configureDokployDockerfileBuild, upsertDokployPublicBuildEnv } from "./dokploy";export { upsertHostingerDns } from "./hostinger";export { listHostingerMailOrders, getHostingerMailPlan, listHostingerMail, listHostingerMailLogs, mutateHostingerMail } from "./hostinger-mail";diff --git a/lib/infra/connection-dispatch.ts b/lib/infra/connection-dispatch.tsindex e29b4683..a029072e 100644--- a/lib/infra/connection-dispatch.ts+++ b/lib/infra/connection-dispatch.ts@@ -4,7 +4,7 @@ import { authorizeIntegration, composioConnectionCall } from "./connection-exterimport { IntegrationError, identity, metadataOnly, type ConnectionSelector } from "./identity";import { importConvexCliPersonalConnection } from "./convex-cli-import";import { listConvexCustomDomains, ensureConvexCustomDomain, getConvexCanonicalUrls, setConvexCanonicalUrl, getConvexEnvPresence } from "./convex-cloud";-import { doctorInfraProvider, ensureDokployProject, listDokployApplications, listDokployDeployments, readDokployDeploymentLogs, listDokployGitProviders, listDokployGithubRepositories, ensureDokployGithubApplication, ensureDokployApplicationDomain, recoverDokployPublicGithubToHttpsGit, deployDokployApplication, listDokployProjects, listCloudflareZones, upsertCloudflareDns, upsertDokployPublicBuildEnv, upsertHostingerDns, listHostingerMailOrders, getHostingerMailPlan, listHostingerMail, listHostingerMailLogs, mutateHostingerMail } from "./clients";+import { doctorInfraProvider, ensureDokployProject, listDokployApplications, listDokployDeployments, readDokployDeploymentLogs, listDokployGitProviders, listDokployGithubRepositories, ensureDokployGithubApplication, ensureDokployApplicationDomain, recoverDokployPublicGithubToHttpsGit, deployDokployApplication, configureDokployDockerfileBuild, listDokployProjects, listCloudflareZones, upsertCloudflareDns, upsertDokployPublicBuildEnv, upsertHostingerDns, listHostingerMailOrders, getHostingerMailPlan, listHostingerMail, listHostingerMailLogs, mutateHostingerMail } from "./clients";import { isInfraProviderId } from "./catalog";export const safeActionInput=(input:Record<string,unknown>)=>Object.fromEntries(Object.entries(input).filter(([key])=>key!=="workflow_id"));export const selectionFrom=(a:Record<string,unknown>):ConnectionSelector=>({user:typeof a.user==="string"?a.user:undefined,connection:typeof a.connection==="string"?a.connection:undefined,cwd:typeof a.cwd==="string"?a.cwd:undefined});@@ -47,6 +47,7 @@ export async function executeIntegrationAction(raw:Record<string,unknown>){"dokploy.deployment.logs":{provider:"dokploy",fields:["deploymentId","tail"],run:()=>readDokployDeploymentLogs(String((args as Record<string,unknown>).deploymentId),Number((args as Record<string,unknown>).tail??160))},"dokploy.git.recover":{provider:"dokploy",fields:["applicationId"],run:()=>recoverDokployPublicGithubToHttpsGit(String((args as Record<string,unknown>).applicationId))},"dokploy.application.deploy":{provider:"dokploy",fields:["applicationId"],run:()=>deployDokployApplication(String((args as Record<string,unknown>).applicationId))},+ "dokploy.dockerfile":{provider:"dokploy",fields:["applicationId","dockerfile","dockerContextPath"],run:()=>configureDokployDockerfileBuild(args as {applicationId:string;dockerfile?:string;dockerContextPath?:string})},"dokploy.application.publicEnv.upsert":{provider:"dokploy",fields:["applicationId","key","value"],run:()=>upsertDokployPublicBuildEnv(args as {applicationId:string;key:string;value:string})},"dokploy.project.ensure":{provider:"dokploy",fields:["name"],run:()=>ensureDokployProject(String((args as Record<string,unknown>).name))},"convex.customDomains.list":{provider:"convex-cloud",fields:["deploymentName"],run:()=>listConvexCustomDomains(String((args as Record<string,unknown>).deploymentName))},diff --git a/lib/infra/dokploy.ts b/lib/infra/dokploy.tsindex d83acfc0..1e609cb0 100644--- a/lib/infra/dokploy.ts+++ b/lib/infra/dokploy.ts@@ -200,6 +200,7 @@ export async function inspectDokployGithubProvider(githubId:string){const id=dokexport async function testDokployGithubProvider(githubId:string){const id=dokployId(githubId,"github id"),payload=await call("/github.testConnection","POST",{githubId:id});const row=obj(payload);return {ok:row.success===true||row.ok===true,message:redactText(String(row.message??row.detail??""),500)};}export async function deployDokployApplication(applicationId:string){const id=dokployId(applicationId,"application id");await call("/application.deploy","POST",{applicationId:id});return {applicationId:id,redeployQueued:true};}+export async function configureDokployDockerfileBuild(args:{applicationId:string;dockerfile?:string;dockerContextPath?:string}){const applicationId=dokployId(args.applicationId,"application id"),dockerfile=(args.dockerfile??"Dockerfile").trim(),dockerContextPath=(args.dockerContextPath??".").trim()||".";if(!/^[A-Za-z0-9._\-/]{1,240}$/.test(dockerfile)||dockerfile.startsWith("/")||dockerfile.includes(".."))throw new Error("invalid Dokploy Dockerfile path");if(!/^(?:\.|\/?[A-Za-z0-9._\-/]{0,239})$/.test(dockerContextPath)||dockerContextPath.includes(".."))throw new Error("invalid Dokploy Docker context path");await call("/application.saveBuildType","POST",{applicationId,buildType:"dockerfile",dockerfile,dockerContextPath,dockerBuildStage:null,herokuVersion:null,railpackVersion:null});const after=await inspectDokployApplication(applicationId);if(after.buildType!=="dockerfile")throw new Error("Dokploy Dockerfile build type could not be verified");return {applicationId,buildType:after.buildType,dockerfile,dockerContextPath};}const DOKPLOY_GIT_PART=/^[A-Za-z0-9_.-]{1,180}$/,DOKPLOY_BRANCH=/^[A-Za-z0-9._\-/#]{1,180}$/,DOKPLOY_BUILD_PATH=/^\/?[A-Za-z0-9._\-/]*$/,DOKPLOY_HOST=/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/;diff --git a/lib/mcp/integration-model-contract.test.ts b/lib/mcp/integration-model-contract.test.tsindex 51b200fa..9cd6f02e 100644--- a/lib/mcp/integration-model-contract.test.ts+++ b/lib/mcp/integration-model-contract.test.ts@@ -27,6 +27,7 @@ it("exposes the bounded Dokploy application operations through integration_execuexpect(operations).toContain("dokploy.github.repositories.list");expect(operations).toContain("dokploy.application.ensureGithub");expect(operations).toContain("dokploy.domain.ensure");+ expect(operations).toContain("dokploy.dockerfile");expect(operations).toContain("dokploy.application.publicEnv.upsert");expect(operations.some(operation=>/request|fetch|raw/i.test(operation))).toBe(false);});diff --git a/lib/mcp/tools-integrations.ts b/lib/mcp/tools-integrations.tsindex fccc4cab..badba16b 100644--- a/lib/mcp/tools-integrations.ts+++ b/lib/mcp/tools-integrations.ts@@ -20,9 +20,9 @@ export const INTEGRATION_TOOLS:McpTool[]=[run:async a=>{const out=await manageIntegrationAction(a);if("privateUrl" in out){const{privateUrl,...safe}=out;return mcpDirect([{type:"text",text:"Authorization link available in the private integration UI."}],false,{result:safe},{integrationAuthorization:{url:privateUrl}});}return{result:out};},},{name:"integration_execute",title:"Use an Exact Integration Connection",scope:"exec",annotations:{readOnlyHint:false,destructiveHint:true,openWorldHint:true},audit:{action:"infra.write",targetArg:"connection"},limit:{key:"integration.execute",max:30,windowMs:60000},- description:"Execute using an explicit user/provider/named connection. Verify or inspect its route; bounded direct operations reject external backends. Composio tool execution requires an ACTIVE matching connected account and a toolkit-prefixed tool. Native-MCP returns the provider route without copying OAuth tokens. Non-verification operations require confirm=true. No credentials in arguments.",+ description:"Execute using an explicit user/provider/named connection. Verify or inspect its route; bounded direct operations reject external backends. Composio tool execution requires an ACTIVE connected account and a toolkit-prefixed tool. Native-MCP returns the provider route without copying OAuth tokens. Non-verification operations require confirm=true. No credentials in arguments.",chatgptDescription:"Execute.",- inputSchema:S({...BASE,operation:{type:"string",enum:["route","verify","dokploy.projects.list","dokploy.applications.list","dokploy.gitProviders.list","dokploy.github.repositories.list","dokploy.application.ensureGithub","dokploy.domain.ensure","dokploy.deployments.list","dokploy.deployment.logs","dokploy.git.recover","dokploy.application.deploy","dokploy.application.publicEnv.upsert","dokploy.project.ensure","convex.customDomains.list","convex.customDomain.ensure","convex.canonical.get","convex.env.presence","convex.canonical.set","cloudflare.zones.list","cloudflare.dns.upsert","hostinger.dns.upsert","hostinger.mail.orders.list","hostinger.mail.plan.get","hostinger.mail.list","hostinger.mail.logs.list","hostinger.mail.mutate","composio.tool"]},confirm:{type:"boolean"},tool:{type:"string",maxLength:180},arguments:{type:"object",additionalProperties:true}},["user","provider","connection","operation"]),outputSchema:OUTPUT,+ inputSchema:S({...BASE,operation:{type:"string",enum:["route","verify","dokploy.projects.list","dokploy.applications.list","dokploy.gitProviders.list","dokploy.github.repositories.list","dokploy.application.ensureGithub","dokploy.domain.ensure","dokploy.deployments.list","dokploy.deployment.logs","dokploy.git.recover","dokploy.application.deploy","dokploy.dockerfile","dokploy.application.publicEnv.upsert","dokploy.project.ensure","convex.customDomains.list","convex.customDomain.ensure","convex.canonical.get","convex.env.presence","convex.canonical.set","cloudflare.zones.list","cloudflare.dns.upsert","hostinger.dns.upsert","hostinger.mail.orders.list","hostinger.mail.plan.get","hostinger.mail.list","hostinger.mail.logs.list","hostinger.mail.mutate","composio.tool"]},confirm:{type:"boolean"},tool:{type:"string",maxLength:180},arguments:{type:"object",additionalProperties:true}},["user","provider","connection","operation"]),outputSchema:OUTPUT,meta:{ui:{visibility:["model","app"]},"openai/widgetAccessible":true},run:async a=>({result:await executeIntegrationAction(a)}),},];