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(infra): add bounded Dokploy application deploy
Rahmanf68cd5567321
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex 451ccec7..0b8ff7a3 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -8,6 +8,7 @@ this is the *what*, and it is what Settings → About shows as “What's new”.**Added**+- `infra` add bounded Dokploy application deploy- `infra` separate DOKU payment and MCP credentials- `infra` add private DOKU MCP connections- `infra` add private Convex env presence checksdiff --git a/docs/PROGRESS.md b/docs/PROGRESS.mdindex 8a7d9d33..12d61d12 100644--- a/docs/PROGRESS.md+++ b/docs/PROGRESS.md@@ -2814,3 +2814,7 @@ Screenshot evidence previously lived in unrelated scratch directories or only in- Expanded the native `doku` integration from MCP-only to two explicit methods: Payment REST (`Payment Client ID` + HMAC `Payment Secret Key`) and MCP (`MCP Client ID` + `MCP API Key`). The methods cannot silently substitute for each other.- Payment credential verification uses a signed, read-only synthetic Check Status request against the fixed official sandbox/production endpoint. Only a verified `Transaction Not Found` response is accepted; `Invalid Merchant` 404 remains fail-closed.- MCP credential verification remains a fixed-endpoint MCP `initialize` request. DOKU credentials stay in MSO's owner-only integration store and are never copied into project MCP JSON, Baton notes, RR, or chat.++### 2026-09-06 — Bounded Dokploy manual deploy+- Added `dokploy.application.deploy`, an exact-application bounded operation through a selected named Dokploy connection. It queues only `/application.deploy` for a validated application ID and returns no provider credentials.+- This replaces project-specific redeploy helpers that read a loose Dokploy API key from shell environment when an auto-deploy webhook is missed.diff --git a/lib/infra/clients.ts b/lib/infra/clients.tsindex 8688b79d..7374bf8e 100644--- a/lib/infra/clients.ts+++ b/lib/infra/clients.ts@@ -9,7 +9,7 @@ import { doctorHostinger } from "./hostinger";import { doctorComposio } from "./composio";export { listCloudflareZones, upsertCloudflareDns } from "./cloudflare";-export { ensureDokployProject, listDokployProjects, listDokployApplications, listDokployDeployments, readDokployDeploymentLogs, inspectDokployApplication, listDokployGitProviders, inspectDokployGithubProvider, testDokployGithubProvider, recoverDokployPublicGithubToHttpsGit, upsertDokployPublicBuildEnv } from "./dokploy";+export { ensureDokployProject, listDokployProjects, listDokployApplications, listDokployDeployments, readDokployDeploymentLogs, inspectDokployApplication, listDokployGitProviders, inspectDokployGithubProvider, testDokployGithubProvider, recoverDokployPublicGithubToHttpsGit, deployDokployApplication, 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 16052448..cd383db5 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, recoverDokployPublicGithubToHttpsGit, listDokployProjects, listCloudflareZones, upsertCloudflareDns, upsertDokployPublicBuildEnv, upsertHostingerDns, listHostingerMailOrders, getHostingerMailPlan, listHostingerMail, listHostingerMailLogs, mutateHostingerMail } from "./clients";+import { doctorInfraProvider, ensureDokployProject, listDokployApplications, listDokployDeployments, readDokployDeploymentLogs, recoverDokployPublicGithubToHttpsGit, deployDokployApplication, 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});@@ -42,6 +42,7 @@ export async function executeIntegrationAction(raw:Record<string,unknown>){"dokploy.deployments.list":{provider:"dokploy",fields:["applicationId"],run:()=>listDokployDeployments(String((args as Record<string,unknown>).applicationId))},"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.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-deploy.test.ts b/lib/infra/dokploy-deploy.test.tsnew file mode 100644index 00000000..16783ac6--- /dev/null+++ b/lib/infra/dokploy-deploy.test.ts@@ -0,0 +1,17 @@+import { expect, it, vi } from "vitest";+import { promises as fs } from "node:fs";+import os from "node:os";+import path from "node:path";++it("queues one exact Dokploy application deploy without exposing provider credentials", async () => {+ const root=await fs.mkdtemp(path.join(os.tmpdir(),"mso-dokploy-deploy-"));process.env.OS_INFRA_STORE=path.join(root,"infra.json");+ try{+ vi.resetModules();+ const { integrationManage }=await import("./connection-manage"),{ withIntegrationSelection }=await import("./connection-service"),{ setInfraProvider }=await import("./store");+ await integrationManage({action:"user.create",user:"alice",confirm:true});await integrationManage({action:"connection.create",user:"alice",provider:"dokploy",connection:"default",source:"direct",authMethod:"direct",confirm:true});+ await withIntegrationSelection({user:"alice",connection:"default"},()=>setInfraProvider("dokploy",{apiUrl:"http://127.0.0.1:4123/api",apiKey:"synthetic_dokploy_key_1234567890"}));+ const mock=vi.fn(async(input:RequestInfo|URL,init?:RequestInit)=>{const req=new Request(input,init);expect(req.url).toBe("http://127.0.0.1:4123/api/application.deploy");expect(req.method).toBe("POST");expect(JSON.parse(await req.text())).toEqual({applicationId:"ABCDEFGH1234"});return new Response("{}",{status:200});});vi.stubGlobal("fetch",mock);+ const {deployDokployApplication}=await import("./dokploy");+ const result=await withIntegrationSelection({user:"alice",connection:"default"},()=>deployDokployApplication("ABCDEFGH1234"));expect(result).toEqual({applicationId:"ABCDEFGH1234",redeployQueued:true});expect(JSON.stringify(result)).not.toContain("synthetic_dokploy_key");+ }finally{delete process.env.OS_INFRA_STORE;await fs.rm(root,{recursive:true,force:true});vi.unstubAllGlobals();}+});diff --git a/lib/infra/dokploy.ts b/lib/infra/dokploy.tsindex 654b8041..a6358522 100644--- a/lib/infra/dokploy.ts+++ b/lib/infra/dokploy.ts@@ -199,6 +199,8 @@ export async function listDokployGithubRepositories(githubId:string){export async function inspectDokployGithubProvider(githubId:string){const id=dokployId(githubId,"github id"),row=obj(await call(`/github.one?githubId=${encodeURIComponent(id)}`));return {githubId:String(row.githubId??""),name:String(row.name??""),githubAppName:String(row.githubAppName??""),githubInstallationId:String(row.githubInstallationId??""),githubUrl:String(row.githubUrl??"")};}export 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 recoverDokployPublicGithubToHttpsGit(applicationId:string){const id=dokployId(applicationId,"application id"),before=await readDokployApplication(id);if(before.sourceType!=="github")throw new Error("Dokploy application is not using the GitHub source provider");diff --git a/lib/mcp/tools-integrations.ts b/lib/mcp/tools-integrations.tsindex d9bd22d3..701ade8c 100644--- a/lib/mcp/tools-integrations.ts+++ b/lib/mcp/tools-integrations.ts@@ -22,7 +22,7 @@ export const INTEGRATION_TOOLS:McpTool[]=[{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.",chatgptDescription:"Run a bounded integration operation.",- inputSchema:S({...BASE,operation:{type:"string",enum:["route","verify","dokploy.projects.list","dokploy.applications.list","dokploy.deployments.list","dokploy.deployment.logs","dokploy.git.recover","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.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,meta:{ui:{visibility:["model","app"]},"openai/widgetAccessible":true},run:async a=>({result:await executeIntegrationAction(a)}),},];