constructor-research-mcp 0.6.2 → 0.6.3

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/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Constructor Research MCP
2
2
 
3
+ > **0.6.3:** `delete_resources` deletes applications, services and images, after the user approves the list.
4
+ >
3
5
  > **0.6.2:** a ready-made image works on a project with deployment off (it is switched on first); logs keep 2000 lines per build or service for 14 days, services are followed for two hours, and `watched` says when.
4
6
  >
5
7
  > **0.6.1:** inside a Constructor desk, a key saved for your Constructor works even when the desk names another address for it (`ROLOS_API_SERVER`, e.g. `constructor.app` in a desk opened on `acme.constructor.app`).
@@ -91,24 +93,25 @@ When the MCP runs in VS Code inside a Constructor Research desk, it finds that d
91
93
 
92
94
  `CONSTRUCTOR_LOCAL_DESK=0` turns this off.
93
95
 
94
- ## Thirteen tools
95
-
96
- | Tool | Agent's task |
97
- | ------------------------ | ----------------------------------------------------------------------------------- |
98
- | `deploy_app` | Describe all services in one request, or resume that deployment with overrides. |
99
- | `update_app` | Describe selected changes/additions; the MCP builds and restarts affected services. |
100
- | `start_app` / `stop_app` | Request lifecycle changes for all or selected services. |
101
- | `get_deployment` | Map all deployments, inspect a project or app, or wait for background execution. |
102
- | `get_logs` | Last 10–500 lines of a build or service log (see "Logs"). |
103
- | `build_image` | Build an image independently when needed. |
104
- | `list_images` | List image IDs, Dockerfiles and native build statuses. |
105
- | `list_files` | List a disk's files and folders; `recursive:true` walks subfolders. |
106
- | `create_folder` | Create a disk folder, including missing parents. |
107
- | `sync_files` | Upload new and changed files; asks once before replacing existing files. |
108
- | `move_path` | Rename or move files/folders in one batch, approved once; never overwrites. |
109
- | `delete_path` | Delete files/folders in one batch; reports first, deletes only with `confirm:true`. |
110
-
111
- No special clone/new-instance workflow is implemented. The thirteen tools use the same standard MCP transport across harnesses.
96
+ ## Fourteen tools
97
+
98
+ | Tool | Agent's task |
99
+ | ------------------------ | ---------------------------------------------------------------------------------------------- |
100
+ | `deploy_app` | Describe all services in one request, or resume that deployment with overrides. |
101
+ | `update_app` | Describe selected changes/additions; the MCP builds and restarts affected services. |
102
+ | `start_app` / `stop_app` | Request lifecycle changes for all or selected services. |
103
+ | `delete_resources` | Delete applications, single services or images; lists them first, deletes with `confirm:true`. |
104
+ | `get_deployment` | Map all deployments, inspect a project or app, or wait for background execution. |
105
+ | `get_logs` | Last 10–500 lines of a build or service log (see "Logs"). |
106
+ | `build_image` | Build an image independently when needed. |
107
+ | `list_images` | List image IDs, Dockerfiles and native build statuses. |
108
+ | `list_files` | List a disk's files and folders; `recursive:true` walks subfolders. |
109
+ | `create_folder` | Create a disk folder, including missing parents. |
110
+ | `sync_files` | Upload new and changed files; asks once before replacing existing files. |
111
+ | `move_path` | Rename or move files/folders in one batch, approved once; never overwrites. |
112
+ | `delete_path` | Delete files/folders in one batch; reports first, deletes only with `confirm:true`. |
113
+
114
+ No special clone/new-instance workflow is implemented. The fourteen tools use the same standard MCP transport across harnesses.
112
115
 
113
116
  ## Where to act: the desk link
114
117
 
@@ -228,6 +231,15 @@ Successful builds and unchanged service definitions are retained. Environment ov
228
231
 
