@codeam/shared 2.61.65 → 2.61.66

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.
package/dist/index.d.mts CHANGED
@@ -469,6 +469,18 @@ interface IntegrationDefinition {
469
469
  * resolves the credential by delegating to the source integration, and the
470
470
  * client renders it as "part of <source>" with no Connect action of its own. */
471
471
  aliasOf?: IntegrationId;
472
+ /** SECONDARY api-key / PAT path for a PRIMARY OAuth integration. OAuth
473
+ * (`kind`) stays the primary/preferred flow; this lets the user paste a
474
+ * personal access token instead — a fallback while the vendor's OAuth app
475
+ * is in review, or a permanent alternative (like GitHub OAuth + PAT).
476
+ * ⚠️ The PAT often needs a DIFFERENT delivery env var than the OAuth token
477
+ * (e.g. Figma: OAuth → `FIGMA_OAUTH_TOKEN`/Bearer, PAT →
478
+ * `FIGMA_API_KEY`/`X-Figma-Token`), so it carries its OWN `envMapping` used
479
+ * INSTEAD of `delivery.mcp.envMapping` when the credential was linked via PAT. */
480
+ apiKeyFallback?: {
481
+ fields: IntegrationApiKeyField[];
482
+ envMapping: Record<string, string>;
483
+ };
472
484
  };
473
485
  delivery: IntegrationDelivery;
474
486
  }
@@ -575,7 +587,7 @@ interface IntegrationBranding {
575
587
  logoSvg: string;
576
588
  }
577
589
  declare const INTEGRATION_BRANDING: Record<string, IntegrationBranding>;
578
- declare const UPCOMING_INTEGRATION_IDS: readonly ["gmail", "figma", "asana", "stripe", "pendo", "pagerduty", "amplitude"];
590
+ declare const UPCOMING_INTEGRATION_IDS: readonly ["gmail", "asana", "stripe", "pendo", "pagerduty", "amplitude"];
579
591
  declare function getIntegrationBranding(id: string): IntegrationBranding | null;
580
592
 
581
593
  /**
package/dist/index.d.ts CHANGED
@@ -469,6 +469,18 @@ interface IntegrationDefinition {
469
469
  * resolves the credential by delegating to the source integration, and the
470
470
  * client renders it as "part of <source>" with no Connect action of its own. */
471
471
  aliasOf?: IntegrationId;
472
+ /** SECONDARY api-key / PAT path for a PRIMARY OAuth integration. OAuth
473
+ * (`kind`) stays the primary/preferred flow; this lets the user paste a
474
+ * personal access token instead — a fallback while the vendor's OAuth app
475
+ * is in review, or a permanent alternative (like GitHub OAuth + PAT).
476
+ * ⚠️ The PAT often needs a DIFFERENT delivery env var than the OAuth token
477
+ * (e.g. Figma: OAuth → `FIGMA_OAUTH_TOKEN`/Bearer, PAT →
478
+ * `FIGMA_API_KEY`/`X-Figma-Token`), so it carries its OWN `envMapping` used
479
+ * INSTEAD of `delivery.mcp.envMapping` when the credential was linked via PAT. */
480
+ apiKeyFallback?: {
481
+ fields: IntegrationApiKeyField[];
482
+ envMapping: Record<string, string>;
483
+ };
472
484
  };
473
485
  delivery: IntegrationDelivery;
474
486
  }
@@ -575,7 +587,7 @@ interface IntegrationBranding {
575
587
  logoSvg: string;
576
588
  }
577
589
  declare const INTEGRATION_BRANDING: Record<string, IntegrationBranding>;
578
- declare const UPCOMING_INTEGRATION_IDS: readonly ["gmail", "figma", "asana", "stripe", "pendo", "pagerduty", "amplitude"];
590
+ declare const UPCOMING_INTEGRATION_IDS: readonly ["gmail", "asana", "stripe", "pendo", "pagerduty", "amplitude"];
579
591
  declare function getIntegrationBranding(id: string): IntegrationBranding | null;
580
592
 
581
593
  /**
package/dist/index.js CHANGED
@@ -1147,11 +1147,12 @@ var INTEGRATION_REGISTRY = {
1147
1147
  name: "Figma",
1148
1148
  icon: "figma",
1149
1149
  category: "design",
1150
- // DARK pending Figma's OAuth-app review approval (submitted 2026-07-16).
1151
- // Figma OAuth apps do NOT exist publicly until review passes (authorize URL
1152
- // errors "OAuth app ... doesn't exist"). Backend provider + secrets are
1153
- // already deployed; flip to true once approved (bead codeagent-m4ix).
1154
- enabled: false,
1150
+ // LIVE. OAuth is the PRIMARY flow (app pending Figma's review until it
1151
+ // passes the authorize URL errors "OAuth app doesn't exist"), so a PAT
1152
+ // fallback (`apiKeyFallback`) ships alongside it and works TODAY: the user
1153
+ // pastes a Figma personal access token. Same OAuth-primary + PAT-secondary
1154
+ // shape as GitHub. Flip of the OAuth review is transparent (bead codeagent-m4ix).
1155
+ enabled: true,
1155
1156
  auth: {
1156
1157
  kind: "oauth_redirect",
1157
1158
  // Granular READ-ONLY scopes (legacy `files:read` is deprecated for
@@ -1165,7 +1166,25 @@ var INTEGRATION_REGISTRY = {
1165
1166
  "file_metadata:read",
1166
1167
  "file_dev_resources:read",
1167
1168
  "library_content:read"
1168
- ]
1169
+ ],
1170
+ // SECONDARY: paste a Figma personal access token instead of OAuth. The
1171
+ // PAT uses the `X-Figma-Token` header, so the delivery env var differs
1172
+ // from OAuth (`FIGMA_API_KEY` vs `FIGMA_OAUTH_TOKEN`) — hence its own
1173
+ // envMapping, used when the credential was linked via PAT.
1174
+ apiKeyFallback: {
1175
+ fields: [
1176
+ {
1177
+ key: "accessToken",
1178
+ label: "Figma personal access token",
1179
+ placeholder: "figd_\u2026",
1180
+ secret: true,
1181
+ help: "Figma \u2192 Settings \u2192 Security \u2192 Personal access tokens (read-only scopes)."
1182
+ }
1183
+ ],
1184
+ envMapping: {
1185
+ FIGMA_API_KEY: "accessToken"
1186
+ }
1187
+ }
1169
1188
  },
1170
1189
  delivery: {
1171
1190
  mcp: {
@@ -1812,7 +1831,6 @@ var INTEGRATION_BRANDING = {
1812
1831
  };
1813
1832
  var UPCOMING_INTEGRATION_IDS = [
1814
1833
  "gmail",
1815
- "figma",
1816
1834
  "asana",
1817
1835
  "stripe",
1818
1836
  "pendo",