@codeam/shared 2.61.43 → 2.61.45
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 +28 -5
- package/dist/index.d.ts +28 -5
- package/dist/index.js +77 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +77 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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' | 'github_issues' | 'github' | 'gitlab';
|
|
354
|
+
type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat' | 'discord' | 'resend' | 'posthog' | '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
|
|
@@ -400,15 +400,32 @@ interface IntegrationApiKeyField {
|
|
|
400
400
|
help?: string;
|
|
401
401
|
}
|
|
402
402
|
type IntegrationHealth = 'ok' | 'expired' | 'revoked';
|
|
403
|
-
/** stdio MCP server spec, executed as DATA by the CLI shim (`codeam mcp-run <id>`).
|
|
403
|
+
/** stdio MCP server spec, executed as DATA by the CLI shim (`codeam mcp-run <id>`).
|
|
404
|
+
*
|
|
405
|
+
* Two transports:
|
|
406
|
+
* - **stdio (default):** the shim spawns `command args` (with `envMapping`
|
|
407
|
+
* credentials in the env) and byte-pipes it to the agent.
|
|
408
|
+
* - **HTTP (`httpUrl` set):** the shim connects to a REMOTE MCP over
|
|
409
|
+
* Streamable HTTP and relays it to the agent's stdio — for vendors that only
|
|
410
|
+
* ship a hosted MCP (e.g. PostHog `mcp.posthog.com`). `command`/`args` are
|
|
411
|
+
* unused (empty); credentials go in `httpHeaders` (never `envMapping`).
|
|
412
|
+
*/
|
|
404
413
|
interface IntegrationMcpDelivery {
|
|
405
414
|
command: string;
|
|
406
415
|
args: string[];
|
|
407
|
-
/** env var name → credential field (`accessToken` | `cloudId` | …). Env only, never argv. */
|
|
416
|
+
/** env var name → credential field (`accessToken` | `cloudId` | …). Env only, never argv. STDIO transport. */
|
|
408
417
|
envMapping: Record<string, string>;
|
|
409
418
|
/** Static, non-credential env the server needs to boot (e.g. mode flags).
|
|
410
|
-
* Merged into the child env BENEATH the credential envMapping. Never secrets. */
|
|
419
|
+
* Merged into the child env BENEATH the credential envMapping. Never secrets. STDIO transport. */
|
|
411
420
|
staticEnv?: Record<string, string>;
|
|
421
|
+
/** HTTP transport — a REMOTE MCP URL (Streamable HTTP). When set, the shim
|
|
422
|
+
* relays to it instead of spawning `command`. */
|
|
423
|
+
httpUrl?: string;
|
|
424
|
+
/** HTTP transport — header name → value TEMPLATE with `{field}` placeholders
|
|
425
|
+
* filled from the BrokeredIntegrationToken at spawn (e.g.
|
|
426
|
+
* `{ Authorization: 'Bearer {accessToken}' }`). The token stays server-side of
|
|
427
|
+
* the shim — never on argv. */
|
|
428
|
+
httpHeaders?: Record<string, string>;
|
|
412
429
|
}
|
|
413
430
|
interface IntegrationDelivery {
|
|
414
431
|
mcp?: IntegrationMcpDelivery;
|
|
@@ -421,6 +438,12 @@ interface IntegrationDefinition {
|
|
|
421
438
|
icon: string;
|
|
422
439
|
category: IntegrationCategory;
|
|
423
440
|
enabled: boolean;
|
|
441
|
+
/** A `comms` integration that only SENDS (e.g. Resend email) — it has no
|
|
442
|
+
* readable threads, so it is EXCLUDED from From-Conversation's source list
|
|
443
|
+
* (which needs `listRecentThreads`/`getThread`/`postReply`) while still being
|
|
444
|
+
* a linkable comms tool the agent uses via its MCP delivery. Absent/false for
|
|
445
|
+
* conversational comms (Slack, Discord). */
|
|
446
|
+
sendOnly?: boolean;
|
|
424
447
|
auth: {
|
|
425
448
|
kind: IntegrationAuthKind;
|
|
426
449
|
scopes?: string[];
|
|
@@ -525,7 +548,7 @@ interface IntegrationBranding {
|
|
|
525
548
|
logoSvg: string;
|
|
526
549
|
}
|
|
527
550
|
declare const INTEGRATION_BRANDING: Record<string, IntegrationBranding>;
|
|
528
|
-
declare const UPCOMING_INTEGRATION_IDS: readonly ["gmail", "
|
|
551
|
+
declare const UPCOMING_INTEGRATION_IDS: readonly ["gmail", "clickup", "figma", "trello", "vercel", "supabase", "asana", "postman", "n8n", "stripe", "mixpanel", "pendo", "pagerduty", "amplitude", "datadog"];
|
|
529
552
|
declare function getIntegrationBranding(id: string): IntegrationBranding | null;
|
|
530
553
|
|
|
531
554
|
/**
|
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' | 'github_issues' | 'github' | 'gitlab';
|
|
354
|
+
type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat' | 'discord' | 'resend' | 'posthog' | '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
|
|
@@ -400,15 +400,32 @@ interface IntegrationApiKeyField {
|
|
|
400
400
|
help?: string;
|
|
401
401
|
}
|
|
402
402
|
type IntegrationHealth = 'ok' | 'expired' | 'revoked';
|
|
403
|
-
/** stdio MCP server spec, executed as DATA by the CLI shim (`codeam mcp-run <id>`).
|
|
403
|
+
/** stdio MCP server spec, executed as DATA by the CLI shim (`codeam mcp-run <id>`).
|
|
404
|
+
*
|
|
405
|
+
* Two transports:
|
|
406
|
+
* - **stdio (default):** the shim spawns `command args` (with `envMapping`
|
|
407
|
+
* credentials in the env) and byte-pipes it to the agent.
|
|
408
|
+
* - **HTTP (`httpUrl` set):** the shim connects to a REMOTE MCP over
|
|
409
|
+
* Streamable HTTP and relays it to the agent's stdio — for vendors that only
|
|
410
|
+
* ship a hosted MCP (e.g. PostHog `mcp.posthog.com`). `command`/`args` are
|
|
411
|
+
* unused (empty); credentials go in `httpHeaders` (never `envMapping`).
|
|
412
|
+
*/
|
|
404
413
|
interface IntegrationMcpDelivery {
|
|
405
414
|
command: string;
|
|
406
415
|
args: string[];
|
|
407
|
-
/** env var name → credential field (`accessToken` | `cloudId` | …). Env only, never argv. */
|
|
416
|
+
/** env var name → credential field (`accessToken` | `cloudId` | …). Env only, never argv. STDIO transport. */
|
|
408
417
|
envMapping: Record<string, string>;
|
|
409
418
|
/** Static, non-credential env the server needs to boot (e.g. mode flags).
|
|
410
|
-
* Merged into the child env BENEATH the credential envMapping. Never secrets. */
|
|
419
|
+
* Merged into the child env BENEATH the credential envMapping. Never secrets. STDIO transport. */
|
|
411
420
|
staticEnv?: Record<string, string>;
|
|
421
|
+
/** HTTP transport — a REMOTE MCP URL (Streamable HTTP). When set, the shim
|
|
422
|
+
* relays to it instead of spawning `command`. */
|
|
423
|
+
httpUrl?: string;
|
|
424
|
+
/** HTTP transport — header name → value TEMPLATE with `{field}` placeholders
|
|
425
|
+
* filled from the BrokeredIntegrationToken at spawn (e.g.
|
|
426
|
+
* `{ Authorization: 'Bearer {accessToken}' }`). The token stays server-side of
|
|
427
|
+
* the shim — never on argv. */
|
|
428
|
+
httpHeaders?: Record<string, string>;
|
|
412
429
|
}
|
|
413
430
|
interface IntegrationDelivery {
|
|
414
431
|
mcp?: IntegrationMcpDelivery;
|
|
@@ -421,6 +438,12 @@ interface IntegrationDefinition {
|
|
|
421
438
|
icon: string;
|
|
422
439
|
category: IntegrationCategory;
|
|
423
440
|
enabled: boolean;
|
|
441
|
+
/** A `comms` integration that only SENDS (e.g. Resend email) — it has no
|
|
442
|
+
* readable threads, so it is EXCLUDED from From-Conversation's source list
|
|
443
|
+
* (which needs `listRecentThreads`/`getThread`/`postReply`) while still being
|
|
444
|
+
* a linkable comms tool the agent uses via its MCP delivery. Absent/false for
|
|
445
|
+
* conversational comms (Slack, Discord). */
|
|
446
|
+
sendOnly?: boolean;
|
|
424
447
|
auth: {
|
|
425
448
|
kind: IntegrationAuthKind;
|
|
426
449
|
scopes?: string[];
|
|
@@ -525,7 +548,7 @@ interface IntegrationBranding {
|
|
|
525
548
|
logoSvg: string;
|
|
526
549
|
}
|
|
527
550
|
declare const INTEGRATION_BRANDING: Record<string, IntegrationBranding>;
|
|
528
|
-
declare const UPCOMING_INTEGRATION_IDS: readonly ["gmail", "
|
|
551
|
+
declare const UPCOMING_INTEGRATION_IDS: readonly ["gmail", "clickup", "figma", "trello", "vercel", "supabase", "asana", "postman", "n8n", "stripe", "mixpanel", "pendo", "pagerduty", "amplitude", "datadog"];
|
|
529
552
|
declare function getIntegrationBranding(id: string): IntegrationBranding | null;
|
|
530
553
|
|
|
531
554
|
/**
|
package/dist/index.js
CHANGED
|
@@ -870,6 +870,83 @@ var INTEGRATION_REGISTRY = {
|
|
|
870
870
|
}
|
|
871
871
|
}
|
|
872
872
|
},
|
|
873
|
+
resend: {
|
|
874
|
+
id: "resend",
|
|
875
|
+
name: "Resend",
|
|
876
|
+
icon: "resend",
|
|
877
|
+
category: "comms",
|
|
878
|
+
// LIVE — api_key (like Azure DevOps): the user pastes a Resend API key
|
|
879
|
+
// (`re_…`); Resend has NO OAuth, so there's no OAuth app / GSM secret /
|
|
880
|
+
// config-gated 503 — a backend VALIDATOR proves the key against the Resend
|
|
881
|
+
// API and vaults it. ⚠️ SEND-ONLY email → `sendOnly: true` keeps it OUT of
|
|
882
|
+
// From-Conversation (comms conversation sources need readable threads; Resend
|
|
883
|
+
// has none) while still being a linkable comms tool the agent uses via MCP.
|
|
884
|
+
enabled: true,
|
|
885
|
+
sendOnly: true,
|
|
886
|
+
auth: {
|
|
887
|
+
kind: "api_key",
|
|
888
|
+
fields: [
|
|
889
|
+
{
|
|
890
|
+
key: "accessToken",
|
|
891
|
+
label: "API Key",
|
|
892
|
+
placeholder: "re_xxxxxxxxxxxxxxxx",
|
|
893
|
+
secret: true,
|
|
894
|
+
help: 'Create in Resend \u2192 API Keys (https://resend.com/api-keys). "Sending access" is enough.'
|
|
895
|
+
}
|
|
896
|
+
]
|
|
897
|
+
},
|
|
898
|
+
delivery: {
|
|
899
|
+
mcp: {
|
|
900
|
+
// The OFFICIAL resend-mcp (Node) in BYO-token mode: the API key is fed
|
|
901
|
+
// via RESEND_API_KEY (env only, never argv). Version PINNED; bump only
|
|
902
|
+
// after re-verifying headless. Tools: send email + contacts/broadcasts/
|
|
903
|
+
// domains.
|
|
904
|
+
command: "npx",
|
|
905
|
+
args: ["-y", "resend-mcp@2.6.1"],
|
|
906
|
+
envMapping: {
|
|
907
|
+
RESEND_API_KEY: "accessToken"
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
},
|
|
912
|
+
posthog: {
|
|
913
|
+
id: "posthog",
|
|
914
|
+
name: "PostHog",
|
|
915
|
+
icon: "posthog",
|
|
916
|
+
category: "observability",
|
|
917
|
+
// LIVE — api_key: the user pastes a PostHog Personal API Key (phx_…, created
|
|
918
|
+
// with the "MCP Server" preset). PostHog's MCP is HOSTED-ONLY
|
|
919
|
+
// (mcp.posthog.com) over HTTP, and its stdio bridge (mcp-remote) forces its
|
|
920
|
+
// own browser OAuth — incompatible with our headless broker. So delivery
|
|
921
|
+
// uses the shim's HTTP transport: it relays to the hosted MCP with the key
|
|
922
|
+
// as a Bearer header (exactly Cursor's {url, headers} config). No OAuth, no
|
|
923
|
+
// GSM secret; a backend VALIDATOR proves the key + vaults it.
|
|
924
|
+
enabled: true,
|
|
925
|
+
auth: {
|
|
926
|
+
kind: "api_key",
|
|
927
|
+
fields: [
|
|
928
|
+
{
|
|
929
|
+
key: "accessToken",
|
|
930
|
+
label: "Personal API Key",
|
|
931
|
+
placeholder: "phx_xxxxxxxxxxxxxxxx",
|
|
932
|
+
secret: true,
|
|
933
|
+
help: 'PostHog \u2192 Settings \u2192 Personal API keys \u2192 create with the "MCP Server" preset (scopes it to a project).'
|
|
934
|
+
}
|
|
935
|
+
]
|
|
936
|
+
},
|
|
937
|
+
delivery: {
|
|
938
|
+
mcp: {
|
|
939
|
+
// HTTP transport (not a spawned stdio server) — the shim relays to
|
|
940
|
+
// PostHog's hosted MCP with the key as a Bearer header. The key stays
|
|
941
|
+
// server-side of the shim, never on argv.
|
|
942
|
+
command: "",
|
|
943
|
+
args: [],
|
|
944
|
+
envMapping: {},
|
|
945
|
+
httpUrl: "https://mcp.posthog.com/mcp",
|
|
946
|
+
httpHeaders: { Authorization: "Bearer {accessToken}" }
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
},
|
|
873
950
|
notion: {
|
|
874
951
|
id: "notion",
|
|
875
952
|
name: "Notion",
|
|
@@ -1274,11 +1351,9 @@ var INTEGRATION_BRANDING = {
|
|
|
1274
1351
|
};
|
|
1275
1352
|
var UPCOMING_INTEGRATION_IDS = [
|
|
1276
1353
|
"gmail",
|
|
1277
|
-
"posthog",
|
|
1278
1354
|
"clickup",
|
|
1279
1355
|
"figma",
|
|
1280
1356
|
"trello",
|
|
1281
|
-
"resend",
|
|
1282
1357
|
"vercel",
|
|
1283
1358
|
"supabase",
|
|
1284
1359
|
"asana",
|