229
232
  A failed build returns `failure.stage`, `failure.service`, `failure.dockerfile` and `failure.image_id`. A service API failure includes the stage and service. The message is concise: **“Please check the logs in Constructor.”** Logs and browser access are not part of this workflow.
230
233
 
234
+ ## Deleting applications, services and images
235
+
236
+ `delete_resources` takes `project_id` (or `desk_url`) and any of `application_ids` (each with all its services), `service_ids` (the rest of the application stays) and `image_ids`. Without `confirm` it changes nothing and returns `confirm_required` with what would go: services, public URLs, and volumes whose data would be lost. The agent asks the user once for the whole list and repeats the call with `confirm:true`. Then the MCP:
237
+
238
+ - ends unfinished deployments of the affected applications (`superseded`), so none of them recreates what is deleted;
239
+ - deletes services, then applications, then images (an image is free once its services are gone);
240
+ - keeps an image that a service not being deleted still uses (`kept_in_use`), and reports IDs that are not in the project (`not_found`);
241
+ - reports each item as `deleted`, `already_gone`, `failed` or `uncertain` (`status: partial` when any was not deleted).
242
+
231
243
  ## Service links and volumes
232
244
 
233
245
  - An environment variable can be `{service, port}` instead of a string. The MCP turns it into the other service's internal address as a bare `host:port` (e.g. `svc-temporal.app-1234abcd.svc.cluster.local:7233`), which suits gRPC, databases and Temporal. Add `scheme: "http"` to get `http://host:port`. `{service, exposure: "public"}` gives the public https URL.
