@taiga-ai/mcp-server 0.36.0-dev.916 → 0.36.0-dev.918

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 +82 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -26131,6 +26131,45 @@ const GITLAB_CONNECTION_STATUSES = [
26131
26131
  "unreachable"
26132
26132
  ];
26133
26133
  //#endregion
26134
+ //#region ../../packages/types/dist/cloud-connections.js
26135
+ const CLOUD_CONNECTION_STATUSES = [
26136
+ "pending_setup",
26137
+ "validating",
26138
+ "active",
26139
+ "error",
26140
+ "suspended",
26141
+ "disconnected"
26142
+ ];
26143
+ /**
26144
+ * Keys in `providerConfig` that only Taiga's provisioning path may write.
26145
+ *
26146
+ * PRO-858. `accountName` is the correlation key the AFT account-ready callback
26147
+ * arrives with, and the webhook resolves it under service context with no
26148
+ * tenant predicate -- it has to, because the callback carries no tenant. It is
26149
+ * also guessable: `generateAccountName` derives it from tenant, team and
26150
+ * project slugs. So a tenant that could write this key could plant a row
26151
+ * claiming another tenant's account name, wait for that callback, and have the
26152
+ * victim's `deployConfig` (accountId, deployRoleArn, stateBucket) delivered to
26153
+ * their own environment.
26154
+ *
26155
+ * `accountKey` is the same identity in unguessable form
26156
+ * (`sha256(tenantId:productId:envType)`), and is what the AFT module is named
26157
+ * for -- equally not the caller's to assert.
26158
+ *
26159
+ * Neither is tenant-facing: no provider schema models them, and
26160
+ * `providerConfigProblem` documents them as the shape a MANAGED row has. The
26161
+ * update path merges and persists the RAW config precisely so Zod does not
26162
+ * strip them off managed rows, which is what made a tenant-supplied value
26163
+ * durable. Rejecting rather than stripping, so a client sending one is told,
26164
+ * instead of silently having it dropped.
26165
+ */
26166
+ const TAIGA_MANAGED_PROVIDER_CONFIG_KEYS = ["accountName", "accountKey"];
26167
+ /** Whether `config` leaves alone the keys only Taiga's provisioning writes. */
26168
+ function isTenantWritableProviderConfig(config) {
26169
+ return !TAIGA_MANAGED_PROVIDER_CONFIG_KEYS.some((key) => key in config);
26170
+ }
26171
+ const TAIGA_MANAGED_PROVIDER_CONFIG_MESSAGE = `providerConfig may not set ${TAIGA_MANAGED_PROVIDER_CONFIG_KEYS.join(" or ")}: Taiga's provisioning owns those keys`;
26172
+ //#endregion
26134
26173
  //#region ../../packages/types/dist/environments.js
26135
26174
  const ENVIRONMENT_TYPES = [
26136
26175
  "development",
@@ -27144,6 +27183,14 @@ const cloudProviderConfig = discriminatedUnion("provider", [
27144
27183
  bestPractices: cloudBestPractices
27145
27184
  })
27146
27185
  ]);
27186
+ const newCloudConnection = strictObject({
27187
+ name: string$2().min(1).max(150),
27188
+ provider: _enum(CLOUD_PROVIDERS),
27189
+ providerConfig: cloudProviderConfig
27190
+ }).refine((connection) => connection.provider === connection.providerConfig.provider, {
27191
+ message: "connection.provider must match connection.providerConfig.provider",
27192
+ path: ["providerConfig", "provider"]
27193
+ });
27147
27194
  const columnIndex = number$1().int().min(1).max(EXCEL_MAX_COLUMN);
