@codeam/shared 2.61.30 → 2.61.31

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' | 'github_issues';
354
+ type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat' | 'discord' | 'github_issues' | 'github';
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
- * The external connection a `derived` integration borrows its credential from.
365
- * Deliberately NOT an `IntegrationId` these connections are owned OUTSIDE the
366
- * toolkit registry (GitHub's OAuth belongs to the codespaces/VCS rail, which is
367
- * why `'github'` is not a linkable toolkit id).
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';
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
- * The external connection a `derived` integration borrows its credential from.
365
- * Deliberately NOT an `IntegrationId` these connections are owned OUTSIDE the
366
- * toolkit registry (GitHub's OAuth belongs to the codespaces/VCS rail, which is
367
- * why `'github'` is not a linkable toolkit id).
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,30 @@ 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
+ },
675
699
  github_issues: {
676
700
  id: "github_issues",
677
701
  name: "GitHub Issues",
@@ -932,10 +956,10 @@ function getIntegrationsByCategory(category) {
932
956
 
933
957
  // src/integrations/branding.ts
934
958
  var INTEGRATION_BRANDING = {
935
- // GitHub — a brand-only entry (NOT an `IntegrationId`; v1 reuses the
936
- // codespaces OAuth token rather than exposing GitHub as a linkable toolkit).
937
- // Present so the PR/MR Command Center surfaces (the review-launch toast, etc.)
938
- // render the official GitHub mark from the ONE shared catalog.
959
+ // GitHub — now a REAL `IntegrationId` (`version_control`, `kind: 'connection'`).
960
+ // It started life here as a brand-only entry, back when GitHub was rendered by
961
+ // a hand-written special-case row; the mark is unchanged, it's just also the
962
+ // catalog row's logo now. Still used by the PR/MR Command Center surfaces.
939
963
  github: {
940
964
  id: "github",
941
965
  name: "GitHub",