MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / seedDevMemberProfiles

Function seedDevMemberProfiles

server/src/dev-setup.ts:78–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76}
77
78async function seedDevMemberProfiles(): Promise<void> {
79 const pool = getPool();
80 const profiles = [
81 {
82 orgId: 'org_dev_company_001',
83 displayName: 'Dev Company',
84 slug: 'dev-company',
85 tagline: 'Dev company for testing member features',
86 description: 'A company account for testing agents, publishers, and member dashboard features.',
87 offerings: '{buyer_agent,sales_agent}',
88 agents: JSON.stringify([{ url: 'https://test-agent.adcontextprotocol.org', name: 'Training Agent', type: 'buying', visibility: 'public' }]),
89 isPublic: true,
90 },
91 {
92 orgId: 'org_dev_personal_001',
93 displayName: 'Personal Account',
94 slug: 'dev-personal',
95 tagline: 'Dev personal account for testing',
96 description: 'A personal account for testing portrait generation and offerings.',
97 offerings: '{consulting}',
98 agents: JSON.stringify([]),
99 isPublic: true,
100 },
101 {
102 orgId: 'org_dev_builder_001',
103 displayName: 'Acme Ad Tech',
104 slug: 'acme-ad-tech',
105 tagline: 'Agentic media buying for mid-market brands',
106 description: 'Acme builds buyer and seller agents for programmatic advertising. Builder-tier member with active team and compliance monitoring.',
107 offerings: '{buyer_agent,seller_agent,consulting}',
108 agents: JSON.stringify([
109 { url: 'https://buyer.acme-adtech.dev', name: 'Acme Buyer Agent', type: 'buyer', visibility: 'public' },
110 { url: 'https://seller.acme-adtech.dev', name: 'Acme Seller Agent', type: 'seller', visibility: 'public' },
111 ]),
112 isPublic: true,
113 },
114 ];
115
116 for (const p of profiles) {
117 try {
118 await pool.query(
119 `INSERT INTO member_profiles (
120 workos_organization_id, display_name, slug, tagline, description,
121 offerings, agents, is_public
122 ) VALUES ($1, $2, $3, $4, $5, $6::text[], $7::jsonb, $8)
123 ON CONFLICT (workos_organization_id) DO UPDATE SET
124 display_name = EXCLUDED.display_name,
125 tagline = EXCLUDED.tagline,
126 description = EXCLUDED.description,
127 offerings = EXCLUDED.offerings,
128 agents = EXCLUDED.agents,
129 is_public = EXCLUDED.is_public`,
130 [p.orgId, p.displayName, p.slug, p.tagline, p.description, p.offerings, p.agents, p.isPublic],
131 );
132 logger.info({ orgId: p.orgId }, 'Seeded dev member profile');
133 } catch (error) {
134 logger.error({ err: error, orgId: p.orgId }, 'Failed to seed dev member profile');
135 }

Callers 1

seedDevDataFunction · 0.85

Calls 2

getPoolFunction · 0.85
queryMethod · 0.80

Tested by

no test coverage detected