@taiga-ai/mcp-server 0.39.0-dev.1231 → 0.39.0-dev.1232

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 +39 -39
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -38442,7 +38442,7 @@ function withFixability(row) {
38442
38442
  fixNote: baseImageWaitNote(base)
38443
38443
  };
38444
38444
  }
38445
- if (typeof row["baseMove"] === "boolean" && isAgentRemediable({ remediableBy: remediableByOf(row) })) return row["baseMove"] === true && row["status"] === "open" ? {
38445
+ if (typeof row["baseMove"] === "boolean" && isAgentRemediable({ remediableBy: remediableByOf(row) })) return row["baseMove"] && row["status"] === "open" ? {
38446
38446
  ...row,
38447
38447
  fixable: true,
38448
38448
  fixNote: "taiga_fix_finding moves the base images it is in to the builds their tags name now, the FROM line alone, with every other advisory that move removes."
@@ -38963,17 +38963,17 @@ function registerMaintenanceTools(server, client) {
38963
38963
  const standing = (await client.getPolicyStanding(params.productId)).data;
38964
38964
  const controls = Array.isArray(standing.controls) ? standing.controls : [];
38965
38965
  const violations = Array.isArray(standing.divergences) ? standing.divergences : [];
38966
- const listed = controls.filter((c) => Number(c.divergenceCount ?? 0) > 0 || Number(c.findingCount ?? 0) > 0);
38966
+ const listed = controls.filter((c) => (c.divergenceCount ?? 0) > 0 || (c.findingCount ?? 0) > 0);
38967
38967
  const summary = standingSummary(standing);
38968
38968
  const assessment = standing.assessment;
38969
38969
  const assessedAt = typeof assessment?.assessedAt === "string" ? assessment.assessedAt : null;
38970
- const note = assessment?.state === "never" ? "Never assessed: the documents have not been checked against the policies yet, so nothing here is an all-clear. " + (standing.canAssess === false && standing.hasPolicies !== false ? "It has no reality documents to assess yet: an import derives them (taiga_start_import for a product set up from its code, paid work: ask first), and the assessment follows." : "An assessment runs when the reality documents are derived or refreshed (taiga_refresh_reality_documents, paid work: ask first).") : summary.controlsMet + summary.controlsNotApplicable === 0 && assessedAt ? `No control is recorded as met or not applicable: the last assessment (${assessedAt}) either ran before assessments recorded those verdicts, or found none. Until the next one, only violations are known; the rest are not assessed, which is no pass.` : null;
38970
+ const note = assessment?.state === "never" ? "Never assessed: the documents have not been checked against the policies yet, so nothing here is an all-clear. " + (!standing.canAssess && standing.hasPolicies ? "It has no reality documents to assess yet: an import derives them (taiga_start_import for a product set up from its code, paid work: ask first), and the assessment follows." : "An assessment runs when the reality documents are derived or refreshed (taiga_refresh_reality_documents, paid work: ask first).") : summary.controlsMet + summary.controlsNotApplicable === 0 && assessedAt ? `No control is recorded as met or not applicable: the last assessment (${assessedAt}) either ran before assessments recorded those verdicts, or found none. Until the next one, only violations are known; the rest are not assessed, which is no pass.` : null;
38971
38971
  const resolvedAny = Array.isArray(standing.resolvedDivergences) && standing.resolvedDivergences.length > 0;
38972
38972
  const wording = violations.length > 0 || resolvedAny ? { wordingNote: "A violation's evidence is from its assessedAt; its title and summary may be from when it was first recorded. Where they disagree, the evidence is current." } : {};
38973
38973
  if (params.controlId && params.violationId) return toolError("VALIDATION_ERROR", "Name either a control (controlId) or one violation (violationId), not both.");
38974
38974
  if (params.controlId) {
38975
38975
  const wanted = params.controlId.toUpperCase();
38976
- const control = controls.find((c) => String(c.controlId).toUpperCase() === wanted);
38976
+ const control = controls.find((c) => c.controlId.toUpperCase() === wanted);
38977
38977
  if (!control) return toolError("NOT_FOUND", "No control with that id in this product's policies; taiga_get_organization_document (type, sections: []) lists a policy's controls.");
38978
38978
  const own = violations.filter((violation) => String(violation["controlId"]).toUpperCase() === wanted);
38979
38979
  return toolResult({
@@ -38981,7 +38981,7 @@ function registerMaintenanceTools(server, client) {
38981
38981
  ...control.state === "no_evidence" ? { meaning: (control.coverage && plannedFor(control.coverage) === "later" ? `Planned later: the backlog deferred it (${String(control.coverage.deferredReason).replace(/\.$/, "")}). ` : "") + "Not assessed: no finding or violation is recorded against it, and the documents were not found to show it met. That is no evidence either way, not a pass." } : {},
38982
38982
  ...control.coverage ? { coverageNote: "coverage is how the backlog plans for it: the live initiatives that build it, or why it is deferred. It says what is planned, not that the control is met." } : {},
38983
38983
  ...control.assessment == null && (control.state === "breached" || control.state === "diverged") ? { assessmentNote: "No met or not-applicable verdict is shown: an open finding or violation against the control outranks one." } : {},
38984
- ...Number(control.findingCount ?? 0) > 0 ? { findingsNote: `${String(control.findingCount)} open scanner finding${control.findingCount === 1 ? "" : "s"} breach it; taiga_list_findings (productId) lists them with the controls each breaches. violations below are the documents' only.` } : {},
38984
+ ...(control.findingCount ?? 0) > 0 ? { findingsNote: `${String(control.findingCount)} open scanner finding${control.findingCount === 1 ? "" : "s"} breach it; taiga_list_findings (productId) lists them with the controls each breaches. violations below are the documents' only.` } : {},
38985
38985
  violations: pickFields(own, VIOLATION_FIELDS),
38986
38986
  ...own.length > 0 ? wording : {}
38987
38987
  });
@@ -39110,8 +39110,8 @@ function registerMaintenanceTools(server, client) {
39110
39110
  const finding = (await client.getFinding(params.findingId)).data;
39111
39111
  if (finding.productId !== params.productId) return toolError("NOT_FOUND", "No such finding in this product.");
39112
39112
  return toolResult((await client.remediatePackage(params.productId, {
39113
- ecosystem: String(finding.ecosystem),
39114
- packageName: String(finding.packageName),
39113
+ ecosystem: finding.ecosystem,
39114
+ packageName: finding.packageName,
39115
39115
  currentVersion: typeof finding.currentVersion === "string" ? finding.currentVersion : null,
39116
39116
  productRepositoryId: typeof finding.productRepositoryId === "string" ? finding.productRepositoryId : null
39117
39117
  })).data);
@@ -40037,7 +40037,7 @@ function failedLookup(what, reason) {
40037
40037
  }
40038
40038
  /** `a (v3), b (v1)` for a not-found message. */
40039
40039
  function publishedList(rows) {
40040
- return rows.filter((row) => row.isDraft === false).map((row) => `${row.type} (v${String(row.version)})`).join(", ");
40040
+ return rows.filter((row) => !row.isDraft).map((row) => `${row.type} (v${String(row.version)})`).join(", ");
40041
40041
  }
40042
40042
  const DRAFT_WRITE$1 = {
40043
40043
  readOnlyHint: false,
@@ -40268,7 +40268,7 @@ function registerDocumentTools(server, client) {
40268
40268
  const doc = stripProvenance((await client.getTenantDocument(type)).data);
40269
40269
  const read = args.sections ? sectionReadResult(doc, args.sections, type, { controlIds: POLICY_TYPES.includes(type) }) : toolResult(doc);
40270
40270
  if (type !== DESIGN_STANDARDS) return read;
40271
- const tokens = isRecord$1(doc.data) ? doc.data["tokens"] : void 0;
40271
+ const tokens = isRecord$1(doc.data) ? doc.data.tokens : void 0;
40272
40272
  const shown = (() => {
40273
40273
  const first = read.content[0];
40274
40274
  const parsed = first?.type === "text" ? JSON.parse(first.text) : {};
@@ -40551,10 +40551,10 @@ function failureCause(steps) {
40551
40551
  return `step ${String(failed["stepOrder"])}: ${said}`;
40552
40552
  }
40553
40553
  function stoppedIn(run, steps) {
40554
- if (run.prMerged === true || run.status !== "failed" && run.status !== "stopped") return null;
40554
+ if (run.prMerged || run.status !== "failed" && run.status !== "stopped") return null;
40555
40555
  if (!steps.some((step) => step.status !== "planned")) return "before the first step started, while setting up the run (cloning, preparing the workspace)";
40556
40556
  const open = steps.find((step) => step.status !== "completed" && step.status !== "skipped");
40557
- if (open) return open.status === "planned" ? `before step ${String(open.stepOrder)}, ${String(open.title)}, started (the ones before it completed)` : `step ${String(open.stepOrder)}, ${String(open.title)} (${String(open.status)})`;
40557
+ if (open) return open.status === "planned" ? `before step ${String(open.stepOrder)}, ${open.title}, started (the ones before it completed)` : `step ${String(open.stepOrder)}, ${open.title} (${open.status})`;
40558
40558
  if (run.hardeningResult == null) return "after the last step, in hardening: the security scanners and their fixes the agent runs before the pull request is ready. A retry continues from there; the steps stay.";
40559
40559
  return "after the steps and hardening, at the pull request";
40560
40560
  }
@@ -41348,7 +41348,7 @@ function waitingOn(rows, station) {
41348
41348
  return station ? "Nothing holds the station: the first queued initiative is next to start." : "Nothing in the queue is running; the first queued initiative starts when no initiative is left in Plan or Build.";
41349
41349
  }
41350
41350
  const head = rows[at];
41351
- const name = typeof head.title === "string" ? `"${head.title}"` : `Initiative ${String(head.backlogItemId)}`;
41351
+ const name = typeof head.title === "string" ? `"${head.title}"` : `Initiative ${head.backlogItemId}`;
41352
41352
  if (head.entryState === "halted") {
41353
41353
  const halt = head.halt;
41354
41354
  const ahead = at > 0 ? " Entries ahead of it are not held by it." : "";
@@ -41360,8 +41360,8 @@ function waitingOn(rows, station) {
41360
41360
  const pr = typeof head.prUrl === "string" ? ` (${head.prUrl})` : "";
41361
41361
  if (lifecycle.cta === "start_build") return `${name} has its plan and waits for the Build slot; ${held}`;
41362
41362
  if (head.handedBack) return `${name} was handed back to a person: ${head.handedBack}${pr}; ${held}`;
41363
- if (lifecycle.turn === "you") return `${name} is waiting on a person (${String(lifecycle.cta ?? lifecycle.stage)})${pr}; ${held}`;
41364
- return `${name} is ${String(lifecycle.stage)}${pr}; ${held}`;
41363
+ if (lifecycle.turn === "you") return `${name} is waiting on a person (${lifecycle.cta ?? lifecycle.stage})${pr}; ${held}`;
41364
+ return `${name} is ${lifecycle.stage}${pr}; ${held}`;
41365
41365
  }
41366
41366
  const STATION_NAMED = 3;
41367
41367
  /** Who holds the station, or null when the key cannot read the backlog or the read failed. */
@@ -41378,7 +41378,7 @@ async function stationHolders(client, product, except) {
41378
41378
  return {
41379
41379
  count: rows.length,
41380
41380
  atLeast: capped,
41381
- titles: rows.slice(0, STATION_NAMED).map((row) => String(row.title))
41381
+ titles: rows.slice(0, STATION_NAMED).map((row) => row.title)
41382
41382
  };
41383
41383
  } catch (error) {
41384
41384
  if (error instanceof TaigaApiError || isNetworkFailure(error)) return null;
@@ -41869,7 +41869,7 @@ function registerBacklogReads(server, client) {
41869
41869
  if (column !== "open" || !["done", "canceled"].includes(String(row.state))) return true;
41870
41870
  if (searchedText(row).some((value) => typeof value === "string" && searchable(value).includes(needle))) closedSeen += 1;
41871
41871
  return false;
41872
- }, (row) => String(row.title));
41872
+ }, (row) => row.title);
41873
41873
  const hidden = column === "open" && !found.more ? closedSeen : 0;
41874
41874
  return toolResult({
41875
41875
  ...page(situatedRows(found.rows), null),
@@ -42201,7 +42201,7 @@ function registerEdit(server, client) {
42201
42201
  ...links && linksChange ? { documentIds: links.send } : {}
42202
42202
  })).data;
42203
42203
  } catch (error) {
42204
- if (links && error instanceof TaigaApiError && error.status === 400 && /Referenced documents/.test(error.apiMessage ?? "")) return toolError("VALIDATION_ERROR", `${error.apiMessage} Leave them out of documentIds to unlink them.`);
42204
+ if (links && error instanceof TaigaApiError && error.status === 400 && (error.apiMessage ?? "").includes("Referenced documents")) return toolError("VALIDATION_ERROR", `${error.apiMessage} Leave them out of documentIds to unlink them.`);
42205
42205
  throw error;
42206
42206
  }
42207
42207
  const assigned = fields.assigneeId !== void 0 ? { assigneeId: fields.assigneeId } : {};
@@ -42669,7 +42669,7 @@ const SETTLED_RUN = new Set(BUILD_RUN_TERMINAL_STATUSES);
42669
42669
  * state (null, just opened) counts as open.
42670
42670
  */
42671
42671
  function prIsOpen(run) {
42672
- return typeof run.prUrl === "string" && run.prUrl !== "" && run.prMerged !== true && run.prState !== "closed";
42672
+ return typeof run.prUrl === "string" && run.prUrl !== "" && !run.prMerged && run.prState !== "closed";
42673
42673
  }
42674
42674
  const ITEM_CONDITIONS = [
42675
42675
  "changed",
@@ -42729,7 +42729,7 @@ function itemHolds(until, item, first, gate) {
42729
42729
  case "planned": return item.planningStatus === "planned";
42730
42730
  case "your_turn": return personTurn(item, gate) === "yes";
42731
42731
  case "pr_open": return run !== null && prIsOpen(run);
42732
- case "run_settled": return run !== null && SETTLED_RUN.has(String(run.status));
42732
+ case "run_settled": return run !== null && SETTLED_RUN.has(run.status);
42733
42733
  case "done": return lifecycle.stage === "done";
42734
42734
  }
42735
42735
  }
@@ -42758,7 +42758,7 @@ function judgeItem(until, gate) {
42758
42758
  const stage = lifecycleOf(item).stage;
42759
42759
  if (stage === "canceled" || until !== "done" && stage === "done") return {
42760
42760
  reached: false,
42761
- stoppedBecause: `the initiative is ${String(stage)}`
42761
+ stoppedBecause: `the initiative is ${stage}`
42762
42762
  };
42763
42763
  return null;
42764
42764
  };
@@ -42822,10 +42822,10 @@ const runSignature = (run) => JSON.stringify([
42822
42822
  ]);
42823
42823
  function judgeBuild(until) {
42824
42824
  return (run, first) => {
42825
- if (until === "changed" ? runSignature(run) !== runSignature(first) : until === "step_done" ? Number(run.completedSteps ?? 0) > Number(first.completedSteps ?? 0) : until === "pr_open" ? prIsOpen(run) : SETTLED_RUN.has(String(run.status))) return { reached: true };
42826
- if (until !== "changed" && SETTLED_RUN.has(String(run.status))) return {
42825
+ if (until === "changed" ? runSignature(run) !== runSignature(first) : until === "step_done" ? (run.completedSteps ?? 0) > (first.completedSteps ?? 0) : until === "pr_open" ? prIsOpen(run) : SETTLED_RUN.has(run.status)) return { reached: true };
42826
+ if (until !== "changed" && SETTLED_RUN.has(run.status)) return {
42827
42827
  reached: false,
42828
- stoppedBecause: `the run is ${String(run.status)}`
42828
+ stoppedBecause: `the run is ${run.status}`
42829
42829
  };
42830
42830
  if (until !== "changed" && run.status === "replanning" && run.failedReason === "steer_review") return {
42831
42831
  reached: false,
@@ -42854,7 +42854,7 @@ function registerWaitTools(server, client, options) {
42854
42854
  const gate = { product: void 0 };
42855
42855
  const read = async (signal) => {
42856
42856
  const item = (await client.getBacklogItem(target, signal)).data;
42857
- if (gate.product === void 0 && typeof item.autoBuild !== "boolean") gate.product = client.hasCapability("products:read") ? await client.getProduct(String(item.productId), signal).then((p) => {
42857
+ if (gate.product === void 0 && typeof item.autoBuild !== "boolean") gate.product = client.hasCapability("products:read") ? await client.getProduct(item.productId, signal).then((p) => {
42858
42858
  const value = p.data.autoBuild;
42859
42859
  return typeof value === "boolean" ? value : true;
42860
42860
  }).catch((error) => {
@@ -42887,7 +42887,7 @@ function registerWaitTools(server, client, options) {
42887
42887
  });
42888
42888
  };
42889
42889
  const waitJob = async (target, params, ctx) => {
42890
- const { now, deadline: _deadline, ...outcome } = await waitFor(async (signal) => (await client.getAgentJob(target, signal)).data, (job) => SETTLED_JOB_STATUSES.has(String(job.status)) ? { reached: true } : null, (params.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS$1) * 1e3, options, {
42890
+ const { now, deadline: _deadline, ...outcome } = await waitFor(async (signal) => (await client.getAgentJob(target, signal)).data, (job) => SETTLED_JOB_STATUSES.has(job.status) ? { reached: true } : null, (params.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS$1) * 1e3, options, {
42891
42891
  progressToken: ctx.mcpReq._meta?.progressToken,
42892
42892
  notify: ctx.mcpReq.notify,
42893
42893
  signal: ctx.mcpReq.signal
@@ -42956,7 +42956,7 @@ function judgeSync(job) {
42956
42956
  reached: false,
42957
42957
  stoppedBecause: NOT_A_SYNC
42958
42958
  };
42959
- return SETTLED_JOB_STATUSES.has(String(job.status)) ? { reached: true } : null;
42959
+ return SETTLED_JOB_STATUSES.has(job.status) ? { reached: true } : null;
42960
42960
  }
42961
42961
  /** A read that cannot take a signal, given up on when the signal fires; the read itself is left to finish unobserved. */
42962
42962
  function within(read, signal) {
@@ -43098,7 +43098,7 @@ function registerDesignTokenTools(server, client, wait) {
43098
43098
  jobId: params.jobId,
43099
43099
  note: STILL_WAITING
43100
43100
  });
43101
- if (!result.reached && result.stoppedBecause === NOT_A_SYNC) return toolError("VALIDATION_ERROR", `Job ${params.jobId} is not a design token sync (it is ${String(job.type)}). taiga_wait follows other jobs.`);
43101
+ if (!result.reached && result.stoppedBecause === NOT_A_SYNC) return toolError("VALIDATION_ERROR", `Job ${params.jobId} is not a design token sync (it is ${job.type}). taiga_wait follows other jobs.`);
43102
43102
  const report = jobReport(job);
43103
43103
  if (job.status === "completed") {
43104
43104
  const bound = AbortSignal.timeout(Math.max(result.deadline - Date.now(), 0));
@@ -43778,7 +43778,7 @@ async function productContext(client, product, options) {
43778
43778
  let linksRead;
43779
43779
  const links = () => linksRead ??= client.listProductRepositories(productId);
43780
43780
  const fetchers = {
43781
- factory: () => factoryPart(client, String(product.factoryId)),
43781
+ factory: () => factoryPart(client, product.factoryId),
43782
43782
  documents: () => documentsPart(client, product, options.documents),
43783
43783
  policies: () => policiesPart(client),
43784
43784
  initiatives: () => backlogPart(client, productId),
@@ -44009,7 +44009,7 @@ function registerKnowledgeTools(server, client) {
44009
44009
  });
44010
44010
  return toolResult({
44011
44011
  ...pickFields([result.data], KNOWLEDGE_FIELDS)[0],
44012
- deduplicated: result.deduplicated === true
44012
+ deduplicated: result.deduplicated
44013
44013
  });
44014
44014
  }));
44015
44015
  server.registerTool("taiga_retry_knowledge", {
@@ -59001,17 +59001,17 @@ function registerPrompts(server, client) {
59001
59001
  argsSchema: object({ initiativeId: idInput("initiative", "taiga_list_initiatives (query finds one by title) gives it") })
59002
59002
  }, async (args) => {
59003
59003
  const item = (await served$1(client.getBacklogItem(args.initiativeId), "No initiative with that ID the key can see; taiga_list_initiatives shows what exists")).data;
59004
- const productId = String(item.productId);
59004
+ const productId = item.productId;
59005
59005
  const product = (await served$1(client.getProduct(productId), "The product of that item is not visible to the key")).data;
59006
59006
  const origin = defaultOriginFor(product, "architecture");
59007
59007
  const [architecture, instructions, policies] = await Promise.allSettled([
59008
59008
  client.getProductDocument(productId, "architecture", origin),
59009
- client.hasCapability("factories:read") ? client.getFactoryDocument(String(product.factoryId), "factory_instructions") : Promise.reject(new NotGranted("factories:read")),
59009
+ client.hasCapability("factories:read") ? client.getFactoryDocument(product.factoryId, "factory_instructions") : Promise.reject(new NotGranted("factories:read")),
59010
59010
  client.hasCapability("tenant:documents:read") ? client.listTenantDocuments({ limit: 100 }) : Promise.reject(new NotGranted("tenant:documents:read"))
59011
59011
  ]);
59012
59012
  const architectureText = architecture.status === "fulfilled" ? fence("markdown", renderDocument(stripProvenance(architecture.value.data)).text) : isNotFound(architecture.reason) ? `(No published ${origin} architecture; taiga_get_product_document without type shows what exists.)` : unreadable("The architecture", architecture.reason);
59013
59013
  const instructionsText_ = instructions.status === "fulfilled" ? fence("markdown", instructionsText(sectionsOf(instructions.value.data.data) ?? {}) ?? "(The factory instructions are empty.)") : instructions.reason instanceof NotGranted ? instructions.reason.line("The factory instructions") : isNotFound(instructions.reason) ? "(This factory has not published instructions.)" : unreadable("The factory instructions", instructions.reason);
59014
- const policiesText = policies.status === "fulfilled" ? fence("text", policies.value.data.filter((row) => POLICY_TYPES.includes(String(row.type)) && row.isDraft === false).map((row) => `- ${String(row.type)}: ${Object.keys(sectionsOf(row.data ?? {}) ?? {}).join(", ")}`).join("\n") || "(No policy is published.)") : policies.reason instanceof NotGranted ? policies.reason.line("The policies") : unreadable("The policies", policies.reason);
59014
+ const policiesText = policies.status === "fulfilled" ? fence("text", policies.value.data.filter((row) => POLICY_TYPES.includes(row.type) && !row.isDraft).map((row) => `- ${row.type}: ${Object.keys(sectionsOf(row.data ?? {}) ?? {}).join(", ")}`).join("\n") || "(No policy is published.)") : policies.reason instanceof NotGranted ? policies.reason.line("The policies") : unreadable("The policies", policies.reason);
59015
59015
  return message([
59016
59016
  `Implement the following initiative of product ${productId} (named in the fenced initiative). Every acceptance`,
59017
59017
  "criterion below must hold when you are done; say which ones you could not verify. Follow the factory",
@@ -59160,7 +59160,7 @@ function forgesOf(rows) {
59160
59160
  })) };
59161
59161
  }
59162
59162
  function githubSource(client, installation) {
59163
- const id = String(installation.id);
59163
+ const id = installation.id;
59164
59164
  return {
59165
59165
  id,
59166
59166
  row: githubAccount(installation),
@@ -59383,7 +59383,7 @@ function registerRepositoryTools(server, client) {
59383
59383
  if (accounts.length === 0) return toolError("NOT_CONNECTED", "No GitHub, GitLab or Azure DevOps connection exists for this organization. A forge is connected once, in the web; then link.");
59384
59384
  const login = params.account?.split("/")[0].toLowerCase();
59385
59385
  const chosen = [
59386
- ...installations.filter((i) => (!params.installationId || i.id === params.installationId) && (!login || String(i.accountLogin ?? "").toLowerCase() === login)).map((i) => githubSource(client, i)),
59386
+ ...installations.filter((i) => (!params.installationId || i.id === params.installationId) && (!login || (i.accountLogin ?? "").toLowerCase() === login)).map((i) => githubSource(client, i)),
59387
59387
  ...gitlab.filter((c) => (!params.installationId || c.id === params.installationId) && (!params.account || connectionNames(c).includes(params.account.toLowerCase())) && (c.status !== "auth_failed" || Boolean(params.installationId || params.account))).map((c) => gitlabSource(client, c)),
59388
59388
  ...azure.filter((c) => (!params.installationId || c.id === params.installationId) && (!params.account || connectionNames(c).includes(params.account.toLowerCase())) && (c.status !== "auth_failed" || Boolean(params.installationId || params.account))).map((c) => azureSource(client, c))
59389
59389
  ];
@@ -59532,10 +59532,10 @@ async function served(read, miss) {
59532
59532
  }
59533
59533
  function registerResources(server, client) {
59534
59534
  if (client.hasCapability("tenant:documents:read")) {
59535
- const published = async () => (await client.listTenantDocuments({ limit: 100 })).data.filter((row) => row.isDraft === false);
59535
+ const published = async () => (await client.listTenantDocuments({ limit: 100 })).data.filter((row) => !row.isDraft);
59536
59536
  server.registerResource("organization-document", new ResourceTemplate("taiga://documents/{type}", { list: async () => ({ resources: (await published().catch(() => [])).map((row) => ({
59537
- uri: `taiga://documents/${String(row.type)}`,
59538
- name: String(row.name ?? row.type),
59537
+ uri: `taiga://documents/${row.type}`,
59538
+ name: row.name ?? row.type,
59539
59539
  description: typeof row.description === "string" ? row.description : void 0,
59540
59540
  mimeType: mimeTypeOf(row)
59541
59541
  })) }) }), {
@@ -59548,7 +59548,7 @@ function registerResources(server, client) {
59548
59548
  } catch (error) {
59549
59549
  if (!isMissOrRefusal(error)) throw error;
59550
59550
  const rest = await published().then((rows) => {
59551
- const names = rows.map((row) => String(row.type));
59551
+ const names = rows.map((row) => row.type);
59552
59552
  return names.length > 0 ? `Published documents: ${names.join(", ")}.` : "Nothing is published yet.";
59553
59553
  }, (reason) => `The published list could not be read (${reason instanceof TaigaApiError ? apiFailureText(reason) : "the request failed"}).`);
59554
59554
  return invalid(`No published ${type} the key can read (${apiFailureText(error)}). ${rest}`);
@@ -60091,7 +60091,7 @@ function withRecoveryHints(tool, schema, inputs, isRead) {
60091
60091
  };
60092
60092
  const argument = issue.path?.length === 1 ? String(issue.path[0]) : void 0;
60093
60093
  const source = argument ? idSource(argument) : void 0;
60094
- if (source && /received undefined/.test(issue.message)) return {
60094
+ if (source && issue.message.includes("received undefined")) return {
60095
60095
  ...issue,
60096
60096
  message: `required. ${source}`
60097
60097
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.39.0-dev.1231",
3
+ "version": "0.39.0-dev.1232",
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",