@taiga-ai/mcp-server 0.37.0-dev.973 → 0.37.0-dev.975

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.
Files changed (2) hide show
  1. package/dist/index.js +31 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -23883,6 +23883,10 @@ var TaigaClient = class {
23883
23883
  async listBuildRunSteps(id) {
23884
23884
  return this.request("GET", `/builds/${seg(id)}/steps`);
23885
23885
  }
23886
+ /** The public hosts the run reached through the egress gateway (PRO-4268). */
23887
+ async listBuildRunEgressHosts(id) {
23888
+ return this.request("GET", `/builds/${seg(id)}/hosts`);
23889
+ }
23886
23890
  async getMaintenanceSummary(productId) {
23887
23891
  return this.request("GET", `/products/${seg(productId)}/maintenance/summary`);
23888
23892
  }
@@ -37214,14 +37218,21 @@ function registerBuildTools(server, client) {
37214
37218
  }));
37215
37219
  server.registerTool("taiga_get_run", {
37216
37220
  title: "Get run",
37217
- description: "Read one coding agent run, and why it failed when it did: its outcome, pull request, security pass (scanCoverage names scanners that did not run) and each step with its commit, files and checks. A failed run says where it stopped (stoppedIn) and the line of the error that says why (cause). full: true adds every step's instructions and report. lastReplan says what a request for changes did to the plan the run builds now: the steps it added, edited and dropped. A failed or stopped run's nextStep says how to carry it on (taiga_resume_initiative on its initiative).",
37221
+ description: "Read one coding agent run, and why it failed when it did: its outcome, pull request, security pass (scanCoverage names scanners that did not run) and each step with its commit, files and checks. A failed run says where it stopped (stoppedIn) and the line of the error that says why (cause). full: true adds every step's instructions and report. lastReplan says what a request for changes did to the plan the run builds now: the steps it added, edited and dropped. A failed or stopped run's nextStep says how to carry it on (taiga_resume_initiative on its initiative). hostsReached lists the public hosts the run reached through the egress gateway, first reached first, with the bytes it sent and received there.",
37218
37222
  inputSchema: object({
37219
37223
  runId,
37220
37224
  full: boolean().optional().describe("Carry each step's complete instructions and report (default false: a summary)")
37221
37225
  }),
37222
37226
  annotations: READ_ONLY
37223
37227
  }, (params) => runTool(async () => {
37224
- const [run, steps] = await Promise.all([client.getBuildRun(params.runId), client.listBuildRunSteps(params.runId)]);
37228
+ const [run, steps, hosts] = await Promise.all([
37229
+ client.getBuildRun(params.runId),
37230
+ client.listBuildRunSteps(params.runId),
37231
+ client.listBuildRunEgressHosts(params.runId).catch((error) => {
37232
+ if (error instanceof TaigaApiError && error.status === 404) return { data: [] };
37233
+ throw error;
37234
+ })
37235
+ ]);
37225
37236
  const runRow = run.data;
37226
37237
  const rows = steps.data.map((step) => neverStarted(step));
37227
37238
  const where = stoppedIn(runRow, rows);
@@ -37239,7 +37250,8 @@ function registerBuildTools(server, client) {
37239
37250
  ...lastReplan ? { lastReplan: {
37240
37251
  ...lastReplan,
37241
37252
  waitsForReview
37242
- } } : {}
37253
+ } } : {},
37254
+ ...hostsReachedOf(hosts.data)
37243
37255
  };
37244
37256
  const note = verificationNote(rows);
37245
37257
  const verification = note ? { verificationNote: note } : {};
@@ -37299,6 +37311,22 @@ function steerSituation(steer) {
37299
37311
  if (steer === "after_round") return "The run is answering review comments or fixing CI; the request is planned when that round ends, and no further automatic round starts while it is open.";
37300
37312
  return "A re-plan is already running; the request joins it.";
37301
37313
  }
37314
+ /** At most this many hosts in a run's read; the rest are counted. */
37315
+ const HOSTS_REACHED_SHOWN = 50;
37316
+ /** Where a run went (PRO-4268): its hosts, first reached first, or nothing for a run that reached none. */
37317
+ function hostsReachedOf(hosts) {
37318
+ if (hosts.length === 0) return {};
37319
+ const shown = hosts.slice(0, HOSTS_REACHED_SHOWN).map(({ host, sentBytes, receivedBytes, connections }) => ({
37320
+ host,
37321
+ sentBytes,
37322
+ receivedBytes,
37323
+ connections
37324
+ }));
37325
+ return {
37326
+ hostsReached: shown,
37327
+ ...hosts.length > shown.length ? { hostsReachedNotShown: hosts.length - shown.length } : {}
37328
+ };
37329
+ }
37302
37330
  //#endregion
37303
37331
  //#region src/tools/queue.ts
37304
37332
  /** How many entries the read names; past this an entry keeps its initiativeId only. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.37.0-dev.973",
3
+ "version": "0.37.0-dev.975",
4
4
  "description": "Taiga for AI coding assistants: read products, policies, initiatives and runs, and operate the line, over MCP",
5
5
  "mcpName": "ga.tai/mcp-server",
6
6
  "license": "UNLICENSED",