@codeam/shared 2.61.45 → 2.61.46

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' | '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' | '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",
@@ -1363,8 +1417,7 @@ var UPCOMING_INTEGRATION_IDS = [
1363
1417
  "mixpanel",
1364
1418
  "pendo",
1365
1419
  "pagerduty",
1366
- "amplitude",
1367
- "datadog"
1420
+ "amplitude"
1368
1421
  ];
1369
1422
  function getIntegrationBranding(id) {
1370
1423
  return INTEGRATION_BRANDING[id] ?? null;