@codeam/shared 2.61.30 → 2.61.32
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 +22 -7
- package/dist/index.d.ts +22 -7
- package/dist/index.js +70 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +70 -4
- 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';
|
|
354
|
+
type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat' | 'discord' | '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
|
|
@@ -359,18 +359,28 @@ type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_
|
|
|
359
359
|
* there is exactly one source of truth. Such an integration is "linked" iff its
|
|
360
360
|
* source connection exists, and has no Connect/Disconnect action of its own.
|
|
361
361
|
*/
|
|
362
|
-
type IntegrationAuthKind = 'oauth_redirect' | 'oauth_device' | 'api_key' | 'derived';
|
|
363
362
|
/**
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
*
|
|
363
|
+
* `connection` = the integration IS a standing connection whose credential lives
|
|
364
|
+
* in a `ProviderToken` row rather than the integrations vault, and whose
|
|
365
|
+
* connect/disconnect flow is owned by ANOTHER module (GitHub's OAuth belongs to
|
|
366
|
+
* the codespaces rail). It renders and acts like any other connector — the only
|
|
367
|
+
* difference is which code performs the link.
|
|
368
|
+
*
|
|
369
|
+
* Contrast `derived`, which BORROWS such a connection and owns no actions at
|
|
370
|
+
* all. Both resolve their credential from the same place; only `derived` has no
|
|
371
|
+
* link flow of its own.
|
|
372
|
+
*/
|
|
373
|
+
type IntegrationAuthKind = 'oauth_redirect' | 'oauth_device' | 'api_key' | 'derived' | 'connection';
|
|
374
|
+
/**
|
|
375
|
+
* A standing connection whose credential lives in a `ProviderToken` row — either
|
|
376
|
+
* because the integration IS that connection (`kind: 'connection'`) or because
|
|
377
|
+
* it borrows it (`kind: 'derived'`). Its own id doubles as the source name.
|
|
368
378
|
*/
|
|
369
379
|
type DerivedCredentialSource = 'github';
|
|
370
380
|
/** Grouping used by category-driven surfaces (Start-from-Work-Item picker,
|
|
371
381
|
* catalog sections). A future tracker integration joins those features with
|
|
372
382
|
* ZERO feature code — they resolve sources from the registry by category. */
|
|
373
|
-
type IntegrationCategory = 'tracker' | 'design' | 'comms' | 'docs' | 'observability';
|
|
383
|
+
type IntegrationCategory = 'version_control' | 'tracker' | 'design' | 'comms' | 'docs' | 'observability';
|
|
374
384
|
/**
|
|
375
385
|
* One user-entered field for an `api_key` integration (no browser OAuth — the
|
|
376
386
|
* user pastes credentials directly, e.g. a PAT + an org URL). The mobile form
|
|
@@ -420,6 +430,11 @@ interface IntegrationDefinition {
|
|
|
420
430
|
* Drives both the backend's credential resolution and the client's
|
|
421
431
|
* "no connect action, managed by <source>" rendering. */
|
|
422
432
|
derivedFrom?: DerivedCredentialSource;
|
|
433
|
+
/** For `kind: 'connection'` — the connection this integration IS. Same
|
|
434
|
+
* credential lookup as `derivedFrom`, but this one owns its link flow
|
|
435
|
+
* (performed by the module that owns the connection, not by the generic
|
|
436
|
+
* integrations OAuth path). */
|
|
437
|
+
connection?: DerivedCredentialSource;
|
|
423
438
|
};
|
|
424
439
|
delivery: IntegrationDelivery;
|
|
425
440
|
}
|
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';
|
|
354
|
+
type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat' | 'discord' | '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
|
|
@@ -359,18 +359,28 @@ type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_
|
|
|
359
359
|
* there is exactly one source of truth. Such an integration is "linked" iff its
|
|
360
360
|
* source connection exists, and has no Connect/Disconnect action of its own.
|
|
361
361
|
*/
|
|
362
|
-
type IntegrationAuthKind = 'oauth_redirect' | 'oauth_device' | 'api_key' | 'derived';
|
|
363
362
|
/**
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
*
|
|
363
|
+
* `connection` = the integration IS a standing connection whose credential lives
|
|
364
|
+
* in a `ProviderToken` row rather than the integrations vault, and whose
|
|
365
|
+
* connect/disconnect flow is owned by ANOTHER module (GitHub's OAuth belongs to
|
|
366
|
+
* the codespaces rail). It renders and acts like any other connector — the only
|
|
367
|
+
* difference is which code performs the link.
|
|
368
|
+
*
|
|
369
|
+
* Contrast `derived`, which BORROWS such a connection and owns no actions at
|
|
370
|
+
* all. Both resolve their credential from the same place; only `derived` has no
|
|
371
|
+
* link flow of its own.
|
|
372
|
+
*/
|
|
373
|
+
type IntegrationAuthKind = 'oauth_redirect' | 'oauth_device' | 'api_key' | 'derived' | 'connection';
|
|
374
|
+
/**
|
|
375
|
+
* A standing connection whose credential lives in a `ProviderToken` row — either
|
|
376
|
+
* because the integration IS that connection (`kind: 'connection'`) or because
|
|
377
|
+
* it borrows it (`kind: 'derived'`). Its own id doubles as the source name.
|
|
368
378
|
*/
|
|
369
379
|
type DerivedCredentialSource = 'github';
|
|
370
380
|
/** Grouping used by category-driven surfaces (Start-from-Work-Item picker,
|
|
371
381
|
* catalog sections). A future tracker integration joins those features with
|
|
372
382
|
* ZERO feature code — they resolve sources from the registry by category. */
|
|
373
|
-
type IntegrationCategory = 'tracker' | 'design' | 'comms' | 'docs' | 'observability';
|
|
383
|
+
type IntegrationCategory = 'version_control' | 'tracker' | 'design' | 'comms' | 'docs' | 'observability';
|
|
374
384
|
/**
|
|
375
385
|
* One user-entered field for an `api_key` integration (no browser OAuth — the
|
|
376
386
|
* user pastes credentials directly, e.g. a PAT + an org URL). The mobile form
|
|
@@ -420,6 +430,11 @@ interface IntegrationDefinition {
|
|
|
420
430
|
* Drives both the backend's credential resolution and the client's
|
|
421
431
|
* "no connect action, managed by <source>" rendering. */
|
|
422
432
|
derivedFrom?: DerivedCredentialSource;
|
|
433
|
+
/** For `kind: 'connection'` — the connection this integration IS. Same
|
|
434
|
+
* credential lookup as `derivedFrom`, but this one owns its link flow
|
|
435
|
+
* (performed by the module that owns the connection, not by the generic
|
|
436
|
+
* integrations OAuth path). */
|
|
437
|
+
connection?: DerivedCredentialSource;
|
|
423
438
|
};
|
|
424
439
|
delivery: IntegrationDelivery;
|
|
425
440
|
}
|
package/dist/index.js
CHANGED
|
@@ -672,6 +672,60 @@ var INTEGRATION_REGISTRY = {
|
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
674
|
},
|
|
675
|
+
github: {
|
|
676
|
+
id: "github",
|
|
677
|
+
name: "GitHub",
|
|
678
|
+
icon: "github",
|
|
679
|
+
category: "version_control",
|
|
680
|
+
// LIVE. GitHub is the product's code substrate (codespaces + the PR
|
|
681
|
+
// Command Center), and it was historically the ONE connection outside this
|
|
682
|
+
// registry: its credential lives in a `ProviderToken` row rather than the
|
|
683
|
+
// integrations vault, so it was rendered by a hand-written special-case row
|
|
684
|
+
// and could not legally appear in a deploy's `integrationIds` (the manifest
|
|
685
|
+
// resolver rejects unknown ids — a recurring bug class).
|
|
686
|
+
//
|
|
687
|
+
// `kind: 'connection'` closes that gap without re-plumbing OAuth: the entry
|
|
688
|
+
// makes GitHub a first-class, categorised catalog row whose credential the
|
|
689
|
+
// backend resolves from the SAME `ProviderToken` it always used, while the
|
|
690
|
+
// connect/disconnect flow stays owned by the codespaces rail (the clients
|
|
691
|
+
// route those two actions there). ⚠️ It is a REAL connection with a REAL
|
|
692
|
+
// disconnect — do NOT treat it like `github_issues`, which merely derives
|
|
693
|
+
// from it and has no actions of its own.
|
|
694
|
+
enabled: true,
|
|
695
|
+
auth: { kind: "connection", connection: "github" },
|
|
696
|
+
// No MCP: a deployed box already has an authenticated `gh` on PATH.
|
|
697
|
+
delivery: {}
|
|
698
|
+
},
|
|
699
|
+
gitlab: {
|
|
700
|
+
id: "gitlab",
|
|
701
|
+
name: "GitLab",
|
|
702
|
+
icon: "gitlab",
|
|
703
|
+
category: "version_control",
|
|
704
|
+
// LIVE — a user-owned gitlab.com application (Confidential) with BOTH env
|
|
705
|
+
// callbacks registered, so dev/prod share the client and differ only in
|
|
706
|
+
// GITLAB_OAUTH_REDIRECT_URI. The backend GitLabOAuthProvider is
|
|
707
|
+
// config-gated (503 if env unset), so this is safe mid-rollout.
|
|
708
|
+
//
|
|
709
|
+
// ⚠️ Unlike `github`, this is a NORMAL `oauth_redirect` integration: its
|
|
710
|
+
// credential is vaulted here rather than living in a ProviderToken, because
|
|
711
|
+
// nothing else in the product owns a GitLab connection (GitHub's lives on
|
|
712
|
+
// the codespaces rail, which is why it's `kind: 'connection'`).
|
|
713
|
+
enabled: true,
|
|
714
|
+
auth: {
|
|
715
|
+
kind: "oauth_redirect",
|
|
716
|
+
// GitLab has NO per-resource scopes — `api` is the only one that grants
|
|
717
|
+
// merge-request WRITE (comment / approve / merge / close), so a
|
|
718
|
+
// read-only alternative would make the whole MR surface useless.
|
|
719
|
+
// `write_repository` is the git-over-HTTPS rail for the agent's push;
|
|
720
|
+
// `api` already covers it for user tokens, but it costs nothing on a
|
|
721
|
+
// consent screen that already says "complete read/write access" and
|
|
722
|
+
// changing scopes later forces EVERY user to re-authorize.
|
|
723
|
+
scopes: ["api", "write_repository"]
|
|
724
|
+
},
|
|
725
|
+
// No MCP: the box's `git` is authenticated for push, and the MR surface is
|
|
726
|
+
// served backend-side by the VCS provider — same shape as `github`.
|
|
727
|
+
delivery: {}
|
|
728
|
+
},
|
|
675
729
|
github_issues: {
|
|
676
730
|
id: "github_issues",
|
|
677
731
|
name: "GitHub Issues",
|
|
@@ -932,10 +986,22 @@ function getIntegrationsByCategory(category) {
|
|
|
932
986
|
|
|
933
987
|
// src/integrations/branding.ts
|
|
934
988
|
var INTEGRATION_BRANDING = {
|
|
935
|
-
//
|
|
936
|
-
//
|
|
937
|
-
//
|
|
938
|
-
//
|
|
989
|
+
// GitLab — the official multicolour Tanuki (from GitLab's own header markup),
|
|
990
|
+
// like jira/slack. Kept verbatim: the four paths are the shape + the two
|
|
991
|
+
// cheeks + the chin, and flattening them to one colour loses the mark.
|
|
992
|
+
// `aria-hidden`/`role`/`class` were stripped — the renderers own a11y.
|
|
993
|
+
gitlab: {
|
|
994
|
+
id: "gitlab",
|
|
995
|
+
name: "GitLab",
|
|
996
|
+
vendor: "GitLab",
|
|
997
|
+
tagline: "Merge requests, reviews & CI",
|
|
998
|
+
brandColor: "#FC6D26",
|
|
999
|
+
logoSvg: '<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m24.507 9.5-.034-.09L21.082.562a.896.896 0 0 0-1.694.091l-2.29 7.01H7.825L5.535.653a.898.898 0 0 0-1.694-.09L.451 9.411.416 9.5a6.297 6.297 0 0 0 2.09 7.278l.012.01.03.022 5.16 3.867 2.56 1.935 1.554 1.176a1.051 1.051 0 0 0 1.268 0l1.555-1.176 2.56-1.935 5.197-3.89.014-.01A6.297 6.297 0 0 0 24.507 9.5Z" fill="#E24329"/><path d="m24.507 9.5-.034-.09a11.44 11.44 0 0 0-4.56 2.051l-7.447 5.632 4.742 3.584 5.197-3.89.014-.01A6.297 6.297 0 0 0 24.507 9.5Z" fill="#FC6D26"/><path d="m7.707 20.677 2.56 1.935 1.555 1.176a1.051 1.051 0 0 0 1.268 0l1.555-1.176 2.56-1.935-4.743-3.584-4.755 3.584Z" fill="#FCA326"/><path d="M5.01 11.461a11.43 11.43 0 0 0-4.56-2.05L.416 9.5a6.297 6.297 0 0 0 2.09 7.278l.012.01.03.022 5.16 3.867 4.745-3.584-7.444-5.632Z" fill="#FC6D26"/></svg>'
|
|
1000
|
+
},
|
|
1001
|
+
// GitHub — now a REAL `IntegrationId` (`version_control`, `kind: 'connection'`).
|
|
1002
|
+
// It started life here as a brand-only entry, back when GitHub was rendered by
|
|
1003
|
+
// a hand-written special-case row; the mark is unchanged, it's just also the
|
|
1004
|
+
// catalog row's logo now. Still used by the PR/MR Command Center surfaces.
|
|
939
1005
|
github: {
|
|
940
1006
|
id: "github",
|
|
941
1007
|
name: "GitHub",
|