@hoststack.dev/mcp 0.12.0 → 0.13.0
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/hoststack-mcp.js +108 -3
- package/dist/hoststack-mcp.js.map +1 -1
- package/dist/index.js +108 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/hoststack-mcp.js
CHANGED
|
@@ -1970,7 +1970,7 @@ defineTool({
|
|
|
1970
1970
|
|
|
1971
1971
|
// src/tools/projects.ts
|
|
1972
1972
|
import { z as z12 } from "zod";
|
|
1973
|
-
var
|
|
1973
|
+
var AVAILABLE_REGION_IDS = ["eu-central-1"];
|
|
1974
1974
|
defineTool({
|
|
1975
1975
|
name: "list_projects",
|
|
1976
1976
|
category: "projects",
|
|
@@ -2003,7 +2003,7 @@ defineTool({
|
|
|
2003
2003
|
"Inputs:",
|
|
2004
2004
|
" - name: human-readable project name (1\u201360 chars).",
|
|
2005
2005
|
" - description (optional): short blurb shown in the dashboard.",
|
|
2006
|
-
' - region (optional): "eu-central-1" (Falkenstein)
|
|
2006
|
+
' - region (optional): "eu-central-1" (Falkenstein). Currently the only region with available capacity; defaults to eu-central-1.',
|
|
2007
2007
|
"",
|
|
2008
2008
|
"Returns: { project: Project } \u2014 includes the new id and publicId.",
|
|
2009
2009
|
"",
|
|
@@ -2012,7 +2012,7 @@ defineTool({
|
|
|
2012
2012
|
input: {
|
|
2013
2013
|
name: z12.string().min(1).max(60).describe("Project name (1\u201360 chars)."),
|
|
2014
2014
|
description: z12.string().max(500).optional().describe("Short description (\u2264500 chars)."),
|
|
2015
|
-
region: z12.enum(
|
|
2015
|
+
region: z12.enum(AVAILABLE_REGION_IDS).optional().describe("Region: eu-central-1 (Falkenstein) \u2014 currently the only available region.")
|
|
2016
2016
|
},
|
|
2017
2017
|
handler: async (args2, ctx) => {
|
|
2018
2018
|
const teamId = await ctx.resolveTeamId();
|
|
@@ -2420,6 +2420,111 @@ defineTool({
|
|
|
2420
2420
|
});
|
|
2421
2421
|
}
|
|
2422
2422
|
});
|
|
2423
|
+
defineTool({
|
|
2424
|
+
name: "list_dev_environments",
|
|
2425
|
+
category: "services",
|
|
2426
|
+
description: [
|
|
2427
|
+
`List the team's dev environments (the dashboard "Development" section), each annotated with the companion services attached to it.`,
|
|
2428
|
+
"",
|
|
2429
|
+
`When to use: "show my dev environments", before opening/tearing one down, to find a box's id.`,
|
|
2430
|
+
"",
|
|
2431
|
+
'Returns: { items: [{ ...service, devUrl, databases }] } where `databases` lists the companion engines wired into the box (e.g. ["postgres","redis"]).',
|
|
2432
|
+
"",
|
|
2433
|
+
"Example: list_dev_environments() \u2192 every dev box for the active team."
|
|
2434
|
+
].join("\n"),
|
|
2435
|
+
input: {},
|
|
2436
|
+
handler: async (_args, ctx) => {
|
|
2437
|
+
const teamId = await ctx.resolveTeamId();
|
|
2438
|
+
const { environments } = await ctx.hoststack.services.listDevEnvironments(teamId);
|
|
2439
|
+
return respond({
|
|
2440
|
+
summary: `${environments.length} dev environment${environments.length === 1 ? "" : "s"}.`,
|
|
2441
|
+
data: {
|
|
2442
|
+
items: environments.map((env) => ({
|
|
2443
|
+
...shapeService(env),
|
|
2444
|
+
devUrl: env.devUrl ?? null,
|
|
2445
|
+
databases: env.databases ?? []
|
|
2446
|
+
}))
|
|
2447
|
+
}
|
|
2448
|
+
});
|
|
2449
|
+
}
|
|
2450
|
+
});
|
|
2451
|
+
defineTool({
|
|
2452
|
+
name: "create_standalone_dev_environment",
|
|
2453
|
+
category: "services",
|
|
2454
|
+
description: [
|
|
2455
|
+
"Create a STANDALONE dev environment in one call: a cloud box (Claude Code + Codex + OpenCode + MCPs) on a persistent /workspace, from a connected GitHub repo, an arbitrary clone URL, or blank \u2014 with optional companion Postgres / Redis / Meilisearch wired into its env (mirrors a local `make db-up`). The box lives in the team's hidden Development home, NOT under a project.",
|
|
2456
|
+
"",
|
|
2457
|
+
'When to use: "create a dev environment for <repo>", "spin me up a cloud dev box with a Postgres". Distinct from spin_up_dev_environment (which clones an EXISTING service) and create_dev_environment (a bare box in a chosen project).',
|
|
2458
|
+
"",
|
|
2459
|
+
"Inputs:",
|
|
2460
|
+
" - name: the dev box name.",
|
|
2461
|
+
' - source_kind: "github_repo" (clone a connected repo \u2014 needs github_repo_id), "url" (clone any http(s) git URL \u2014 needs clone_url), or "blank" (empty box).',
|
|
2462
|
+
" - github_repo_id (for github_repo): numeric id of a connected GitHub repo.",
|
|
2463
|
+
" - clone_url (for url): an http(s) git clone URL.",
|
|
2464
|
+
" - branch (optional): branch to clone.",
|
|
2465
|
+
' - databases (optional): companion services to attach \u2014 any of "postgres", "redis", "meilisearch".',
|
|
2466
|
+
' - plan (optional): box size (default "micro").',
|
|
2467
|
+
"",
|
|
2468
|
+
"Returns: { service, devUrl, deployId } \u2014 deploying. Once live: open the Terminal tab, run `claude`, start the dev server on $PORT, view at https://<devUrl>. Tear down with delete_dev_environment.",
|
|
2469
|
+
"",
|
|
2470
|
+
'Example: create_standalone_dev_environment({ name: "app-dev", source_kind: "github_repo", github_repo_id: 42, databases: ["postgres","redis"] })'
|
|
2471
|
+
].join("\n"),
|
|
2472
|
+
input: {
|
|
2473
|
+
name: z13.string().min(1).max(100).describe("Dev box name."),
|
|
2474
|
+
source_kind: z13.enum(["github_repo", "url", "blank"]).describe("Where the code comes from."),
|
|
2475
|
+
github_repo_id: z13.number().int().positive().optional().describe('Connected GitHub repo id (required when source_kind="github_repo").'),
|
|
2476
|
+
clone_url: z13.string().url().optional().describe('http(s) git clone URL (required when source_kind="url").'),
|
|
2477
|
+
branch: z13.string().min(1).max(255).optional().describe("Branch to clone."),
|
|
2478
|
+
databases: z13.array(z13.enum(["postgres", "redis", "meilisearch"])).optional().describe("Companion services to attach (fresh + empty)."),
|
|
2479
|
+
plan: z13.enum(SERVICE_PLANS).optional().describe('Box size (default "micro").')
|
|
2480
|
+
},
|
|
2481
|
+
handler: async (args2, ctx) => {
|
|
2482
|
+
const teamId = await ctx.resolveTeamId();
|
|
2483
|
+
let source;
|
|
2484
|
+
if (args2.source_kind === "github_repo") {
|
|
2485
|
+
if (!args2.github_repo_id) {
|
|
2486
|
+
return respond({
|
|
2487
|
+
summary: 'github_repo_id is required when source_kind is "github_repo".',
|
|
2488
|
+
data: { ok: false }
|
|
2489
|
+
});
|
|
2490
|
+
}
|
|
2491
|
+
source = {
|
|
2492
|
+
kind: "github_repo",
|
|
2493
|
+
githubRepoId: args2.github_repo_id,
|
|
2494
|
+
...args2.branch ? { branch: args2.branch } : {}
|
|
2495
|
+
};
|
|
2496
|
+
} else if (args2.source_kind === "url") {
|
|
2497
|
+
if (!args2.clone_url) {
|
|
2498
|
+
return respond({
|
|
2499
|
+
summary: 'clone_url is required when source_kind is "url".',
|
|
2500
|
+
data: { ok: false }
|
|
2501
|
+
});
|
|
2502
|
+
}
|
|
2503
|
+
source = {
|
|
2504
|
+
kind: "url",
|
|
2505
|
+
cloneUrl: args2.clone_url,
|
|
2506
|
+
...args2.branch ? { branch: args2.branch } : {}
|
|
2507
|
+
};
|
|
2508
|
+
} else {
|
|
2509
|
+
source = { kind: "blank" };
|
|
2510
|
+
}
|
|
2511
|
+
const input = {
|
|
2512
|
+
name: args2.name,
|
|
2513
|
+
source,
|
|
2514
|
+
...args2.databases ? { databases: args2.databases } : {},
|
|
2515
|
+
...args2.plan ? { plan: args2.plan } : {}
|
|
2516
|
+
};
|
|
2517
|
+
const result = await ctx.hoststack.services.createDevEnvironment(teamId, input);
|
|
2518
|
+
return respond({
|
|
2519
|
+
summary: `Created dev environment "${result.service.name}" (${result.service.publicId}) \u2014 deploying. Once live: open the Terminal tab, run \`claude\`, start the dev server on $PORT, and view it at https://${result.devUrl}.`,
|
|
2520
|
+
data: {
|
|
2521
|
+
service: shapeService(result.service),
|
|
2522
|
+
devUrl: result.devUrl,
|
|
2523
|
+
deployId: result.deployId
|
|
2524
|
+
}
|
|
2525
|
+
});
|
|
2526
|
+
}
|
|
2527
|
+
});
|
|
2423
2528
|
defineTool({
|
|
2424
2529
|
name: "get_service",
|
|
2425
2530
|
category: "services",
|