@taiga-ai/mcp-server 0.28.0-dev.606 → 0.28.0-dev.608

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 +62 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -23893,6 +23893,68 @@ discriminatedUnion("kind", [
23893
23893
  }).optional()
23894
23894
  })
23895
23895
  ]).options.map((option) => option.shape.kind.value);
23896
+ /** The raster types factory-vm serves, read from the bytes. Never SVG, which can carry script. */
23897
+ const BUILD_OVERVIEW_IMAGE_TYPES = [
23898
+ "image/png",
23899
+ "image/jpeg",
23900
+ "image/gif",
23901
+ "image/webp"
23902
+ ];
23903
+ /** The largest image, as factory-vm bounds it (5 MiB). */
23904
+ const BUILD_OVERVIEW_IMAGE_MAX_BYTES = 5242880;
23905
+ /** The longest document: factory-vm keeps it at 60,000 characters. */
23906
+ const BUILD_OVERVIEW_DOCUMENT_MAX = 6e4;
23907
+ /** An image's name: letters, digits, `.`, `_` and `-`, starting with a letter or digit. */
23908
+ const BUILD_OVERVIEW_ASSET_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$/;
23909
+ /**
23910
+ * - `ready`: the document and every image it shows were collected.
23911
+ * - `unavailable`: there is none to show: factory-vm wrote none, or
23912
+ * collecting it failed. `problems` says why.
23913
+ */
23914
+ const BUILD_OVERVIEW_STATUSES = ["ready", "unavailable"];
23915
+ const buildOverviewAsset = object({
23916
+ name: string$2().regex(BUILD_OVERVIEW_ASSET_NAME),
23917
+ /** What the image shows; its caption and its alt text. */
23918
+ caption: string$2().trim().min(1).max(1e3),
23919
+ mediaType: _enum(BUILD_OVERVIEW_IMAGE_TYPES),
23920
+ size: number$1().int().min(1).max(BUILD_OVERVIEW_IMAGE_MAX_BYTES),
23921
+ /** Hex SHA-256 of the bytes. */
23922
+ sha256: string$2().regex(/^[0-9a-f]{64}$/)
23923
+ });
23924
+ object({
23925
+ version: literal(1),
23926
+ status: _enum(BUILD_OVERVIEW_STATUSES),
23927
+ /** The Markdown, its images at `asset:<name>`. Only when ready. */
23928
+ document: string$2().trim().min(1).max(BUILD_OVERVIEW_DOCUMENT_MAX).optional(),
23929
+ /** The images, in the order the document first shows them. */
23930
+ assets: array(buildOverviewAsset).max(20).default([]),
23931
+ /** Why there is none, in plain sentences. Only when unavailable. */
23932
+ problems: array(string$2().trim().min(1).max(1e3)).max(20).default([])
23933
+ }).superRefine((body, ctx) => {
23934
+ if (body.status === "ready") {
23935
+ if (!body.document) ctx.addIssue({
23936
+ code: "custom",
23937
+ path: ["document"],
23938
+ message: "A ready overview has a document"
23939
+ });
23940
+ if (new Set(body.assets.map((a) => a.name)).size !== body.assets.length) ctx.addIssue({
23941
+ code: "custom",
23942
+ path: ["assets"],
23943
+ message: "Each image is named once"
23944
+ });
23945
+ } else {
23946
+ if (body.problems.length === 0) ctx.addIssue({
23947
+ code: "custom",
23948
+ path: ["problems"],
23949
+ message: "Say why there is no overview"
23950
+ });
23951
+ if (body.document || body.assets.length > 0) ctx.addIssue({
23952
+ code: "custom",
23953
+ path: ["document"],
23954
+ message: "Only a ready overview carries a document"
23955
+ });
23956
+ }
23957
+ });
23896
23958
  [...BUILD_RUN_ACTIVE_STATUSES.filter((s) => s !== "reviewing")];
23897
23959
  //#endregion
23898
23960
  //#region ../../packages/types/dist/agents.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.28.0-dev.606",
3
+ "version": "0.28.0-dev.608",
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",