MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / planIntegrationRow

Function planIntegrationRow

packages/core/sdk/src/migration-spec.ts:846–865  ·  view source on GitHub ↗
(input: {
  readonly scopeId: string;
  readonly sourceId: string;
  readonly pluginId: string;
  readonly description: string;
  readonly config: unknown;
  readonly ownerForScope?: ScopeOwnerResolver;
})

Source from the content-addressed store, hash-verified

844 * sources are org-owned, but we derive owner from the scope generically (a local
845 * user-scoped source maps to owner=user). */
846export const planIntegrationRow = (input: {
847 readonly scopeId: string;
848 readonly sourceId: string;
849 readonly pluginId: string;
850 readonly description: string;
851 readonly config: unknown;
852 readonly ownerForScope?: ScopeOwnerResolver;
853}): PlannedIntegrationRow | null => {
854 const keys = (input.ownerForScope ?? parseScope)(input.scopeId);
855 if (!keys) return null; // fail loud upstream — never silently mis-own
856 return {
857 tenant: keys.tenant,
858 owner: keys.owner,
859 subject: keys.subject,
860 slug: input.sourceId,
861 plugin_id: input.pluginId,
862 description: input.description,
863 config: input.config,
864 };
865};
866
867export interface PlannedConnectionRow {
868 readonly tenant: string;

Callers 2

planMigrationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected