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

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 +51 -40
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -30855,7 +30855,18 @@ strictObject({
30855
30855
  trigger: _enum(SCOPE_TRIGGERS),
30856
30856
  answer: _enum(SCOPE_ANSWER_VALUES),
30857
30857
  note: string$2().trim().max(SCOPE_ANSWER_NOTE_MAX_LENGTH).optional()
30858
- }), strictObject({ environments: array(string$2()).default(["development"]) }), object({ id: string$2().uuid() }), strictObject({ ticketIds: array(uuid).min(1).max(25) }), strictObject({
30858
+ }), strictObject({ environments: array(string$2()).default(["development"]) }), object({ id: string$2().uuid() }), strictObject({
30859
+ ticketId: uuid,
30860
+ /** For a ticket Taiga read as too large: one initiative per piece of its split, all with the ticket's key. */
30861
+ asSplit: boolean().optional(),
30862
+ /**
30863
+ * With `asSplit`: when the assessment whose split the person was shown
30864
+ * was made. Refused when the ticket was assessed again since, so the
30865
+ * pieces written are the ones confirmed. Optional for a tab of a build
30866
+ * that sends none; the server then holds the job to the split it reads.
30867
+ */
30868
+ splitAssessedAt: string$2().datetime({ offset: true }).optional()
30869
+ }), strictObject({ ticketIds: array(uuid).min(1).max(25) }), strictObject({
30859
30870
  connectionId: uuid,
30860
30871
  placeId: trackerPlaceId,
30861
30872
  filter: ticketSourceFilter.nullable().optional()
@@ -38442,7 +38453,7 @@ function withFixability(row) {
38442
38453
  fixNote: baseImageWaitNote(base)
38443
38454
  };
38444
38455
  }
38445
- if (typeof row["baseMove"] === "boolean" && isAgentRemediable({ remediableBy: remediableByOf(row) })) return row["baseMove"] === true && row["status"] === "open" ? {
38456
+ if (typeof row["baseMove"] === "boolean" && isAgentRemediable({ remediableBy: remediableByOf(row) })) return row["baseMove"] && row["status"] === "open" ? {
38446
38457
  ...row,
38447
38458
  fixable: true,
38448
38459
  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 +38974,17 @@ function registerMaintenanceTools(server, client) {
38963
38974
  const standing = (await client.getPolicyStanding(params.productId)).data;
38964
38975
  const controls = Array.isArray(standing.controls) ? standing.controls : [];
38965
38976
  const violations = Array.isArray(standing.divergences) ? standing.divergences : [];
38966
- const listed = controls.filter((c) => Number(c.divergenceCount ?? 0) > 0 || Number(c.findingCount ?? 0) > 0);
38977
+ const listed = controls.filter((c) => (c.divergenceCount ?? 0) > 0 || (c.findingCount ?? 0) > 0);
38967
38978
  const summary = standingSummary(standing);
38968
38979
  const assessment = standing.assessment;
38969
38980
  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;
38981
+ 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
38982
  const resolvedAny = Array.isArray(standing.resolvedDivergences) && standing.resolvedDivergences.length > 0;
38972
38983
  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
38984
  if (params.controlId && params.violationId) return toolError("VALIDATION_ERROR", "Name either a control (controlId) or one violation (violationId), not both.");
38974
38985
  if (params.controlId) {
38975
38986
  const wanted = params.controlId.toUpperCase();
38976
- const control = controls.find((c) => String(c.controlId).toUpperCase() === wanted);
38987
+ const control = controls.find((c) => c.controlId.toUpperCase() === wanted);
38977
38988
  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
38989
  const own = violations.filter((violation) => String(violation["controlId"]).toUpperCase() === wanted);
38979
38990
  return toolResult({
@@ -38981,7 +38992,7 @@ function registerMaintenanceTools(server, client) {
38981
38992
  ...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
38993
  ...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
38994
  ...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.` } : {},
38995
+ ...(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
38996
  violations: pickFields(own, VIOLATION_FIELDS),
38986
38997
  ...own.length > 0 ? wording : {}
38987
38998
  });
@@ -39110,8 +39121,8 @@ function registerMaintenanceTools(server, client) {
39110
39121
  const finding = (await client.getFinding(params.findingId)).data;
39111
39122
  if (finding.productId !== params.productId) return toolError("NOT_FOUND", "No such finding in this product.");
39112
39123
  return toolResult((await client.remediatePackage(params.productId, {
39113
- ecosystem: String(finding.ecosystem),
39114
- packageName: String(finding.packageName),
39124
+ ecosystem: finding.ecosystem,
39125
+ packageName: finding.packageName,
39115
39126
  currentVersion: typeof finding.currentVersion === "string" ? finding.currentVersion : null,
39116
39127
  productRepositoryId: typeof finding.productRepositoryId === "string" ? finding.productRepositoryId : null
39117
39128
  })).data);
@@ -40037,7 +40048,7 @@ function failedLookup(what, reason) {
40037
40048
  }
40038
40049
  /** `a (v3), b (v1)` for a not-found message. */
40039
40050
  function publishedList(rows) {
40040
- return rows.filter((row) => row.isDraft === false).map((row) => `${row.type} (v${String(row.version)})`).join(", ");
40051
+ return rows.filter((row) => !row.isDraft).map((row) => `${row.type} (v${String(row.version)})`).join(", ");
40041
40052
  }
40042
40053
  const DRAFT_WRITE$1 = {
40043
40054
  readOnlyHint: false,
@@ -40268,7 +40279,7 @@ function registerDocumentTools(server, client) {
40268
40279
  const doc = stripProvenance((await client.getTenantDocument(type)).data);
40269
40280
  const read = args.sections ? sectionReadResult(doc, args.sections, type, { controlIds: POLICY_TYPES.includes(type) }) : toolResult(doc);
40270
40281
  if (type !== DESIGN_STANDARDS) return read;
40271
- const tokens = isRecord$1(doc.data) ? doc.data["tokens"] : void 0;
40282
+ const tokens = isRecord$1(doc.data) ? doc.data.tokens : void 0;
40272
40283
  const shown = (() => {
40273
40284
  const first = read.content[0];
40274
40285
  const parsed = first?.type === "text" ? JSON.parse(first.text) : {};
@@ -40551,10 +40562,10 @@ function failureCause(steps) {
40551
40562
  return `step ${String(failed["stepOrder"])}: ${said}`;
40552
40563
  }
40553
40564
  function stoppedIn(run, steps) {
40554
- if (run.prMerged === true || run.status !== "failed" && run.status !== "stopped") return null;
40565
+ if (run.prMerged || run.status !== "failed" && run.status !== "stopped") return null;
40555
40566
  if (!steps.some((step) => step.status !== "planned")) return "before the first step started, while setting up the run (cloning, preparing the workspace)";
40556
40567
  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)})`;
40568
+ 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
40569
  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
40570
  return "after the steps and hardening, at the pull request";
40560
40571
  }
@@ -41348,7 +41359,7 @@ function waitingOn(rows, station) {
41348
41359
  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
41360
  }
41350
41361
  const head = rows[at];
41351
- const name = typeof head.title === "string" ? `"${head.title}"` : `Initiative ${String(head.backlogItemId)}`;
41362
+ const name = typeof head.title === "string" ? `"${head.title}"` : `Initiative ${head.backlogItemId}`;
41352
41363
  if (head.entryState === "halted") {
41353
41364
  const halt = head.halt;
41354
41365
  const ahead = at > 0 ? " Entries ahead of it are not held by it." : "";
@@ -41360,8 +41371,8 @@ function waitingOn(rows, station) {
41360
41371
  const pr = typeof head.prUrl === "string" ? ` (${head.prUrl})` : "";
41361
41372
  if (lifecycle.cta === "start_build") return `${name} has its plan and waits for the Build slot; ${held}`;
41362
41373
  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}`;
41374
+ if (lifecycle.turn === "you") return `${name} is waiting on a person (${lifecycle.cta ?? lifecycle.stage})${pr}; ${held}`;
41375
+ return `${name} is ${lifecycle.stage}${pr}; ${held}`;
41365
41376
  }
41366
41377
  const STATION_NAMED = 3;
41367
41378
  /** Who holds the station, or null when the key cannot read the backlog or the read failed. */
@@ -41378,7 +41389,7 @@ async function stationHolders(client, product, except) {
41378
41389
  return {
41379
41390
  count: rows.length,
41380
41391
  atLeast: capped,
41381
- titles: rows.slice(0, STATION_NAMED).map((row) => String(row.title))
41392
+ titles: rows.slice(0, STATION_NAMED).map((row) => row.title)
41382
41393
  };
41383
41394
  } catch (error) {
41384
41395
  if (error instanceof TaigaApiError || isNetworkFailure(error)) return null;
@@ -41869,7 +41880,7 @@ function registerBacklogReads(server, client) {
41869
41880
  if (column !== "open" || !["done", "canceled"].includes(String(row.state))) return true;
41870
41881
  if (searchedText(row).some((value) => typeof value === "string" && searchable(value).includes(needle))) closedSeen += 1;
41871
41882
  return false;
41872
- }, (row) => String(row.title));
41883
+ }, (row) => row.title);
41873
41884
  const hidden = column === "open" && !found.more ? closedSeen : 0;
41874
41885
  return toolResult({
41875
41886
  ...page(situatedRows(found.rows), null),
@@ -42201,7 +42212,7 @@ function registerEdit(server, client) {
42201
42212
  ...links && linksChange ? { documentIds: links.send } : {}
42202
42213
  })).data;
42203
42214
  } 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.`);
42215
+ 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
42216
  throw error;
42206
42217
  }
42207
42218
  const assigned = fields.assigneeId !== void 0 ? { assigneeId: fields.assigneeId } : {};
@@ -42669,7 +42680,7 @@ const SETTLED_RUN = new Set(BUILD_RUN_TERMINAL_STATUSES);
42669
42680
  * state (null, just opened) counts as open.
42670
42681
  */
42671
42682
  function prIsOpen(run) {
42672
- return typeof run.prUrl === "string" && run.prUrl !== "" && run.prMerged !== true && run.prState !== "closed";
42683
+ return typeof run.prUrl === "string" && run.prUrl !== "" && !run.prMerged && run.prState !== "closed";
42673
42684
  }
42674
42685
  const ITEM_CONDITIONS = [
42675
42686
  "changed",
@@ -42729,7 +42740,7 @@ function itemHolds(until, item, first, gate) {
42729
42740
  case "planned": return item.planningStatus === "planned";
42730
42741
  case "your_turn": return personTurn(item, gate) === "yes";
42731
42742
  case "pr_open": return run !== null && prIsOpen(run);
42732
- case "run_settled": return run !== null && SETTLED_RUN.has(String(run.status));
42743
+ case "run_settled": return run !== null && SETTLED_RUN.has(run.status);
42733
42744
  case "done": return lifecycle.stage === "done";
42734
42745
  }
42735
42746
  }
@@ -42758,7 +42769,7 @@ function judgeItem(until, gate) {
42758
42769
  const stage = lifecycleOf(item).stage;
42759
42770
  if (stage === "canceled" || until !== "done" && stage === "done") return {
42760
42771
  reached: false,
42761
- stoppedBecause: `the initiative is ${String(stage)}`
42772
+ stoppedBecause: `the initiative is ${stage}`
42762
42773
  };
42763
42774
  return null;
42764
42775
  };
@@ -42822,10 +42833,10 @@ const runSignature = (run) => JSON.stringify([
42822
42833
  ]);
42823
42834
  function judgeBuild(until) {
42824
42835
  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 {
42836
+ 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 };
42837
+ if (until !== "changed" && SETTLED_RUN.has(run.status)) return {
42827
42838
  reached: false,
42828
- stoppedBecause: `the run is ${String(run.status)}`
42839
+ stoppedBecause: `the run is ${run.status}`
42829
42840
  };
42830
42841
  if (until !== "changed" && run.status === "replanning" && run.failedReason === "steer_review") return {
42831
42842
  reached: false,
@@ -42854,7 +42865,7 @@ function registerWaitTools(server, client, options) {
42854
42865
  const gate = { product: void 0 };
42855
42866
  const read = async (signal) => {
42856
42867
  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) => {
42868
+ if (gate.product === void 0 && typeof item.autoBuild !== "boolean") gate.product = client.hasCapability("products:read") ? await client.getProduct(item.productId, signal).then((p) => {
42858
42869
  const value = p.data.autoBuild;
42859
42870
  return typeof value === "boolean" ? value : true;
42860
42871
  }).catch((error) => {
@@ -42887,7 +42898,7 @@ function registerWaitTools(server, client, options) {
42887
42898
  });
42888
42899
  };
42889
42900
  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, {
42901
+ 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
42902
  progressToken: ctx.mcpReq._meta?.progressToken,
42892
42903
  notify: ctx.mcpReq.notify,
42893
42904
  signal: ctx.mcpReq.signal
@@ -42956,7 +42967,7 @@ function judgeSync(job) {
42956
42967
  reached: false,
42957
42968
  stoppedBecause: NOT_A_SYNC
42958
42969
  };
42959
- return SETTLED_JOB_STATUSES.has(String(job.status)) ? { reached: true } : null;
42970
+ return SETTLED_JOB_STATUSES.has(job.status) ? { reached: true } : null;
42960
42971
  }
42961
42972
  /** A read that cannot take a signal, given up on when the signal fires; the read itself is left to finish unobserved. */
42962
42973
  function within(read, signal) {
@@ -43098,7 +43109,7 @@ function registerDesignTokenTools(server, client, wait) {
43098
43109
  jobId: params.jobId,
43099
43110
  note: STILL_WAITING
43100
43111
  });
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.`);
43112
+ 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
43113
  const report = jobReport(job);
43103
43114
  if (job.status === "completed") {
43104
43115
  const bound = AbortSignal.timeout(Math.max(result.deadline - Date.now(), 0));
@@ -43778,7 +43789,7 @@ async function productContext(client, product, options) {
43778
43789
  let linksRead;
43779
43790
  const links = () => linksRead ??= client.listProductRepositories(productId);
43780
43791
  const fetchers = {
43781
- factory: () => factoryPart(client, String(product.factoryId)),
43792
+ factory: () => factoryPart(client, product.factoryId),
43782
43793
  documents: () => documentsPart(client, product, options.documents),
43783
43794
  policies: () => policiesPart(client),
43784
43795
  initiatives: () => backlogPart(client, productId),
@@ -44009,7 +44020,7 @@ function registerKnowledgeTools(server, client) {
44009
44020
  });
44010
44021
  return toolResult({
44011
44022
  ...pickFields([result.data], KNOWLEDGE_FIELDS)[0],
44012
- deduplicated: result.deduplicated === true
44023
+ deduplicated: result.deduplicated
44013
44024
  });
44014
44025
  }));
44015
44026
  server.registerTool("taiga_retry_knowledge", {
@@ -59001,17 +59012,17 @@ function registerPrompts(server, client) {
59001
59012
  argsSchema: object({ initiativeId: idInput("initiative", "taiga_list_initiatives (query finds one by title) gives it") })
59002
59013
  }, async (args) => {
59003
59014
  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);
59015
+ const productId = item.productId;
59005
59016
  const product = (await served$1(client.getProduct(productId), "The product of that item is not visible to the key")).data;
59006
59017
  const origin = defaultOriginFor(product, "architecture");
59007
59018
  const [architecture, instructions, policies] = await Promise.allSettled([
59008
59019
  client.getProductDocument(productId, "architecture", origin),
59009
- client.hasCapability("factories:read") ? client.getFactoryDocument(String(product.factoryId), "factory_instructions") : Promise.reject(new NotGranted("factories:read")),
59020
+ client.hasCapability("factories:read") ? client.getFactoryDocument(product.factoryId, "factory_instructions") : Promise.reject(new NotGranted("factories:read")),
59010
59021
  client.hasCapability("tenant:documents:read") ? client.listTenantDocuments({ limit: 100 }) : Promise.reject(new NotGranted("tenant:documents:read"))
59011
59022
  ]);
59012
59023
  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
59024
  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);
59025
+ 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
59026
  return message([
59016
59027
  `Implement the following initiative of product ${productId} (named in the fenced initiative). Every acceptance`,
59017
59028
  "criterion below must hold when you are done; say which ones you could not verify. Follow the factory",
@@ -59160,7 +59171,7 @@ function forgesOf(rows) {
59160
59171
  })) };
59161
59172
  }
59162
59173
  function githubSource(client, installation) {
59163
- const id = String(installation.id);
59174
+ const id = installation.id;
59164
59175
  return {
59165
59176
  id,
59166
59177
  row: githubAccount(installation),
@@ -59383,7 +59394,7 @@ function registerRepositoryTools(server, client) {
59383
59394
  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
59395
  const login = params.account?.split("/")[0].toLowerCase();
59385
59396
  const chosen = [
59386
- ...installations.filter((i) => (!params.installationId || i.id === params.installationId) && (!login || String(i.accountLogin ?? "").toLowerCase() === login)).map((i) => githubSource(client, i)),
59397
+ ...installations.filter((i) => (!params.installationId || i.id === params.installationId) && (!login || (i.accountLogin ?? "").toLowerCase() === login)).map((i) => githubSource(client, i)),
59387
59398
  ...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
59399
  ...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
59400
  ];
@@ -59532,10 +59543,10 @@ async function served(read, miss) {
59532
59543
  }
59533
59544
  function registerResources(server, client) {
59534
59545
  if (client.hasCapability("tenant:documents:read")) {
59535
- const published = async () => (await client.listTenantDocuments({ limit: 100 })).data.filter((row) => row.isDraft === false);
59546
+ const published = async () => (await client.listTenantDocuments({ limit: 100 })).data.filter((row) => !row.isDraft);
59536
59547
  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),
59548
+ uri: `taiga://documents/${row.type}`,
59549
+ name: row.name ?? row.type,
59539
59550
  description: typeof row.description === "string" ? row.description : void 0,
59540
59551
  mimeType: mimeTypeOf(row)
59541
59552
  })) }) }), {
@@ -59548,7 +59559,7 @@ function registerResources(server, client) {
59548
59559
  } catch (error) {
59549
59560
  if (!isMissOrRefusal(error)) throw error;
59550
59561
  const rest = await published().then((rows) => {
59551
- const names = rows.map((row) => String(row.type));
59562
+ const names = rows.map((row) => row.type);
59552
59563
  return names.length > 0 ? `Published documents: ${names.join(", ")}.` : "Nothing is published yet.";
59553
59564
  }, (reason) => `The published list could not be read (${reason instanceof TaigaApiError ? apiFailureText(reason) : "the request failed"}).`);
59554
59565
  return invalid(`No published ${type} the key can read (${apiFailureText(error)}). ${rest}`);
@@ -60091,7 +60102,7 @@ function withRecoveryHints(tool, schema, inputs, isRead) {
60091
60102
  };
60092
60103
  const argument = issue.path?.length === 1 ? String(issue.path[0]) : void 0;
60093
60104
  const source = argument ? idSource(argument) : void 0;
60094
- if (source && /received undefined/.test(issue.message)) return {
60105
+ if (source && issue.message.includes("received undefined")) return {
60095
60106
  ...issue,
60096
60107
  message: `required. ${source}`
60097
60108
  };
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.1233",
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",