27148
27195
  const sheetMap = object({
27149
27196
  sheetName: string$2().min(1).max(120),
@@ -27287,15 +27334,8 @@ strictObject({ type: productDocumentType }), object({
27287
27334
  literal(12)
27288
27335
  ]),
27289
27336
  note: string$2().trim().max(1e3).optional()
27290
- }), strictObject({ environments: array(string$2()).default(["development"]) }), strictObject({
27291
- connection: object({
27292
- name: string$2().min(1).max(150),
27293
- provider: _enum(CLOUD_PROVIDERS),
27294
- providerConfig: cloudProviderConfig
27295
- }).refine((connection) => connection.provider === connection.providerConfig.provider, {
27296
- message: "connection.provider must match connection.providerConfig.provider",
27297
- path: ["providerConfig", "provider"]
27298
- }),
27337
+ }), strictObject({ environments: array(string$2()).default(["development"]) }), object({ id: string$2().uuid() }), strictObject({
27338
+ connection: newCloudConnection,
27299
27339
  environment: object({
27300
27340
  name: string$2().min(1).max(100),
27301
27341
  slug: string$2().min(1).max(63).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, "Slug must be lowercase letters, digits, and dashes"),
@@ -27384,7 +27424,16 @@ strictObject({
27384
27424
  status: _enum(GITLAB_CONNECTION_STATUSES),
27385
27425
  lastValidatedAt: string$2(),
27386
27426
  detail: string$2().nullable()
27387
- }), object({ finished: boolean() });
27427
+ }), object({ finished: boolean() }), strictObject({ search: string$2().trim().max(100).optional() }), object({
27428
+ projects: array(object({
27429
+ id: number$1().int(),
27430
+ pathWithNamespace: string$2(),
27431
+ nameWithNamespace: string$2(),
27432
+ webUrl: string$2(),
27433
+ defaultBranch: string$2().nullable()
27434
+ })).nullable(),
27435
+ truncated: boolean()
27436
+ });
27388
27437
  object({
27389
27438
  outcome: _enum([
27390
27439
  "uninstalled",
@@ -27393,6 +27442,8 @@ object({
27393
27442
  ]),
27394
27443
  manageUrl: string$2().nullable()
27395
27444
  });
27445
+ /** A value GitHub's redirect carries back: a state token, or a one-time code. */
27446
+ const githubCallbackSecret = string$2().trim().min(1).max(1024);
27396
27447
  strictObject({
27397
27448
  displayName: string$2().trim().min(1).max(255),
27398
27449
  baseUrl: string$2().trim().min(1).max(480),
@@ -27410,7 +27461,16 @@ strictObject({
27410
27461
  expiresAt: isoInstant.nullable().optional(),
27411
27462
  credential: registryCredential,
27412
27463
  testPackage: registryTestPackage.optional()
27413
- }), strictObject({ hostId: uuid.optional() }), object({ installUrl: string$2().url() }), strictObject({
27464
+ }), strictObject({ hostId: uuid.optional() }), object({ installUrl: string$2().url() }), strictObject({ state: githubCallbackSecret }), object({
27465
+ clientId: string$2(),
27466
+ authorizeUrl: string$2(),
27467
+ redirectUri: string$2().optional()
27468
+ }), strictObject({
27469
+ installationId: number$1().int().positive(),
27470
+ setupAction: _enum(["install", "update"]),
27471
+ state: githubCallbackSecret.optional(),
27472
+ code: githubCallbackSecret.optional()
27473
+ }), strictObject({
27414
27474
  subdomain: string$2().min(1).max(39).optional(),
27415
27475
  serverUrl: string$2().min(1).max(2048).optional(),
27416
27476
  caBundlePem: string$2().max(65536).optional(),
@@ -27420,6 +27480,9 @@ strictObject({
27420
27480
  manifest: record(string$2(), unknown$1()),
27421
27481
  postUrl: string$2().url(),
27422
27482
  state: string$2()
27483
+ }), strictObject({
27484
+ state: githubCallbackSecret,
27485
+ code: githubCallbackSecret
27423
27486
  }), strictObject({ type: _enum(TENANT_DOCUMENT_TYPES) }), strictObject({ type: _enum(TENANT_DOCUMENT_TYPES).refine((type) => type !== "design_standards", { message: "The design standards draft is not made through sync" }) }), strictObject({
27424
27487
  name: string$2().min(1).max(50),
27425
27488
  action: _enum(["accept", "decline"])
@@ -27465,6 +27528,9 @@ strictObject({
27465
27528
  }).refine((a) => Boolean(a.approve) !== Boolean(a.remove), { message: "Name one license to approve or remove" }), object({
27466
27529
  enrolled: number$1().int().nonnegative(),
27467
27530
  total: number$1().int().nonnegative()
27531
+ }), object({
27532
+ principalArn: string$2().nullable(),
27533
+ externalId: string$2()
27468
27534
  });
27469
27535
  strictObject({ kind: _enum(["sbom", "notices"]) }), object({
27470
27536
  url: string$2().url().nullable(),
@@ -27487,6 +27553,11 @@ strictObject({ tier: _enum([
27487
27553
  "staging",
27488
27554
  "production"
27489
27555
  ]) });
27556
+ strictObject({
27557
+ name: string$2().min(1).max(150).optional(),
27558
+ status: _enum(CLOUD_CONNECTION_STATUSES).optional(),
27559
+ providerConfig: record(string$2(), unknown$1()).refine(isTenantWritableProviderConfig, { message: TAIGA_MANAGED_PROVIDER_CONFIG_MESSAGE }).optional()
27560
+ });
27490
27561
  object({
27491
27562
  url: string$2().url(),
27492
27563
  expiresAt: string$2(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ai/mcp-server",
3
- "version": "0.36.0-dev.916",
3
+ "version": "0.36.0-dev.918",
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",