@@ -66,6 +66,76 @@ export declare class DeploymentEngine {
66
66
  * has no such endpoint yet (the caller then builds it from FROM).
67
67
  */
68
68
  registerExternal(project: string, service: string, reference: string, retried?: boolean): Promise<any>;
69
+ /**
70
+ * Deletes applications (with all their services), single services and images of one
71
+ * project. Without confirm it only reports what would go, including public URLs and
72
+ * volumes whose data is lost, for the user to approve once. An image that a service
73
+ * not being deleted still uses is kept. Unfinished deployments of affected
74
+ * applications are ended first, so they cannot recreate what was deleted.
75
+ */
76
+ deleteResources(raw: unknown): Promise<{
77
+ status: string;
78
+ message: string;
79
+ kept_in_use: {
80
+ image_id: string;
81
+ name: string;
82
+ used_by: string[];
83
+ }[];
84
+ not_found: string[];
85
+ delete?: undefined;
86
+ results?: undefined;
87
+ ended_deployments?: undefined;
88
+ } | {
89
+ status: string;
90
+ message: string;
91
+ delete: {
92
+ applications: {
93
+ application_id: any;
94
+ name: any;
95
+ services: any;
96
+ }[];
97
+ services: {
98
+ service_id: any;
99
+ name: any;
100
+ application_id: any;
101
+ application_name: any;
102
+ public_url: any;
103
+ volumes: any;
104
+ }[];
105
+ images: {
106
+ image_id: string;
107
+ name: any;
108
+ source: any;
109
+ reference: any;
110
+ desk_name: any;
111
+ }[];
112
+ };
113
+ kept_in_use: {
114
+ image_id: string;
115
+ name: string;
116
+ used_by: string[];
117
+ }[];
118
+ not_found: string[];
119
+ results?: undefined;
120
+ ended_deployments?: undefined;
121
+ } | {
122
+ delete?: undefined;
123
+ status: string;
124
+ message: string;
125
+ results: {
126
+ kind: string;
127
+ id: string;
128
+ name: string;
129
+ result: string;
130
+ }[];
131
+ ended_deployments: string[];
132
+ kept_in_use: {
133
+ image_id: string;
134
+ name: string;
135
+ used_by: string[];
136
+ }[];
137
+ not_found: string[];
138
+ }>;
69
139
  listImages(raw: unknown): Promise<{
70
140
  results: any[];
71
141
  total: number;
@@ -1,7 +1,7 @@
1
1
  import { randomUUID, createHash } from "node:crypto";
2
2
  import { setTimeout as delay } from "node:timers/promises";
3
3
  import { ToolError, segment as e } from "./api.js";
4
- import { deployInput, updateInput, buildInput, listInput, lifecycleInput, getInput, } from "./schemas.js";
4
+ import { deployInput, updateInput, buildInput, listInput, lifecycleInput, getInput, deleteInput, } from "./schemas.js";
5
5
  const NOTICE = "Start requested; application readiness is unverified. Initial small deployments usually take 1–2 minutes; updates often take tens of seconds. These are estimates.";
6
6
  export const terminal = new Set([
7
7
  "started",
@@ -462,6 +462,198 @@ export class DeploymentEngine {
462
462
  throw err;
463
463
  }
464
464
  }
465
+ /**
466
+ * Deletes applications (with all their services), single services and images of one
467
+ * project. Without confirm it only reports what would go, including public URLs and
468
+ * volumes whose data is lost, for the user to approve once. An image that a service
469
+ * not being deleted still uses is kept. Unfinished deployments of affected
470
+ * applications are ended first, so they cannot recreate what was deleted.
471
+ */
472
+ async deleteResources(raw) {
473
+ const i = deleteInput.parse(raw);
474
+ if (!i.application_ids?.length &&
475
+ !i.service_ids?.length &&
476
+ !i.image_ids?.length)
477
+ bad("Name at least one application, service or image to delete.");
478
+ const project = i.project_id;
479
+ await this.project(project);
480
+ const apps = await this.apps(project);
481
+ const images = await this.images(project);
482
+ const not_found = [];
483
+ const describe = (sv, app) => {
484
+ const v = publicService(sv, project, app.id);
485
+ return {
486
+ service_id: sv.id,
487
+ name: sv.name,
488
+ application_id: app.id,
489
+ application_name: app.name,
490
+ public_url: v.public_url,
491
+ volumes: (sv.volumes ?? []).map((x) => `${x.mount_point ?? x.name}${x.size_gb ? ` (${x.size_gb} GB)` : ""}`),
492
+ };
493
+ };
494
+ const applications = [...new Set(i.application_ids ?? [])].flatMap((id) => {
495
+ const app = apps.find((a) => a.id === id);
496
+ if (!app) {
497
+ not_found.push(`application ${id}`);
498
+ return [];
499
+ }
500
+ return [
501
+ {
502
+ application_id: app.id,
503
+ name: app.name,
504
+ services: (app.services ?? []).map((sv) => describe(sv, app)),
505
+ },
506
+ ];
507
+ });
508
+ const goingApps = new Set(applications.map((a) => a.application_id));
509
+ const services = [...new Set(i.service_ids ?? [])].flatMap((id) => {
510
+ const app = apps.find((a) => (a.services ?? []).some((sv) => sv.id === id));
511
+ if (!app) {
512
+ not_found.push(`service ${id}`);
513
+ return [];
514
+ }
515
+ // Goes with its application anyway.
516
+ if (goingApps.has(app.id))
517
+ return [];
518
+ return [
519
+ describe(app.services.find((sv) => sv.id === id), app),
520
+ ];
521
+ });
522
+ const goingServices = new Set([
523
+ ...services.map((sv) => sv.service_id),
524
+ ...applications.flatMap((a) => a.services.map((sv) => sv.service_id)),
525
+ ]);
526
+ const kept = [];
527
+ const imageRows = [...new Set(i.image_ids ?? [])].flatMap((id) => {
528
+ const im = images.find((x) => x.id === id);
529
+ if (!im) {
530
+ not_found.push(`image ${id}`);
531
+ return [];
532
+ }
533
+ const used_by = apps.flatMap((a) => (a.services ?? [])
534
+ .filter((sv) => sv.image_id === id && !goingServices.has(sv.id))
535
+ .map((sv) => `${a.name}/${sv.name}`));
536
+ if (used_by.length) {
537
+ kept.push({ image_id: id, name: im.name, used_by });
538
+ return [];
539
+ }
540
+ return [
541
+ {
542
+ image_id: id,
543
+ name: im.name,
544
+ source: im.source,
545
+ reference: im.reference,
546
+ desk_name: im.desk_name,
547
+ },
548
+ ];
549
+ });
550
+ const plan = { applications, services, images: imageRows };
551
+ const count = applications.length + services.length + imageRows.length;
552
+ const notes = [
553
+ kept.length
554
+ ? `Kept, still used by a service that stays: ${kept.map((k) => `${k.name} (${k.used_by.join(", ")})`).join("; ")}.`
555
+ : "",
556
+ not_found.length ? `Not in this project: ${not_found.join(", ")}.` : "",
557
+ ].filter(Boolean);
558
+ if (!count)
559
+ return {
560
+ status: "nothing_to_delete",
561
+ message: ["Nothing was deleted.", ...notes].join(" "),
562
+ kept_in_use: kept,
563
+ not_found,
564
+ };
565
+ if (!i.confirm) {
566
+ const volumes = [
567
+ ...applications.flatMap((a) => a.services),
568
+ ...services,
569
+ ].flatMap((sv) => sv.volumes.map((v) => `${sv.application_name}/${sv.name}: ${v}`));
570
+ return {
571
+ status: "confirm_required",
572
+ message: [
573
+ `${count} item${count > 1 ? "s" : ""} would be deleted. This cannot be undone; public URLs stop working${volumes.length ? ` and these volumes lose all their data: ${volumes.join("; ")}` : ""}. Nothing was changed: ask the user once to approve the whole list, then repeat the same call with confirm=true.`,
574
+ ...notes,
575
+ ].join(" "),
576
+ delete: plan,
577
+ kept_in_use: kept,
578
+ not_found,
579
+ };
580
+ }
581
+ // End unfinished deployments of these applications first, under the lock, so none of
582
+ // them recreates a service after it is deleted.
583
+ const touched = new Set([
584
+ ...goingApps,
585
+ ...services.map((sv) => sv.application_id),
586
+ ]);
587
+ const ended = [];
588
+ await this.store.exclusive(async () => {
589
+ for (const id of await this.store.ids()) {
590
+ let op;
591
+ try {
592
+ op = await this.store.load(id);
593
+ }
594
+ catch {
595
+ continue;
596
+ }
597
+ if (!op?.application_id || !touched.has(op.application_id))
598
+ continue;
599
+ if (terminal.has(op.status))
600
+ continue;
601
+ op.status = "superseded";
602
+ delete op.pending;
603
+ op.message =
604
+ "Ended because its application or services were deleted (delete_resources).";
605
+ await this.store.save(op);
606
+ ended.push(op.id);
607
+ }
608
+ });
609
+ const results = [];
610
+ const remove = async (kind, path, id, name) => {
611
+ try {
612
+ await this.api.request("DELETE", path);
613
+ results.push({ kind, id, name, result: "deleted" });
614
+ }
615
+ catch (err) {
616
+ if (!(err instanceof ToolError) || err.code === "needs_key")
617
+ throw err;
618
+ const gone = err.status === 404 ||
619
+ (err.status === 421 && /not found/i.test(err.reason ?? ""));
620
+ results.push({
621
+ kind,
622
+ id,
623
+ name,
624
+ result: gone
625
+ ? "already_gone"
626
+ : err.code === "api_error"
627
+ ? `failed: ${err.message}`
628
+ : `uncertain: ${err.message} Check with get_deployment or list_images.`,
629
+ });
630
+ }
631
+ };
632
+ // Services, then applications, then images: an image is free once its services are gone.
633
+ for (const sv of services)
634
+ await remove("service", `/services/${e(sv.service_id)}`, sv.service_id, sv.name);
635
+ for (const a of applications)
636
+ await remove("application", `/applications/${e(a.application_id)}`, a.application_id, a.name);
637
+ for (const im of imageRows)
638
+ await remove("image", `/images/${e(im.image_id)}`, im.image_id, im.name);
639
+ const failed = results.filter((r) => !/^(deleted|already_gone)$/.test(r.result));
640
+ return {
641
+ status: failed.length ? "partial" : "deleted",
642
+ message: [
643
+ `Deleted ${results.length - failed.length} of ${results.length}${failed.length ? `; ${failed.length} not deleted (see results)` : ""}.`,
644
+ ended.length
645
+ ? `Ended unfinished deployment${ended.length > 1 ? "s" : ""} ${ended.join(", ")}.`
646
+ : "",
647
+ ...notes,
648
+ ]
649
+ .filter(Boolean)
650
+ .join(" "),
651
+ results,
652
+ ended_deployments: ended,
653
+ kept_in_use: kept,
654
+ not_found,
655
+ };
656
+ }
465
657
  async listImages(raw) {
466
658
  const input = listInput.parse(raw);
467
659
  await this.project(input.project_id);
package/dist/schemas.d.ts CHANGED
@@ -204,6 +204,13 @@ export declare const createFolderInput: z.ZodObject<{
204
204
  desk_id: z.ZodString;
205
205
  path: z.ZodString;
206
206
  }, z.core.$strict>;
207
+ export declare const deleteInput: z.ZodObject<{
208
+ project_id: z.ZodString;
209
+ application_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
210
+ service_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
211
+ image_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
212
+ confirm: z.ZodDefault<z.ZodBoolean>;
213
+ }, z.core.$strict>;
207
214
  export declare const movePathInput: z.ZodObject<{
208
215
  project_id: z.ZodString;
209
216
  desk_id: z.ZodString;
package/dist/schemas.js CHANGED
@@ -227,6 +227,25 @@ const confirm = z
227
227
  .boolean()
228
228
  .default(false)
229
229
  .describe("false (default) returns the full list for the user to approve once; true performs it.");
230
+ export const deleteInput = z.strictObject({
231
+ project_id: id,
232
+ application_ids: z
233
+ .array(id)
234
+ .max(20)
235
+ .optional()
236
+ .describe("Applications to delete, each with all its services."),
237
+ service_ids: z
238
+ .array(id)
239
+ .max(50)
240
+ .optional()
241
+ .describe("Services to delete; the rest of their application stays (services[].id in get_deployment)."),
242
+ image_ids: z
243
+ .array(id)
244
+ .max(50)
245
+ .optional()
246
+ .describe("Images to delete (list_images). An image a remaining service uses is kept."),
247
+ confirm,
248
+ });
230
249
  export const movePathInput = z.strictObject({
231
250
  project_id: id,
232
251
  desk_id: id,
package/dist/server.js CHANGED
@@ -27,9 +27,10 @@ const DESK_DEFAULT = new Set([
27
27
  "update_app",
28
28
  "start_app",
29
29
  "stop_app",
30
+ "delete_resources",
30
31
  ]);
31
32
  import { ZodError } from "zod";
32
- import { buildInput, listInput, deployInput, updateInput, lifecycleInput, getInput, logsInput, listFilesInput, createFolderInput, syncFilesInput, movePathInput, deletePathInput, } from "./schemas.js";
33
+ import { buildInput, listInput, deployInput, updateInput, lifecycleInput, deleteInput, getInput, logsInput, listFilesInput, createFolderInput, syncFilesInput, movePathInput, deletePathInput, } from "./schemas.js";
33
34
  async function main() {
34
35
  const config = configFromEnv();
35
36
  const api = new PlatformApi(config);
@@ -232,7 +233,7 @@ async function main() {
232
233
  ? text.replace(/Where to act: ask the user for the Constructor desk link.*?if the user has not said where to deploy or where files live, ask\. /, deskInstructions(config.localDesk) + " ")
233
234
  : text;
234
235
  const server = new McpServer({ name: "constructor-research", version: VERSION }, {
235
- instructions: withDesk(`Access: the MCP works with one Constructor and the user's personal access key for it, set up outside the chat. When a tool returns needs_key, pass its instructions on to the user; never ask for the key in the chat. Where to act: ask the user for the Constructor desk link (they open the desk in the browser and copy the address; it contains /projects/<project>/desks/<desk>) and pass it as desk_url. Do not pick a project yourself; if the user has not said where to deploy or where files live, ask. Given a project only (project_id), the MCP uses its only desk, or creates one for a deploy when there is none; when the project has several desks it returns desk_choice_required with their names and links: ask the user which one. Ask the user only before replacing, renaming or deleting files on a disk, once per request for the whole list (the tools return confirm_required); creating folders and uploading new files need no question. ${RULES} For a local app, pass build.local_path (the folder with the Dockerfile) and deploy_app uploads it first. A service can also take image: a public registry reference (repo:tag) that runs unchanged. The MCP uses the copy in the project when there is one (list_images shows source and reference), otherwise adds it to the project as an external image, with no desk and no build; if Constructor refuses it (image_refused), tell the user the reason. Hardware: leave it out; the default is used. Set hardware minimums only when the app cannot run without a GPU or a lot of RAM. Use deploy_app/update_app once for the WHOLE application. The MCP builds, resolves service URLs, configures and starts services in the background. IDs are automatic. To wait, run the wait command that next_action names (with a shell), or call get_deployment(wait_seconds=45) again until it is finished; never perform the deployment steps yourself. Never end the turn while a deployment the user asked for is still running. When the user asks to deploy or build, wait until the deployment is finished before answering, then give the public URL or what failed. On failure, tell the user the failed stage/service; failure.log_tail and get_logs show the last build or service log lines. Do not use browser or debugging tools. For source files: sync_files to the desk before building (the MCP checks each Dockerfile on the disk and reports warnings); after a needs_upload pause, sync and call get_deployment with files_uploaded=true. Started is not readiness.`),
236
+ instructions: withDesk(`Access: the MCP works with one Constructor and the user's personal access key for it, set up outside the chat. When a tool returns needs_key, pass its instructions on to the user; never ask for the key in the chat. Never read the key file or call Constructor's API yourself (curl, scripts): everything goes through these tools, and if they cannot do something, tell the user. Where to act: ask the user for the Constructor desk link (they open the desk in the browser and copy the address; it contains /projects/<project>/desks/<desk>) and pass it as desk_url. Do not pick a project yourself; if the user has not said where to deploy or where files live, ask. Given a project only (project_id), the MCP uses its only desk, or creates one for a deploy when there is none; when the project has several desks it returns desk_choice_required with their names and links: ask the user which one. Ask the user only before replacing, renaming or deleting files on a disk, once per request for the whole list (the tools return confirm_required); creating folders and uploading new files need no question. ${RULES} For a local app, pass build.local_path (the folder with the Dockerfile) and deploy_app uploads it first. A service can also take image: a public registry reference (repo:tag) that runs unchanged. The MCP uses the copy in the project when there is one (list_images shows source and reference), otherwise adds it to the project as an external image, with no desk and no build; if Constructor refuses it (image_refused), tell the user the reason. Hardware: leave it out; the default is used. Set hardware minimums only when the app cannot run without a GPU or a lot of RAM. Use deploy_app/update_app once for the WHOLE application. The MCP builds, resolves service URLs, configures and starts services in the background. IDs are automatic. To wait, run the wait command that next_action names (with a shell), or call get_deployment(wait_seconds=45) again until it is finished; never perform the deployment steps yourself. Never end the turn while a deployment the user asked for is still running. When the user asks to deploy or build, wait until the deployment is finished before answering, then give the public URL or what failed. On failure, tell the user the failed stage/service; failure.log_tail and get_logs show the last build or service log lines. Do not use browser or debugging tools. To remove applications, services or images, use delete_resources (it asks the user first). For source files: sync_files to the desk before building (the MCP checks each Dockerfile on the disk and reports warnings); after a needs_upload pause, sync and call get_deployment with files_uploaded=true. Started is not readiness.`),
236
237
  });
237
238
  const register = (name, description, schema, fn, readOnly = false, budget = 20000, scope) => {
238
239
  const here = config.localDesk && DESK_DEFAULT.has(name) ? config.localDesk : undefined;
@@ -329,6 +330,7 @@ async function main() {
329
330
  register("update_app", "Update/add selected services in one request; preserve omitted settings. MCP handles builds, links and restarts in the background. Environment variables merge; supplied port/volume lists replace their lists. Resume a failed update using deployment_id and service overrides. The Dockerfile rules in deploy_app apply.", updateInput, checked((a) => runtime.update(a)), false, 60000, "deploy");
330
331
  register("start_app", "Start all or selected services as one operation. MCP handles all requests. Waits up to wait_seconds (default 20); remaining execution continues in the background. Started does not mean ready.", lifecycleInput, (a) => runtime.lifecycle("start", a), false, 20000, "project");
331
332
  register("stop_app", "Stop all or selected services as one operation. MCP handles all requests. Waits up to wait_seconds (default 20). Stopped means stop requests accepted, not verified teardown.", lifecycleInput, (a) => runtime.lifecycle("stop", a), false, 20000, "project");
333
+ register("delete_resources", "Delete applications (each with all its services), single services, or images of one project, in one call for the whole request. Without confirm it returns what would be deleted (confirm_required), with public URLs and volumes whose data is lost, for the user to approve once; repeat with confirm=true. An image a remaining service uses is kept. Unfinished deployments of affected applications are ended first. Cannot be undone.", deleteInput, (a) => engine.deleteResources(a), false, 60000, "project");
332
334
  register("get_deployment", "With deployment_id, observe/wait for background execution; the MCP owns execution. Each call waits up to wait_seconds (default 45, max 50); to wait longer, call again, as often as needed (a loop of get_deployment calls is fine), until execution is finished; do not answer the user while it is still in the background. Services carry status_changes and restarts_seen when the MCP saw the status change or a new container start. After sync_files (or manual upload) set files_uploaded=true; after a new key is saved, checking the job resumes it. With no arguments, returns the map of all deployments: every deployment-enabled project with its applications and services (names, native statuses, public URLs, ports). With desk_url or project_id, returns that project's desks, images, hardware and applications; add application_id for one application. resume=false observes only. Never returns environment-variable values.", getInput, (a) => runtime.get(a), false, 55000, "deploy");
333
335
  register("get_logs", "Last lines (default 20, up to 500) of a build or service log: why a build or start failed, how far a long build got, what a starting service prints. Constructor serves logs only live: a build log while the build runs, a service log for its current container while it runs (both replayed from the start, then streamed). The MCP follows the builds it starts until they end, and the services it starts or shows for two hours after that (or after the last get_logs), and keeps their last 2000 lines on this machine for 14 days, so they stay readable after the build ends, the container restarts or the agent restarts; watched says when it followed. Anything else can be read only while it runs. When a new container starts, the lines of the one before stay, above a '--- new container' marker, and restarts_seen counts them: that answers whether a service keeps restarting and why. An empty service log on a running service usually means a crash loop.", logsInput, async (a) => {
334
336
  const i = logsInput.parse(a);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "constructor-research-mcp",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "type": "module",
5
5
  "description": "Local deployment MCP for Constructor Research",
6
6
  "license": "MIT",