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

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 +54 -9
  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"),
@@ -27487,6 +27527,11 @@ strictObject({ tier: _enum([
27487
27527
  "staging",
27488
27528
  "production"
27489
27529
  ]) });
27530
+ strictObject({
27531
+ name: string$2().min(1).max(150).optional(),
27532
+ status: _enum(CLOUD_CONNECTION_STATUSES).optional(),
27533
+ providerConfig: record(string$2(), unknown$1()).refine(isTenantWritableProviderConfig, { message: TAIGA_MANAGED_PROVIDER_CONFIG_MESSAGE }).optional()
27534
+ });
27490
27535
  object({
27491
27536
  url: string$2().url(),
27492
27537
  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.917",
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",