@codeam/shared 2.61.45 → 2.61.47

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
@@ -351,7 +351,7 @@ declare function isHeadroomWrappable(agentId: string): boolean;
351
351
  * ubiquitous CLI for the tool → `cliEnv`; otherwise → `mcp`. A tool may
352
352
  * declare both.
353
353
  */
354
- type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat' | 'discord' | 'resend' | 'posthog' | 'github_issues' | 'github' | 'gitlab';
354
+ type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat' | 'discord' | 'resend' | 'posthog' | 'datadog' | 'stitch' | 'github_issues' | 'github' | 'gitlab';
355
355
  /**
356
356
  * `derived` = no link flow of its own: the credential is BORROWED live from a
357
357
  * connection the user already made elsewhere (see `derivedFrom`). The backend
@@ -388,8 +388,9 @@ type IntegrationCategory = 'version_control' | 'tracker' | 'design' | 'comms' |
388
388
  * field the delivery `envMapping` references.
389
389
  */
390
390
  interface IntegrationApiKeyField {
391
- /** Maps to a BrokeredIntegrationToken field (`accessToken`, `orgUrl`, …). */
392
- key: 'accessToken' | 'orgUrl';
391
+ /** Maps to a BrokeredIntegrationToken field (`accessToken`, `orgUrl`,
392
+ * `appKey`, `host`, …). */
393
+ key: 'accessToken' | 'orgUrl' | 'appKey' | 'host';
393
394
  /** Form label. */
394
395
  label: string;
395
396
  /** Example / placeholder. */
@@ -419,12 +420,15 @@ interface IntegrationMcpDelivery {
419
420
  * Merged into the child env BENEATH the credential envMapping. Never secrets. STDIO transport. */
420
421
  staticEnv?: Record<string, string>;
421
422
  /** HTTP transport — a REMOTE MCP URL (Streamable HTTP). When set, the shim
422
- * relays to it instead of spawning `command`. */
423
+ * relays to it instead of spawning `command`. May carry `{field}` placeholders
424
+ * filled from the BrokeredIntegrationToken (e.g. a per-user regional host:
425
+ * `https://mcp.{host}/…`). */
423
426
  httpUrl?: string;
424
427
  /** HTTP transport — header name → value TEMPLATE with `{field}` placeholders
425
428
  * filled from the BrokeredIntegrationToken at spawn (e.g.
426
- * `{ Authorization: 'Bearer {accessToken}' }`). The token stays server-side of
427
- * the shim never on argv. */
429
+ * `{ Authorization: 'Bearer {accessToken}' }` or Datadog's
430
+ * `{ 'DD-API-KEY': '{accessToken}', 'DD-APPLICATION-KEY': '{appKey}' }`). The
431
+ * token stays server-side of the shim — never on argv. */
428
432
  httpHeaders?: Record<string, string>;
429
433
  }
