@codeam/shared 2.61.64 → 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
@@ -840,13 +840,43 @@ var INTEGRATION_REGISTRY = {
840
840
  name: "Microsoft Teams",
841
841
  icon: "microsoft_teams",
842
842
  category: "comms",
843
- // COMING SOON placeholder catalog entry (no OAuth provider / MCP yet). The
844
- // agent will post review pings + read threads AS THE USER over Microsoft Graph
845
- // once the provider lands. `enabled:false` renders it as a dimmed "coming
846
- // soon" tile inside the (live) comms category.
847
- enabled: false,
848
- auth: { kind: "oauth_redirect" },
849
- delivery: {}
843
+ // LIVEMicrosoft identity platform v2.0 OAuth (multi-tenant, Confidential).
844
+ // The agent reads chats/channels + posts AS THE USER over Microsoft Graph.
845
+ // MS_TEAMS_OAUTH_CLIENT_ID/SECRET/REDIRECT_URI are in Secret Manager (prod+dev);
846
+ // the backend TeamsOAuthProvider is config-gated (503 if env unset).
847
+ // ⚠️ Chat.* + ChannelMessage.Read.All (`.All`) require TENANT-ADMIN consent
848
+ // (MC1163922, Oct-2025) the connecting user must be an org admin, or their
849
+ // IT admin approves the app for the tenant. Not a self-serve funnel like Slack.
850
+ enabled: true,
851
+ auth: {
852
+ kind: "oauth_redirect",
853
+ // Delegated Microsoft Graph scopes. `offline_access` → rotating refresh
854
+ // (Teams access tokens are ~1h). ⚠️ Changing these requires the user to
855
+ // RE-LINK — the token carries only the scopes granted at link time.
856
+ scopes: [
857
+ "User.Read",
858
+ "User.ReadBasic.All",
859
+ "Team.ReadBasic.All",
860
+ "Channel.ReadBasic.All",
861
+ "ChannelMessage.Read.All",
862
+ "ChannelMessage.Send",
863
+ "Chat.Read",
864
+ "Chat.ReadWrite",
865
+ "offline_access"
866
+ ]
867
+ },
868
+ delivery: {
869
+ mcp: {
870
+ // @floriscornel/teams-mcp (Node): BYO Graph access token via AUTH_TOKEN
871
+ // (env only, never argv). Headless. Version PINNED; bump only after
872
+ // re-verifying headless. Tools: get/send channel + chat messages, replies.
873
+ command: "npx",
874
+ args: ["-y", "@floriscornel/teams-mcp@0.9.0"],
875
+ envMapping: {
876
+ AUTH_TOKEN: "accessToken"
877
+ }
878
+ }
879
+ }
850
880
  },
851
881
  google_chat: {
852
882
  id: "google_chat",
@@ -1117,11 +1147,12 @@ var INTEGRATION_REGISTRY = {
1117
1147
  name: "Figma",
1118
1148
  icon: "figma",
1119
1149
  category: "design",
1120
- // DARK pending Figma's OAuth-app review approval (submitted 2026-07-16).
1121
- // Figma OAuth apps do NOT exist publicly until review passes (authorize URL
1122
- // errors "OAuth app ... doesn't exist"). Backend provider + secrets are
1123
- // already deployed; flip to true once approved (bead codeagent-m4ix).
1124
- 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,
1125
1156
  auth: {
1126
1157
  kind: "oauth_redirect",
1127
1158
  // Granular READ-ONLY scopes (legacy `files:read` is deprecated for
@@ -1135,7 +1166,25 @@ var INTEGRATION_REGISTRY = {
1135
1166
  "file_metadata:read",
1136
1167
  "file_dev_resources:read",
1137
1168
  "library_content:read"
1138
- ]
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
+ }
1139
1188
  },
1140
1189
  delivery: {
1141
1190
  mcp: {
@@ -1782,7 +1831,6 @@ var INTEGRATION_BRANDING = {
1782
1831
  };
1783
1832
  var UPCOMING_INTEGRATION_IDS = [
1784
1833
  "gmail",
1785
- "figma",
1786
1834
  "asana",
1787
1835
  "stripe",
1788
1836
  "pendo",