430
434
  interface IntegrationDelivery {
@@ -501,6 +505,10 @@ interface BrokeredIntegrationToken {
501
505
  * single BOT token, injected by the broker from config — the per-user
502
506
  * credential IS the guildId. Absent for non-Discord integrations. */
503
507
  guildId?: string;
508
+ /** Datadog Application key (user-scoped) — sent alongside the API key
509
+ * (`accessToken`) as the `DD-APPLICATION-KEY` header; `host` carries the
510
+ * regional site. Absent for non-Datadog integrations. */
511
+ appKey?: string;
504
512
  }
505
513
 
506
514
  /**
@@ -548,7 +556,7 @@ interface IntegrationBranding {
548
556
  logoSvg: string;
549
557
  }
550
558
  declare const INTEGRATION_BRANDING: Record<string, IntegrationBranding>;
551
- declare const UPCOMING_INTEGRATION_IDS: readonly ["gmail", "clickup", "figma", "trello", "vercel", "supabase", "asana", "postman", "n8n", "stripe", "mixpanel", "pendo", "pagerduty", "amplitude", "datadog"];
559
+ declare const UPCOMING_INTEGRATION_IDS: readonly ["gmail", "clickup", "figma", "trello", "vercel", "supabase", "asana", "postman", "n8n", "stripe", "mixpanel", "pendo", "pagerduty", "amplitude"];
552
560
  declare function getIntegrationBranding(id: string): IntegrationBranding | null;
553
561
 
554
562
  /**
package/dist/index.d.ts CHANGED
@@ -351,7 +351,7 @@ declare function isHeadroomWrappable(agentId: string): boolean;
351
351
  * ubiquitous CLI for the tool → `cliEnv`; otherwise → `mcp`. A tool may
352
352
  * declare both.
353
353
  */
354
- type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat' | 'discord' | 'resend' | 'posthog' | 'github_issues' | 'github' | 'gitlab';
354
+ type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat' | 'discord' | 'resend' | 'posthog' | 'datadog' | 'stitch' | 'github_issues' | 'github' | 'gitlab';
355
355
  /**
356
356
  * `derived` = no link flow of its own: the credential is BORROWED live from a
357
357
  * connection the user already made elsewhere (see `derivedFrom`). The backend
@@ -388,8 +388,9 @@ type IntegrationCategory = 'version_control' | 'tracker' | 'design' | 'comms' |
388
388
  * field the delivery `envMapping` references.
389
389
  */
390
390
  interface IntegrationApiKeyField {
391
- /** Maps to a BrokeredIntegrationToken field (`accessToken`, `orgUrl`, …). */
392
- key: 'accessToken' | 'orgUrl';
391
+ /** Maps to a BrokeredIntegrationToken field (`accessToken`, `orgUrl`,
392
+ * `appKey`, `host`, …). */
393
+ key: 'accessToken' | 'orgUrl' | 'appKey' | 'host';
393
394
  /** Form label. */
394
395
  label: string;
395
396
  /** Example / placeholder. */
@@ -419,12 +420,15 @@ interface IntegrationMcpDelivery {
419
420
  * Merged into the child env BENEATH the credential envMapping. Never secrets. STDIO transport. */
420
421
  staticEnv?: Record<string, string>;
421
422
  /** HTTP transport — a REMOTE MCP URL (Streamable HTTP). When set, the shim
422
- * relays to it instead of spawning `command`. */
423
+ * relays to it instead of spawning `command`. May carry `{field}` placeholders
424
+ * filled from the BrokeredIntegrationToken (e.g. a per-user regional host:
425
+ * `https://mcp.{host}/…`). */
423
426
  httpUrl?: string;
424
427
  /** HTTP transport — header name → value TEMPLATE with `{field}` placeholders
425
428
  * filled from the BrokeredIntegrationToken at spawn (e.g.
426
- * `{ Authorization: 'Bearer {accessToken}' }`). The token stays server-side of
427
- * the shim never on argv. */
429
+ * `{ Authorization: 'Bearer {accessToken}' }` or Datadog's
430
+ * `{ 'DD-API-KEY': '{accessToken}', 'DD-APPLICATION-KEY': '{appKey}' }`). The
431
+ * token stays server-side of the shim — never on argv. */
428
432
  httpHeaders?: Record<string, string>;
429
433
  }
430
434
  interface IntegrationDelivery {
@@ -501,6 +505,10 @@ interface BrokeredIntegrationToken {
501
505
  * single BOT token, injected by the broker from config — the per-user
502
506
  * credential IS the guildId. Absent for non-Discord integrations. */
503
507
  guildId?: string;
508
+ /** Datadog Application key (user-scoped) — sent alongside the API key
509
+ * (`accessToken`) as the `DD-APPLICATION-KEY` header; `host` carries the
510
+ * regional site. Absent for non-Datadog integrations. */
511
+ appKey?: string;
504
512
  }
505
513
 
506
514
  /**
@@ -548,7 +556,7 @@ interface IntegrationBranding {
548
556
  logoSvg: string;
549
557
  }
550
558
  declare const INTEGRATION_BRANDING: Record<string, IntegrationBranding>;
551
- declare const UPCOMING_INTEGRATION_IDS: readonly ["gmail", "clickup", "figma", "trello", "vercel", "supabase", "asana", "postman", "n8n", "stripe", "mixpanel", "pendo", "pagerduty", "amplitude", "datadog"];
559
+ declare const UPCOMING_INTEGRATION_IDS: readonly ["gmail", "clickup", "figma", "trello", "vercel", "supabase", "asana", "postman", "n8n", "stripe", "mixpanel", "pendo", "pagerduty", "amplitude"];
552
560
  declare function getIntegrationBranding(id: string): IntegrationBranding | null;
553
561
 
554
562
  /**
package/dist/index.js CHANGED
@@ -947,6 +947,60 @@ var INTEGRATION_REGISTRY = {
947
947
  }
948
948
  }
949
949
  },
950
+ datadog: {
951
+ id: "datadog",
952
+ name: "Datadog",
953
+ icon: "datadog",
954
+ category: "observability",
955
+ // LIVE — api_key: the user pastes a Datadog API key (org-scoped) + an
956
+ // Application key (user-scoped, grants the read scopes) + their regional
957
+ // site. Datadog's OFFICIAL hosted MCP (mcp.<site>) accepts these as headers
958
+ // headless (verified) — no OAuth, no GSM secret. Delivery uses the shim's
959
+ // HTTP transport with the site templated into the URL and both keys sent as
960
+ // DD-API-KEY / DD-APPLICATION-KEY headers.
961
+ enabled: true,
962
+ auth: {
963
+ kind: "api_key",
964
+ fields: [
965
+ {
966
+ key: "accessToken",
967
+ label: "API Key",
968
+ placeholder: "Datadog API key",
969
+ secret: true,
970
+ help: "Organization API key \u2014 Datadog \u2192 Organization Settings \u2192 API Keys."
971
+ },
972
+ {
973
+ key: "appKey",
974
+ label: "Application Key",
975
+ placeholder: "Datadog application key",
976
+ secret: true,
977
+ help: "User Application key (grants the read scopes) \u2014 Datadog \u2192 Organization Settings \u2192 Application Keys."
978
+ },
979
+ {
980
+ key: "host",
981
+ label: "Site",
982
+ placeholder: "datadoghq.com",
983
+ secret: false,
984
+ help: "Your Datadog site \u2014 US1: datadoghq.com \xB7 EU: datadoghq.eu \xB7 US3: us3.datadoghq.com \xB7 US5: us5.datadoghq.com \xB7 AP1: ap1.datadoghq.com."
985
+ }
986
+ ]
987
+ },
988
+ delivery: {
989
+ mcp: {
990
+ // HTTP transport — the shim relays to Datadog's hosted MCP for the
991
+ // user's site, with both keys as headers. Keys stay server-side of the
992
+ // shim, never on argv.
993
+ command: "",
994
+ args: [],
995
+ envMapping: {},
996
+ httpUrl: "https://mcp.{host}/api/unstable/mcp-server/mcp",
997
+ httpHeaders: {
998
+ "DD-API-KEY": "{accessToken}",
999
+ "DD-APPLICATION-KEY": "{appKey}"
1000
+ }
1001
+ }
1002
+ }
1003
+ },
950
1004
  notion: {
951
1005
  id: "notion",
952
1006
  name: "Notion",
@@ -1070,6 +1124,42 @@ var INTEGRATION_REGISTRY = {
1070
1124
  }
1071
1125
  }
1072
1126
  }
1127
+ },
1128
+ stitch: {
1129
+ id: "stitch",
1130
+ name: "Stitch",
1131
+ icon: "stitch",
1132
+ category: "design",
1133
+ // LIVE — api_key: the user pastes a Stitch API key (Google Stitch →
1134
+ // Settings → API Key). Stitch's MCP is hosted-only (stitch.googleapis.com)
1135
+ // and accepts the key as the `X-Goog-Api-Key` header headless (verified) —
1136
+ // no OAuth, no GSM secret. Delivery uses the shim's HTTP transport.
1137
+ // (Stitch ALSO supports Google OAuth 2.0, but that's a follow-up — our model
1138
+ // is one auth kind per integration and api_key is the simple, headless path.)
1139
+ enabled: true,
1140
+ auth: {
1141
+ kind: "api_key",
1142
+ fields: [
1143
+ {
1144
+ key: "accessToken",
1145
+ label: "API Key",
1146
+ placeholder: "Stitch API key",
1147
+ secret: true,
1148
+ help: "Google Stitch \u2192 profile menu \u2192 Stitch Settings \u2192 API Key \u2192 Create Key."
1149
+ }
1150
+ ]
1151
+ },
1152
+ delivery: {
1153
+ mcp: {
1154
+ // HTTP transport — the shim relays to Stitch's hosted MCP with the key
1155
+ // as the X-Goog-Api-Key header. Key stays server-side of the shim.
1156
+ command: "",
1157
+ args: [],
1158
+ envMapping: {},
1159
+ httpUrl: "https://stitch.googleapis.com/mcp",
1160
+ httpHeaders: { "X-Goog-Api-Key": "{accessToken}" }
1161
+ }
1162
+ }
1073
1163
  }
1074
1164
  };
1075
1165
  function getEnabledIntegrations() {
@@ -1244,6 +1334,16 @@ var INTEGRATION_BRANDING = {
1244
1334
  brandColor: "#F24E1E",
1245
1335
  logoSvg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Figma</title><path fill="#FFFFFF" d="M15.852 8.981h-4.588V0h4.588c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.491-4.49 4.491zM12.735 7.51h3.117c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-3.117V7.51zm0 1.471H8.148c-2.476 0-4.49-2.014-4.49-4.49S5.672 0 8.148 0h4.588v8.981zm-4.587-7.51c-1.665 0-3.019 1.355-3.019 3.019s1.354 3.02 3.019 3.02h3.117V1.471H8.148zm4.587 15.019H8.148c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h4.588v8.98zM8.148 8.981c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h3.117V8.981H8.148zM8.172 24c-2.489 0-4.515-2.014-4.515-4.49s2.014-4.49 4.49-4.49h4.588v4.441c0 2.503-2.047 4.539-4.563 4.539zm-.024-7.51a3.023 3.023 0 0 0-3.019 3.019c0 1.665 1.365 3.019 3.044 3.019 1.705 0 3.093-1.376 3.093-3.068v-2.97H8.148zm7.704 0h-.098c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h.098c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.49-4.49 4.49zm-.097-7.509c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h.098c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-.098z"/></svg>'
1246
1336
  },
1337
+ stitch: {
1338
+ id: "stitch",
1339
+ name: "Stitch",
1340
+ vendor: "Google",
1341
+ tagline: "AI UI design \u2192 code",
1342
+ brandColor: "#A855F7",
1343
+ // A simple 4-point design "sparkle" mark (Google Stitch has no simple-icons
1344
+ // entry) — white on dark, re-tintable via brandColor like the other marks.
1345
+ logoSvg: '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#FFFFFF" d="M12 1.5l1.9 6.3a4 4 0 0 0 2.3 2.3l6.3 1.9-6.3 1.9a4 4 0 0 0-2.3 2.3L12 22.5l-1.9-6.3a4 4 0 0 0-2.3-2.3L1.5 12l6.3-1.9a4 4 0 0 0 2.3-2.3L12 1.5z"/></svg>'
1346
+ },
1247
1347
  trello: {
1248
1348
  id: "trello",
1249
1349
  name: "Trello",
@@ -1363,8 +1463,7 @@ var UPCOMING_INTEGRATION_IDS = [
1363
1463
  "mixpanel",
1364
1464
  "pendo",
1365
1465
  "pagerduty",
1366
- "amplitude",
1367
- "datadog"
1466
+ "amplitude"
1368
1467
  ];
1369
1468
  function getIntegrationBranding(id) {
1370
1469
  return INTEGRATION_BRANDING[id] ?? null;