@pagelines/sdk 1.0.218 → 1.0.219
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/{AgentProvider.vue_vue_type_script_setup_true_lang-J2dPA8gh.js → AgentProvider.vue_vue_type_script_setup_true_lang-CsNF0TwT.js} +2 -2
- package/dist/AgentProvider.vue_vue_type_script_setup_true_lang-CsNF0TwT.js.map +1 -0
- package/dist/AgentWidgetInline-DG-ZuBMI.js +33 -0
- package/dist/AgentWidgetInline-DG-ZuBMI.js.map +1 -0
- package/dist/AgentWidgetModal-D-7lR3Yy.js +65 -0
- package/dist/AgentWidgetModal-D-7lR3Yy.js.map +1 -0
- package/dist/AgentWidgetPopup-C7vent2i.js +119 -0
- package/dist/AgentWidgetPopup-C7vent2i.js.map +1 -0
- package/dist/{AgentWrap.vue_vue_type_script_setup_true_lang-Cc3E_MFR.js → AgentWrap.vue_vue_type_script_setup_true_lang-TeMIjtid.js} +2102 -2664
- package/dist/AgentWrap.vue_vue_type_script_setup_true_lang-TeMIjtid.js.map +1 -0
- package/dist/agent/AgentController.d.ts +12 -43
- package/dist/agent/index.d.ts +1 -4
- package/dist/agent/schema.d.ts +2 -15
- package/dist/agent/ui/AgentChat.vue.d.ts +2 -2
- package/dist/agent/ui/AgentModal.vue.d.ts +2 -2
- package/dist/agent/ui/AgentProvider.vue.d.ts +3 -3
- package/dist/agent/ui/AgentWrap.vue.d.ts +21 -97
- package/dist/agent/ui/ElAgentAbout.vue.d.ts +1 -1
- package/dist/agent/ui/ElAgentChat.vue.d.ts +3 -3
- package/dist/agent/ui/ElAgentHeader.vue.d.ts +1 -1
- package/dist/agent/ui/ElAgentModeSidebar.vue.d.ts +2 -2
- package/dist/agent/ui/ElModeHeader.vue.d.ts +1 -1
- package/dist/agent/ui/ElSidebar.vue.d.ts +1 -1
- package/dist/agent/utils.d.ts +4 -3
- package/dist/agent.js +46 -57
- package/dist/agent.js.map +1 -1
- package/dist/clients/AuthClient.d.ts +1 -1
- package/dist/clients/UserClient.d.ts +3 -3
- package/dist/clients/types.d.ts +2 -3
- package/dist/constants/socialPlatforms.d.ts +1 -1
- package/dist/demo/index.d.ts +37 -37
- package/dist/demo.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/sdk.css +1 -1
- package/dist/sdk.js +2 -2
- package/dist/sdkClient-IfuVpXGX.js +637 -0
- package/dist/sdkClient-IfuVpXGX.js.map +1 -0
- package/dist/sdkClient.d.ts +24 -25
- package/dist/sdkStorage.d.ts +1 -1
- package/dist/socialPlatforms-Ck-b3SnQ.js.map +1 -1
- package/dist/useWidgetState-BGtx6NKD.js +15 -0
- package/dist/useWidgetState-BGtx6NKD.js.map +1 -0
- package/dist/widget/PLWidget.d.ts +3 -3
- package/dist/widget/composables/usePLWidget.d.ts +2 -2
- package/dist/widget/composables/useWidgetState.d.ts +277 -0
- package/dist/widget/ui/AgentWidgetInline.vue.d.ts +5 -6
- package/dist/widget/ui/AgentWidgetModal.vue.d.ts +4 -5
- package/dist/widget/ui/AgentWidgetPopup.vue.d.ts +4 -5
- package/dist/widget.js +12 -11
- package/dist/widget.js.map +1 -1
- package/package.json +2 -2
- package/dist/AgentProvider.vue_vue_type_script_setup_true_lang-J2dPA8gh.js.map +0 -1
- package/dist/AgentWidgetInline-a7B42aCD.js +0 -37
- package/dist/AgentWidgetInline-a7B42aCD.js.map +0 -1
- package/dist/AgentWidgetModal-DmiBPAeW.js +0 -68
- package/dist/AgentWidgetModal-DmiBPAeW.js.map +0 -1
- package/dist/AgentWidgetPopup-kDs-plgY.js +0 -122
- package/dist/AgentWidgetPopup-kDs-plgY.js.map +0 -1
- package/dist/AgentWrap.vue_vue_type_script_setup_true_lang-Cc3E_MFR.js.map +0 -1
- package/dist/agent/ClientAudio.d.ts +0 -102
- package/dist/agent/constants.d.ts +0 -16
- package/dist/sdkClient-B3EKDRYb.js +0 -1094
- package/dist/sdkClient-B3EKDRYb.js.map +0 -1
- package/dist/utils/base.d.ts +0 -14
- package/dist/utils/color.d.ts +0 -12
- package/dist/utils/cookies.d.ts +0 -47
- package/dist/utils/id.d.ts +0 -27
- package/dist/utils/logger.d.ts +0 -49
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AgentConfig } from '@pagelines/core';
|
|
2
2
|
import { SDKContext } from './types';
|
|
3
3
|
export declare class UserClient {
|
|
4
4
|
private ctx;
|
|
5
5
|
constructor(ctx: SDKContext);
|
|
6
6
|
getPublicAgent(args: {
|
|
7
7
|
handle: string;
|
|
8
|
-
}): Promise<
|
|
8
|
+
}): Promise<AgentConfig | undefined>;
|
|
9
9
|
getAgentByEmail(args: {
|
|
10
10
|
email: string;
|
|
11
|
-
}): Promise<
|
|
11
|
+
}): Promise<AgentConfig | undefined>;
|
|
12
12
|
generateAnonId(): string;
|
|
13
13
|
track(args: {
|
|
14
14
|
event: 'view_profile' | 'profile_interaction';
|
package/dist/clients/types.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { hc } from 'hono/client';
|
|
2
2
|
import { SDKAppType } from '@/modules/main/server';
|
|
3
|
-
import {
|
|
3
|
+
import { AgentConfig, ApiResponse, EnrichedUser, LogHelper } from '@pagelines/core';
|
|
4
4
|
import { ComputedRef, Ref } from 'vue';
|
|
5
5
|
import { SDKStorage } from '../sdkStorage';
|
|
6
|
-
import { LogHelper } from '../utils/logger';
|
|
7
6
|
export interface SDKContext {
|
|
8
7
|
api: ReturnType<typeof hc<SDKAppType>> extends {
|
|
9
8
|
api: infer A;
|
|
@@ -14,7 +13,7 @@ export interface SDKContext {
|
|
|
14
13
|
token: Ref<string | null>;
|
|
15
14
|
loading: Ref<boolean>;
|
|
16
15
|
error: Ref<string | null>;
|
|
17
|
-
currentAgent: ComputedRef<
|
|
16
|
+
currentAgent: ComputedRef<AgentConfig | undefined>;
|
|
18
17
|
storage: SDKStorage;
|
|
19
18
|
sessionId: string;
|
|
20
19
|
logger: LogHelper;
|
package/dist/demo/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { PageLinesSDK } from '../sdkClient';
|
|
2
|
-
import {
|
|
3
|
-
export type {
|
|
2
|
+
import { AgentConfig } from '@pagelines/core';
|
|
3
|
+
export type { AgentConfig } from '@pagelines/core';
|
|
4
4
|
export type { DemoAgentEntry } from '@/modules/agent/static/data';
|
|
5
5
|
export { getStaticAgentByHandle } from '@/modules/agent/static';
|
|
6
6
|
/**
|
|
7
7
|
* Get demo agents - mix of static data and DB-fetched entries
|
|
8
8
|
* @param sdk - PageLinesSDK instance for fetching handle-only entries
|
|
9
|
-
* @returns Promise<Partial<
|
|
9
|
+
* @returns Promise<Partial<AgentConfig>[]> - Array of demo agents (static + fetched)
|
|
10
10
|
*
|
|
11
11
|
* Handle-only entries (e.g., { handle: 'dan' }) are fetched in parallel via sdk.getPublicAgent()
|
|
12
12
|
* Failed fetches are skipped silently with optional logging
|
|
13
13
|
*/
|
|
14
|
-
export declare function getDemoAgents(sdk: PageLinesSDK): Promise<Partial<
|
|
14
|
+
export declare function getDemoAgents(sdk: PageLinesSDK): Promise<Partial<AgentConfig>[]>;
|
|
15
15
|
export declare function getDemoAgentByHandle(handle: string): Partial<{
|
|
16
16
|
agentId?: string | undefined;
|
|
17
17
|
handle?: string | undefined;
|
|
@@ -23,37 +23,6 @@ export declare function getDemoAgentByHandle(handle: string): Partial<{
|
|
|
23
23
|
entityType?: string | undefined;
|
|
24
24
|
avatarId?: string | null | undefined;
|
|
25
25
|
coverId?: string | null | undefined;
|
|
26
|
-
email?: string | null | undefined;
|
|
27
|
-
website?: string | null | undefined;
|
|
28
|
-
accounts?: {
|
|
29
|
-
platform: "x" | "email" | "website" | "linkedin" | "facebook" | "tiktok" | "youtube" | "github" | "instagram" | "threads" | "phone";
|
|
30
|
-
handle: string;
|
|
31
|
-
}[] | null | undefined;
|
|
32
|
-
model?: string | null | undefined;
|
|
33
|
-
channel?: string | null | undefined;
|
|
34
|
-
lastActivityAt?: string | null | undefined;
|
|
35
|
-
instanceId?: string | null | undefined;
|
|
36
|
-
instanceProvider?: string | null | undefined;
|
|
37
|
-
imageVersion?: string | null | undefined;
|
|
38
|
-
deployEnv?: string | undefined;
|
|
39
|
-
botServerUrl?: string | null | undefined;
|
|
40
|
-
botHeartbeatAt?: string | null | undefined;
|
|
41
|
-
desiredStatus?: "active" | "stopped" | null | undefined;
|
|
42
|
-
onboardedAt?: string | null | undefined;
|
|
43
|
-
enrichment?: Record<string, any> | null | undefined;
|
|
44
|
-
onboarding?: Record<string, any> | null | undefined;
|
|
45
|
-
org?: {
|
|
46
|
-
orgId: string;
|
|
47
|
-
handle: string;
|
|
48
|
-
name: string;
|
|
49
|
-
status: string;
|
|
50
|
-
headline?: string | undefined;
|
|
51
|
-
summary?: string | undefined;
|
|
52
|
-
} | undefined;
|
|
53
|
-
visibility?: "org" | "private" | "public" | undefined;
|
|
54
|
-
status?: string | undefined;
|
|
55
|
-
createdAt?: string | undefined;
|
|
56
|
-
updatedAt?: string | undefined;
|
|
57
26
|
avatar?: {
|
|
58
27
|
mediaId?: string | undefined;
|
|
59
28
|
userId?: string | undefined;
|
|
@@ -66,7 +35,7 @@ export declare function getDemoAgentByHandle(handle: string): Partial<{
|
|
|
66
35
|
alt?: string | undefined;
|
|
67
36
|
context?: "avatar" | "cover" | "general" | undefined;
|
|
68
37
|
status?: "processing" | "active" | "failed" | "deleted" | undefined;
|
|
69
|
-
quality?: "
|
|
38
|
+
quality?: "low" | "standard" | "high" | undefined;
|
|
70
39
|
createdAt?: string | undefined;
|
|
71
40
|
updatedAt?: string | undefined;
|
|
72
41
|
mediaType?: "image" | "video" | "audio" | undefined;
|
|
@@ -88,7 +57,7 @@ export declare function getDemoAgentByHandle(handle: string): Partial<{
|
|
|
88
57
|
alt?: string | undefined;
|
|
89
58
|
context?: "avatar" | "cover" | "general" | undefined;
|
|
90
59
|
status?: "processing" | "active" | "failed" | "deleted" | undefined;
|
|
91
|
-
quality?: "
|
|
60
|
+
quality?: "low" | "standard" | "high" | undefined;
|
|
92
61
|
createdAt?: string | undefined;
|
|
93
62
|
updatedAt?: string | undefined;
|
|
94
63
|
mediaType?: "image" | "video" | "audio" | undefined;
|
|
@@ -98,6 +67,37 @@ export declare function getDemoAgentByHandle(handle: string): Partial<{
|
|
|
98
67
|
duration?: number | undefined;
|
|
99
68
|
blurhash?: string | undefined;
|
|
100
69
|
} | undefined;
|
|
70
|
+
email?: string | null | undefined;
|
|
71
|
+
website?: string | null | undefined;
|
|
72
|
+
accounts?: {
|
|
73
|
+
platform: "x" | "linkedin" | "facebook" | "tiktok" | "youtube" | "github" | "instagram" | "threads" | "email" | "phone" | "website";
|
|
74
|
+
handle: string;
|
|
75
|
+
}[] | null | undefined;
|
|
76
|
+
model?: string | null | undefined;
|
|
77
|
+
channel?: string | null | undefined;
|
|
78
|
+
lastActivityAt?: string | null | undefined;
|
|
79
|
+
instanceId?: string | null | undefined;
|
|
80
|
+
instanceProvider?: string | null | undefined;
|
|
81
|
+
imageVersion?: string | null | undefined;
|
|
82
|
+
deployEnv?: string | undefined;
|
|
83
|
+
botServerUrl?: string | null | undefined;
|
|
84
|
+
botHeartbeatAt?: string | null | undefined;
|
|
85
|
+
desiredStatus?: "active" | "stopped" | null | undefined;
|
|
86
|
+
onboardedAt?: string | null | undefined;
|
|
87
|
+
enrichment?: Record<string, any> | null | undefined;
|
|
88
|
+
onboarding?: Record<string, any> | null | undefined;
|
|
89
|
+
org?: {
|
|
90
|
+
orgId: string;
|
|
91
|
+
handle: string;
|
|
92
|
+
name: string;
|
|
93
|
+
status: string;
|
|
94
|
+
headline?: string | undefined;
|
|
95
|
+
summary?: string | undefined;
|
|
96
|
+
} | undefined;
|
|
97
|
+
visibility?: "org" | "private" | "public" | undefined;
|
|
98
|
+
status?: string | undefined;
|
|
99
|
+
createdAt?: string | undefined;
|
|
100
|
+
updatedAt?: string | undefined;
|
|
101
101
|
isPrimary?: boolean | undefined;
|
|
102
102
|
}> | undefined;
|
|
103
103
|
export { staticAgents } from '@/modules/agent/static/data';
|
package/dist/demo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"demo.js","sources":["../../../src/modules/agent/static/data.ts","../../../src/modules/agent/static/index.ts","../demo/index.ts"],"sourcesContent":["import type { Agent } from '../schema'\n\n/**\n * Demo agent entry - supports both static full/partial data AND handle-only entries\n * Handle-only entries (e.g., { handle: 'dan' }) will be fetched from DB via SDK\n */\nexport type DemoAgentEntry = Partial<Agent> | { handle: string }\n\n/**\n * Static demo agents - mix of full data and handle-only entries\n * Full entries: Used as-is without DB fetch\n * Handle-only entries: Fetched from DB via getDemoAgents(sdk)\n * Images hosted on S3 at https://media.pagelines.com/_assets/avatars/\n */\nexport const staticAgents: DemoAgentEntry[] = [\n {\n agentId: '2101k200aj',\n handle: 'andrew',\n name: 'Andrew Powers',\n title: 'Co-Founder and CEO of PageLines',\n summary: '<p>Engineer turned entrepreneur with 15 years of success in digital platforms across the web, data, and AI.</p>',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-andrew.webp' },\n entityType: 'person',\n },\n {\n agentId: '5501k2nk0m',\n handle: 'morgan',\n name: 'Morgan Jones',\n title: 'Co-Founder and COO of PageLines',\n summary: `<p>Born in Vancouver, raised on rugby pitches, and refined through ventures across Asia, Europe, and beyond. After eight years in the UK and adventures in 30+ countries, I landed in Dana Point, California, where my wife and I are raising two kids between surf sessions and soccer games.</p>\n<p>I've built revenue engines for startups, turned around struggling companies, and helped founders go from zero to one, one to many. My approach is simple: authentic relationships beat aggressive tactics, great teams create great results, and if you're not having fun building something meaningful, you're doing it wrong.</p>\n<p>These days, I'm the COO at PageLines, where we're proving you can build a unicorn while maintaining work-life balance. I believe the best business decisions happen on ski lifts, breakthrough strategies come from garden walks, and the most important meetings are the ones at home. Looking to connect with leaders who understand that success without fulfillment is the ultimate failure.</p>`,\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-morgan.webp' },\n entityType: 'person',\n },\n {\n agentId: '7601k2x0x4',\n handle: 'edgar',\n name: 'Edgar Cheverier',\n title: 'Senior Software Engineer at PageLines',\n summary: `<p>Full-stack developer who believes elegant code is like great design - it just works. Obsessed with React, TypeScript, and the entire modern web stack, I approach every project with Steve Jobs' philosophy: the intersection of technology and liberal arts creates magic.</p>\n<p>When I'm not architecting solutions with Next.js or optimizing PostgreSQL queries, you'll find me on a trail run or climbing route, where the best debugging happens. I read voraciously - from computer science classics to philosophy - because great developers are students first, coders second.</p>\n<p>Currently building products that would make users say \"wow\" while maintaining the clean, testable code that makes fellow developers smile. Looking to connect with teams who understand that perfectionism isn't about adding more, it's about knowing what to leave out.</p>`,\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-edgar.webp' },\n entityType: 'person',\n },\n {\n agentId: '8901k2y0j5',\n handle: 'joey',\n name: 'Joey Mireles',\n title: 'Photographer/Digital Creator',\n summary: `<p>Orange County-based photographer and digital creator who captures life's most authentic moments. Whether it's scaling the snowy peaks of Big Bear or exploring Budapest's charming ruin bars, Joey approaches every adventure with his camera in hand and boundless enthusiasm.</p>\n<p>Known for turning ordinary moments into extraordinary stories, Joey believes the best shots happen when you're least prepared for them. His work blends technical precision with spontaneous creativity, creating images that feel both professional and deeply personal.</p>\n<p>Currently bringing that same adventurous spirit to PageLines's visual storytelling, proving that great photography isn't just about perfect lighting—it's about capturing the magic that happens when people connect with something meaningful.</p>`,\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-joey.webp' },\n entityType: 'person',\n },\n {\n agentId: 'ken-eliasen',\n handle: 'ken',\n name: 'Ken Eliasen',\n title: 'SVP Operations at Edwards Lifesciences',\n summary: 'Experienced Senior Vice President of R&D and Operations with 13+ years at Edwards Lifesciences and demonstrated history in the medical device industry. <strong>Currently leading operations for a Fortune 500 medical device company</strong> with expertise in DMAIC, Design Control, Verification and Validation (V&V), and medical device development. Strong development & operations professional with proven track record of launching new products and scaling manufacturing operations.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-ken.webp' },\n entityType: 'person',\n },\n {\n agentId: 'josh-powers-rime',\n handle: 'josh',\n name: 'Josh Powers',\n title: 'Founder of Rime Roofing',\n summary: `<p>Extensive experience in outside sales management and leadership. I've managed very large sales teams in multiple locations in both residential and B2B.</p>\n<p><strong>Currently running my own company for over 3 years</strong> doing all the back end stuff myself. HR, Operations, Payroll, Lead generation, Problem solving, Negotiation... You name it, I have done it.</p>\n<p>At Rime, we elevate what it means to protect and enhance your property. Our specialty is lifetime roofing with integrated, custom ventilation - ensuring every structure we touch performs at its best for decades.</p>`,\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-josh.webp' },\n entityType: 'person',\n },\n {\n agentId: 'vidur_mehra_01',\n handle: 'vidur',\n name: 'Vidur Mehra',\n title: 'Product Strategist at PIMCO',\n summary: 'Senior VP and product strategist on the defined contribution team at PIMCO, focusing on target date funds and retirement income solutions. <strong>Currently helping shape the future</strong> of retirement planning from Newport Beach office.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-vidur.webp' },\n entityType: 'person',\n },\n {\n agentId: 'mary-czarnecki',\n handle: 'mary',\n name: 'Mary Czarnecki',\n title: 'Strategic Storytelling Consultant & Keynote Speaker',\n summary: `<p>Strategic storytelling consultant, keynote speaker, and workshop facilitator with over 20 years in marketing and strategy roles at Johnson & Johnson, WebMD, and Accenture. <strong>Currently helping Fortune 500 companies and growth-stage businesses</strong> cut through the noise with clear, compelling messages that inspire action.</p>\n<p>I sit at the intersection of strategy, communication, and applied storytelling frameworks, bringing both the science behind why stories work and practical tools teams can use immediately. When I'm not on stage or in workshops, you'll find me in Oregon's Willamette Valley with my restaurateur husband, our two sons, and serving on boards for Women in Wine Oregon and Taste Newberg.</p>`,\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-mary.webp' },\n entityType: 'person',\n },\n {\n agentId: 'dean-stoecker',\n handle: 'dean',\n name: 'Dean Stoecker',\n title: 'Former CEO of Alteryx',\n summary: `<p>Built Alteryx from startup to $5B public company over 23 years, pioneering analytics automation and democratizing data science. Took the company public in 2017 and scaled from 85M to 600M+ ARR before transitioning to focus on meaningful ventures.</p>\n<p><strong>Currently leading Ranch Productions while producing family-friendly films</strong> from Colorado, including a biographical project about his father's life. I believe in patient capital, community-driven growth, and using storytelling to inspire and elevate human potential while staying grounded in values that matter.</p>\n<p>Whether it's building analytics platforms or crafting stories that inspire, I approach every venture with the long-term perspective of Warren Buffett, the product perfectionism of Steve Jobs, and the down-to-earth authenticity of the Mountain West.</p>`,\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-dean.webp' },\n entityType: 'person',\n },\n {\n agentId: 's7c3a9f4',\n handle: 'demo_yuki',\n name: 'Yuki Nakamura',\n title: 'Professional Cosplay Artist',\n summary: 'Art school dropout turned TikTok sensation. <strong>Currently preparing for Comic-Con</strong> while building costume commissions business.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-yuki.webp' },\n entityType: 'person',\n },\n {\n agentId: 'a7f3b2c8',\n handle: 'demo_adam',\n name: 'Adam Dvoretsky',\n title: 'International Chess Master',\n summary: 'Former national champion who coached 3 players to grandmaster level. <strong>Currently teaching strategic thinking through chess</strong> between tournaments in New York.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-adam.webp' },\n },\n {\n agentId: 'n5c9e4a8',\n handle: 'demo_isabelle',\n name: 'Isabelle Monaco',\n title: 'Luxury Real Estate Specialist',\n summary: 'Former Goldman Sachs VP turned luxury real estate. <strong>Currently selling $10M+ properties</strong> in Silicon Valley.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-isabelle.webp' },\n },\n {\n agentId: 'd8f2b4c9',\n handle: 'demo_marcus',\n name: 'Marcus Hill',\n title: 'Independent Film Producer',\n summary: 'Started in CAA mailroom, now runs indie production. <strong>5 films launched to Netflix</strong> with total budgets under $10M.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-marcus.webp' },\n },\n {\n agentId: 'g2d5b7a1',\n handle: 'demo_lars',\n name: 'Lars Andersen',\n title: 'Olympic Ski Coach',\n summary: 'Norwegian Olympic team veteran, now coaching in Colorado. <strong>Currently training next generation</strong> of elite skiers while teaching mountain safety.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-lars.webp' },\n },\n {\n agentId: 'f9c3a8e5',\n handle: 'demo_tony',\n name: 'Tony Russo',\n title: 'Restaurant Owner',\n summary: 'Grew up in family kitchen, Cornell Hotel School trained. <strong>Currently running 4 locations</strong> in North Beach with industry-leading margins.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-tony.webp' },\n },\n {\n agentId: 'j3e7a5b2',\n handle: 'demo_jonathan',\n name: 'Dr. Jonathan Blake',\n title: 'Orthopedic Surgeon',\n summary: 'Johns Hopkins trained, Mayo Clinic fellowship. <strong>Currently practicing at Cedar Sinai</strong> with focus on minimally invasive techniques.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-jonathan.webp' },\n },\n {\n agentId: 'k7b4d8f3',\n handle: 'demo_emily',\n name: 'Emily McKibban',\n title: 'Stanford CS Student',\n summary: 'Valedictorian from Cupertino, Google intern. <strong>Currently juggling CS coursework</strong> with pre-med requirements while researching AI diagnostics.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-emily.webp' },\n },\n {\n agentId: 'l9e6a2c5',\n handle: 'demo_victoria',\n name: 'Victoria Laurent',\n title: 'Fashion Designer',\n summary: 'Central Saint Martins graduate, former Dior designer. <strong>Currently building independent brand</strong> that proves luxury and sustainability coexist.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-victoria.webp' },\n },\n {\n agentId: 'm3f8b1d7',\n handle: 'demo_alexandra',\n name: 'Alexa Stone',\n title: 'M&A Partner at Wilson Sonsini',\n summary: 'Harvard Law Review, 9th Circuit clerk. <strong>Currently structuring billion-dollar acquisitions</strong> for tech companies.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-alexandra.webp' },\n },\n {\n agentId: 'v3d7e2b8',\n handle: 'demo_sofia',\n name: 'Sofia Martinez',\n title: 'Principal Product Designer',\n summary: 'RISD graduate, design lead at three unicorns. <strong>Currently running user research</strong> from Mexico City while building design systems.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-sofia.webp' },\n },\n {\n agentId: 'p8a3f7b6',\n handle: 'demo_rachel',\n name: 'Rachel Adams',\n title: 'Marketing Agency Founder',\n summary: 'Early Facebook employee turned agency founder. <strong>Currently running 50-person performance marketing shop</strong> from Austin while hosting growth podcast.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-rachel.webp' },\n },\n {\n agentId: 'h8f6c2d9',\n handle: 'demo_gabriel',\n name: 'Gabriel Santos',\n title: 'Executive Mindfulness Coach',\n summary: 'Goldman Sachs burnout turned mindfulness expert. <strong>Currently leading retreats</strong> for Fortune 500 executives.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-gabriel.webp' },\n },\n {\n agentId: 'q1d6e9c2',\n handle: 'demo_sophie',\n name: 'Sophie Greenwald',\n title: 'Sustainability Consultant',\n summary: 'MIT environmental engineering, McKinsey sustainability practice. <strong>Currently helping Fortune 500 companies</strong> achieve real carbon reduction goals.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-sophie.webp' },\n },\n {\n agentId: 'r4b8f5d1',\n handle: 'demo_david',\n name: 'David Nguyen',\n title: 'Political Campaign Manager',\n summary: 'Obama 2008 field organizer turned top Democratic strategist. <strong>Currently preparing for 2026 cycle</strong> with data-driven grassroots approach.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-david.webp' },\n },\n {\n agentId: 't2e8b5d6',\n handle: 'demo_isabelle_r',\n name: 'Isabelle Rodriguez',\n title: 'Fashion Designer',\n summary: 'FIT graduate, Balenciaga-trained, launched at 27. <strong>Currently designing next collection</strong> from Miami studio.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-isabelle_r.webp' },\n },\n {\n agentId: 'u9f1c4a7',\n handle: 'demo_arjun',\n name: 'Arjun Patel',\n title: 'Serial Entrepreneur',\n summary: 'IIT Delhi, Stanford MS, sold last company to Microsoft. <strong>Currently raising Series A</strong> for AI platform while advising other founders.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-arjun.webp' },\n },\n // Handle-only entries - fetched from DB via getDemoAgents(sdk)\n { handle: 'dan' },\n]\n","import type { Agent } from '../schema'\nimport { staticAgents } from './data'\n\n/**\n * Get static agent by handle - fallback when DB returns nothing\n * Returns partial Agent with only essential fields populated\n * Undefined fields are acceptable - consuming code should handle gracefully\n */\nexport function getStaticAgentByHandle(handle: string): Partial<Agent> | undefined {\n return staticAgents.find((a) => a.handle === handle)\n}\n\n/**\n * Export all static agents for reference/listing\n */\nexport { staticAgents }\n","// Re-export static demo agents from app (zero duplication)\n// App data bundled into SDK at build time via @/ alias resolution\n\nimport type { PageLinesSDK } from '../sdkClient'\nimport { getStaticAgentByHandle as appGetStaticAgentByHandle } from '@/modules/agent/static'\nimport { staticAgents as appStaticAgents } from '@/modules/agent/static/data'\nimport type { Agent } from '@pagelines/types'\n\n// Re-export types\nexport type { Agent } from '@pagelines/types'\nexport type { DemoAgentEntry } from '@/modules/agent/static/data'\nexport { getStaticAgentByHandle } from '@/modules/agent/static'\n\n/**\n * Type guard: detects handle-only entries for DB fetching\n */\nfunction isHandleOnly(entry: unknown): entry is { handle: string } {\n if (typeof entry !== 'object' || entry === null)\n return false\n const keys = Object.keys(entry)\n return keys.length === 1 && 'handle' in entry && typeof (entry as any).handle === 'string'\n}\n\n/**\n * Get demo agents - mix of static data and DB-fetched entries\n * @param sdk - PageLinesSDK instance for fetching handle-only entries\n * @returns Promise<Partial<Agent>[]> - Array of demo agents (static + fetched)\n *\n * Handle-only entries (e.g., { handle: 'dan' }) are fetched in parallel via sdk.getPublicAgent()\n * Failed fetches are skipped silently with optional logging\n */\nexport async function getDemoAgents(sdk: PageLinesSDK): Promise<Partial<Agent>[]> {\n // Separate static entries from handle-only entries\n const staticEntries = appStaticAgents.filter((entry): entry is Partial<Agent> => !isHandleOnly(entry))\n const handleOnlyEntries = appStaticAgents.filter(isHandleOnly)\n\n // Fetch all handle-only entries in parallel (Promise.allSettled for graceful failure)\n const fetchResults = await Promise.allSettled(\n handleOnlyEntries.map(entry => sdk.getPublicAgent({ handle: entry.handle })),\n )\n\n // Extract successful fetches, log failures\n const fetchedAgents = fetchResults\n .map((result, index) => {\n if (result.status === 'fulfilled' && result.value) {\n return result.value\n }\n // Log failure but continue\n if (result.status === 'rejected' && sdk.logger) {\n sdk.logger.warn('Failed to fetch demo agent', {\n handle: handleOnlyEntries[index]?.handle,\n error: result.reason,\n })\n }\n return null\n })\n .filter((agent): agent is Partial<Agent> => agent !== null)\n\n // Combine static + fetched\n return [...staticEntries, ...fetchedAgents]\n}\n\nexport function getDemoAgentByHandle(handle: string) {\n return appGetStaticAgentByHandle(handle)\n}\n\n// Direct re-exports\nexport { staticAgents } from '@/modules/agent/static/data'\n"],"names":["staticAgents","getStaticAgentByHandle","handle","a","__name","isHandleOnly","entry","getDemoAgents","sdk","staticEntries","appStaticAgents","handleOnlyEntries","fetchedAgents","result","index","agent","getDemoAgentByHandle","appGetStaticAgentByHandle"],"mappings":";;AAcO,MAAMA,IAAiC;AAAA,EAC5C;AAAA,IACE,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,IACT,QAAQ,EAAE,KAAK,iEAAA;AAAA,IACf,YAAY;AAAA,EAAA;AAAA,EAEd;AAAA,IACE,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA;AAAA;AAAA,IAGT,QAAQ,EAAE,KAAK,iEAAA;AAAA,IACf,YAAY;AAAA,EAAA;AAAA,EAEd;AAAA,IACE,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,I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AA;AACZ;AC9OO,SAASC,EAAuBC,GAA4C;AACjF,SAAOF,EAAa,KAAK,CAACG,MAAMA,EAAE,WAAWD,CAAM;AACrD;AAFgBE,EAAAH,GAAA;ACQhB,SAASI,EAAaC,GAA6C;AACjE,SAAI,OAAOA,KAAU,YAAYA,MAAU,OAClC,KACI,OAAO,KAAKA,CAAK,EAClB,WAAW,KAAK,YAAYA,KAAS,OAAQA,EAAc,UAAW;AACpF;AALSF,EAAAC,GAAA;AAeT,eAAsBE,EAAcC,GAA8C;AAEhF,QAAMC,IAAgBC,EAAgB,OAAO,CAACJ,MAAmC,CAACD,EAAaC,CAAK,CAAC,GAC/FK,IAAoBD,EAAgB,OAAOL,CAAY,GAQvDO,KALe,MAAM,QAAQ;AAAA,IACjCD,EAAkB,IAAI,CAAAL,MAASE,EAAI,eAAe,EAAE,QAAQF,EAAM,QAAQ,CAAC;AAAA,EAAA,GAK1E,IAAI,CAACO,GAAQC,MACRD,EAAO,WAAW,eAAeA,EAAO,QACnCA,EAAO,SAGZA,EAAO,WAAW,cAAcL,EAAI,UACtCA,EAAI,OAAO,KAAK,8BAA8B;AAAA,IAC5C,QAAQG,EAAkBG,CAAK,GAAG;AAAA,IAClC,OAAOD,EAAO;AAAA,EAAA,CACf,GAEI,KACR,EACA,OAAO,CAACE,MAAmCA,MAAU,IAAI;AAG5D,SAAO,CAAC,GAAGN,GAAe,GAAGG,CAAa;AAC5C;AA7BsBR,EAAAG,GAAA;AA+Bf,SAASS,EAAqBd,GAAgB;AACnD,SAAOe,EAA0Bf,CAAM;AACzC;AAFgBE,EAAAY,GAAA;"}
|
|
1
|
+
{"version":3,"file":"demo.js","sources":["../../../src/modules/agent/static/data.ts","../../../src/modules/agent/static/index.ts","../demo/index.ts"],"sourcesContent":["import type { AgentConfig } from '../schema'\n\n/**\n * Demo agent entry - supports both static full/partial data AND handle-only entries\n * Handle-only entries (e.g., { handle: 'dan' }) will be fetched from DB via SDK\n */\nexport type DemoAgentEntry = Partial<AgentConfig> | { handle: string }\n\n/**\n * Static demo agents - mix of full data and handle-only entries\n * Full entries: Used as-is without DB fetch\n * Handle-only entries: Fetched from DB via getDemoAgents(sdk)\n * Images hosted on S3 at https://media.pagelines.com/_assets/avatars/\n */\nexport const staticAgents: DemoAgentEntry[] = [\n {\n agentId: '2101k200aj',\n handle: 'andrew',\n name: 'Andrew Powers',\n title: 'Co-Founder and CEO of PageLines',\n summary: '<p>Engineer turned entrepreneur with 15 years of success in digital platforms across the web, data, and AI.</p>',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-andrew.webp' },\n entityType: 'person',\n },\n {\n agentId: '5501k2nk0m',\n handle: 'morgan',\n name: 'Morgan Jones',\n title: 'Co-Founder and COO of PageLines',\n summary: `<p>Born in Vancouver, raised on rugby pitches, and refined through ventures across Asia, Europe, and beyond. After eight years in the UK and adventures in 30+ countries, I landed in Dana Point, California, where my wife and I are raising two kids between surf sessions and soccer games.</p>\n<p>I've built revenue engines for startups, turned around struggling companies, and helped founders go from zero to one, one to many. My approach is simple: authentic relationships beat aggressive tactics, great teams create great results, and if you're not having fun building something meaningful, you're doing it wrong.</p>\n<p>These days, I'm the COO at PageLines, where we're proving you can build a unicorn while maintaining work-life balance. I believe the best business decisions happen on ski lifts, breakthrough strategies come from garden walks, and the most important meetings are the ones at home. Looking to connect with leaders who understand that success without fulfillment is the ultimate failure.</p>`,\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-morgan.webp' },\n entityType: 'person',\n },\n {\n agentId: '7601k2x0x4',\n handle: 'edgar',\n name: 'Edgar Cheverier',\n title: 'Senior Software Engineer at PageLines',\n summary: `<p>Full-stack developer who believes elegant code is like great design - it just works. Obsessed with React, TypeScript, and the entire modern web stack, I approach every project with Steve Jobs' philosophy: the intersection of technology and liberal arts creates magic.</p>\n<p>When I'm not architecting solutions with Next.js or optimizing PostgreSQL queries, you'll find me on a trail run or climbing route, where the best debugging happens. I read voraciously - from computer science classics to philosophy - because great developers are students first, coders second.</p>\n<p>Currently building products that would make users say \"wow\" while maintaining the clean, testable code that makes fellow developers smile. Looking to connect with teams who understand that perfectionism isn't about adding more, it's about knowing what to leave out.</p>`,\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-edgar.webp' },\n entityType: 'person',\n },\n {\n agentId: '8901k2y0j5',\n handle: 'joey',\n name: 'Joey Mireles',\n title: 'Photographer/Digital Creator',\n summary: `<p>Orange County-based photographer and digital creator who captures life's most authentic moments. Whether it's scaling the snowy peaks of Big Bear or exploring Budapest's charming ruin bars, Joey approaches every adventure with his camera in hand and boundless enthusiasm.</p>\n<p>Known for turning ordinary moments into extraordinary stories, Joey believes the best shots happen when you're least prepared for them. His work blends technical precision with spontaneous creativity, creating images that feel both professional and deeply personal.</p>\n<p>Currently bringing that same adventurous spirit to PageLines's visual storytelling, proving that great photography isn't just about perfect lighting—it's about capturing the magic that happens when people connect with something meaningful.</p>`,\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-joey.webp' },\n entityType: 'person',\n },\n {\n agentId: 'ken-eliasen',\n handle: 'ken',\n name: 'Ken Eliasen',\n title: 'SVP Operations at Edwards Lifesciences',\n summary: 'Experienced Senior Vice President of R&D and Operations with 13+ years at Edwards Lifesciences and demonstrated history in the medical device industry. <strong>Currently leading operations for a Fortune 500 medical device company</strong> with expertise in DMAIC, Design Control, Verification and Validation (V&V), and medical device development. Strong development & operations professional with proven track record of launching new products and scaling manufacturing operations.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-ken.webp' },\n entityType: 'person',\n },\n {\n agentId: 'josh-powers-rime',\n handle: 'josh',\n name: 'Josh Powers',\n title: 'Founder of Rime Roofing',\n summary: `<p>Extensive experience in outside sales management and leadership. I've managed very large sales teams in multiple locations in both residential and B2B.</p>\n<p><strong>Currently running my own company for over 3 years</strong> doing all the back end stuff myself. HR, Operations, Payroll, Lead generation, Problem solving, Negotiation... You name it, I have done it.</p>\n<p>At Rime, we elevate what it means to protect and enhance your property. Our specialty is lifetime roofing with integrated, custom ventilation - ensuring every structure we touch performs at its best for decades.</p>`,\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-josh.webp' },\n entityType: 'person',\n },\n {\n agentId: 'vidur_mehra_01',\n handle: 'vidur',\n name: 'Vidur Mehra',\n title: 'Product Strategist at PIMCO',\n summary: 'Senior VP and product strategist on the defined contribution team at PIMCO, focusing on target date funds and retirement income solutions. <strong>Currently helping shape the future</strong> of retirement planning from Newport Beach office.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-vidur.webp' },\n entityType: 'person',\n },\n {\n agentId: 'mary-czarnecki',\n handle: 'mary',\n name: 'Mary Czarnecki',\n title: 'Strategic Storytelling Consultant & Keynote Speaker',\n summary: `<p>Strategic storytelling consultant, keynote speaker, and workshop facilitator with over 20 years in marketing and strategy roles at Johnson & Johnson, WebMD, and Accenture. <strong>Currently helping Fortune 500 companies and growth-stage businesses</strong> cut through the noise with clear, compelling messages that inspire action.</p>\n<p>I sit at the intersection of strategy, communication, and applied storytelling frameworks, bringing both the science behind why stories work and practical tools teams can use immediately. When I'm not on stage or in workshops, you'll find me in Oregon's Willamette Valley with my restaurateur husband, our two sons, and serving on boards for Women in Wine Oregon and Taste Newberg.</p>`,\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-mary.webp' },\n entityType: 'person',\n },\n {\n agentId: 'dean-stoecker',\n handle: 'dean',\n name: 'Dean Stoecker',\n title: 'Former CEO of Alteryx',\n summary: `<p>Built Alteryx from startup to $5B public company over 23 years, pioneering analytics automation and democratizing data science. Took the company public in 2017 and scaled from 85M to 600M+ ARR before transitioning to focus on meaningful ventures.</p>\n<p><strong>Currently leading Ranch Productions while producing family-friendly films</strong> from Colorado, including a biographical project about his father's life. I believe in patient capital, community-driven growth, and using storytelling to inspire and elevate human potential while staying grounded in values that matter.</p>\n<p>Whether it's building analytics platforms or crafting stories that inspire, I approach every venture with the long-term perspective of Warren Buffett, the product perfectionism of Steve Jobs, and the down-to-earth authenticity of the Mountain West.</p>`,\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-dean.webp' },\n entityType: 'person',\n },\n {\n agentId: 's7c3a9f4',\n handle: 'demo_yuki',\n name: 'Yuki Nakamura',\n title: 'Professional Cosplay Artist',\n summary: 'Art school dropout turned TikTok sensation. <strong>Currently preparing for Comic-Con</strong> while building costume commissions business.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-yuki.webp' },\n entityType: 'person',\n },\n {\n agentId: 'a7f3b2c8',\n handle: 'demo_adam',\n name: 'Adam Dvoretsky',\n title: 'International Chess Master',\n summary: 'Former national champion who coached 3 players to grandmaster level. <strong>Currently teaching strategic thinking through chess</strong> between tournaments in New York.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-adam.webp' },\n },\n {\n agentId: 'n5c9e4a8',\n handle: 'demo_isabelle',\n name: 'Isabelle Monaco',\n title: 'Luxury Real Estate Specialist',\n summary: 'Former Goldman Sachs VP turned luxury real estate. <strong>Currently selling $10M+ properties</strong> in Silicon Valley.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-isabelle.webp' },\n },\n {\n agentId: 'd8f2b4c9',\n handle: 'demo_marcus',\n name: 'Marcus Hill',\n title: 'Independent Film Producer',\n summary: 'Started in CAA mailroom, now runs indie production. <strong>5 films launched to Netflix</strong> with total budgets under $10M.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-marcus.webp' },\n },\n {\n agentId: 'g2d5b7a1',\n handle: 'demo_lars',\n name: 'Lars Andersen',\n title: 'Olympic Ski Coach',\n summary: 'Norwegian Olympic team veteran, now coaching in Colorado. <strong>Currently training next generation</strong> of elite skiers while teaching mountain safety.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-lars.webp' },\n },\n {\n agentId: 'f9c3a8e5',\n handle: 'demo_tony',\n name: 'Tony Russo',\n title: 'Restaurant Owner',\n summary: 'Grew up in family kitchen, Cornell Hotel School trained. <strong>Currently running 4 locations</strong> in North Beach with industry-leading margins.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-tony.webp' },\n },\n {\n agentId: 'j3e7a5b2',\n handle: 'demo_jonathan',\n name: 'Dr. Jonathan Blake',\n title: 'Orthopedic Surgeon',\n summary: 'Johns Hopkins trained, Mayo Clinic fellowship. <strong>Currently practicing at Cedar Sinai</strong> with focus on minimally invasive techniques.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-jonathan.webp' },\n },\n {\n agentId: 'k7b4d8f3',\n handle: 'demo_emily',\n name: 'Emily McKibban',\n title: 'Stanford CS Student',\n summary: 'Valedictorian from Cupertino, Google intern. <strong>Currently juggling CS coursework</strong> with pre-med requirements while researching AI diagnostics.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-emily.webp' },\n },\n {\n agentId: 'l9e6a2c5',\n handle: 'demo_victoria',\n name: 'Victoria Laurent',\n title: 'Fashion Designer',\n summary: 'Central Saint Martins graduate, former Dior designer. <strong>Currently building independent brand</strong> that proves luxury and sustainability coexist.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-victoria.webp' },\n },\n {\n agentId: 'm3f8b1d7',\n handle: 'demo_alexandra',\n name: 'Alexa Stone',\n title: 'M&A Partner at Wilson Sonsini',\n summary: 'Harvard Law Review, 9th Circuit clerk. <strong>Currently structuring billion-dollar acquisitions</strong> for tech companies.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-alexandra.webp' },\n },\n {\n agentId: 'v3d7e2b8',\n handle: 'demo_sofia',\n name: 'Sofia Martinez',\n title: 'Principal Product Designer',\n summary: 'RISD graduate, design lead at three unicorns. <strong>Currently running user research</strong> from Mexico City while building design systems.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-sofia.webp' },\n },\n {\n agentId: 'p8a3f7b6',\n handle: 'demo_rachel',\n name: 'Rachel Adams',\n title: 'Marketing Agency Founder',\n summary: 'Early Facebook employee turned agency founder. <strong>Currently running 50-person performance marketing shop</strong> from Austin while hosting growth podcast.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-rachel.webp' },\n },\n {\n agentId: 'h8f6c2d9',\n handle: 'demo_gabriel',\n name: 'Gabriel Santos',\n title: 'Executive Mindfulness Coach',\n summary: 'Goldman Sachs burnout turned mindfulness expert. <strong>Currently leading retreats</strong> for Fortune 500 executives.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-gabriel.webp' },\n },\n {\n agentId: 'q1d6e9c2',\n handle: 'demo_sophie',\n name: 'Sophie Greenwald',\n title: 'Sustainability Consultant',\n summary: 'MIT environmental engineering, McKinsey sustainability practice. <strong>Currently helping Fortune 500 companies</strong> achieve real carbon reduction goals.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-sophie.webp' },\n },\n {\n agentId: 'r4b8f5d1',\n handle: 'demo_david',\n name: 'David Nguyen',\n title: 'Political Campaign Manager',\n summary: 'Obama 2008 field organizer turned top Democratic strategist. <strong>Currently preparing for 2026 cycle</strong> with data-driven grassroots approach.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-david.webp' },\n },\n {\n agentId: 't2e8b5d6',\n handle: 'demo_isabelle_r',\n name: 'Isabelle Rodriguez',\n title: 'Fashion Designer',\n summary: 'FIT graduate, Balenciaga-trained, launched at 27. <strong>Currently designing next collection</strong> from Miami studio.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-isabelle_r.webp' },\n },\n {\n agentId: 'u9f1c4a7',\n handle: 'demo_arjun',\n name: 'Arjun Patel',\n title: 'Serial Entrepreneur',\n summary: 'IIT Delhi, Stanford MS, sold last company to Microsoft. <strong>Currently raising Series A</strong> for AI platform while advising other founders.',\n avatar: { src: 'https://media.pagelines.com/_assets/avatars/avatar-arjun.webp' },\n },\n // Handle-only entries - fetched from DB via getDemoAgents(sdk)\n { handle: 'dan' },\n]\n","import type { AgentConfig } from '../schema'\nimport { staticAgents } from './data'\n\n/**\n * Get static agent by handle - fallback when DB returns nothing\n * Returns partial Agent with only essential fields populated\n * Undefined fields are acceptable - consuming code should handle gracefully\n */\nexport function getStaticAgentByHandle(handle: string): Partial<AgentConfig> | undefined {\n return staticAgents.find((a) => a.handle === handle)\n}\n\n/**\n * Export all static agents for reference/listing\n */\nexport { staticAgents }\n","// Re-export static demo agents from app (zero duplication)\n// App data bundled into SDK at build time via @/ alias resolution\n\nimport type { PageLinesSDK } from '../sdkClient'\nimport { getStaticAgentByHandle as appGetStaticAgentByHandle } from '@/modules/agent/static'\nimport { staticAgents as appStaticAgents } from '@/modules/agent/static/data'\nimport type { AgentConfig } from '@pagelines/core'\n\n// Re-export types\nexport type { AgentConfig } from '@pagelines/core'\nexport type { DemoAgentEntry } from '@/modules/agent/static/data'\nexport { getStaticAgentByHandle } from '@/modules/agent/static'\n\n/**\n * Type guard: detects handle-only entries for DB fetching\n */\nfunction isHandleOnly(entry: unknown): entry is { handle: string } {\n if (typeof entry !== 'object' || entry === null)\n return false\n const keys = Object.keys(entry)\n return keys.length === 1 && 'handle' in entry && typeof (entry as any).handle === 'string'\n}\n\n/**\n * Get demo agents - mix of static data and DB-fetched entries\n * @param sdk - PageLinesSDK instance for fetching handle-only entries\n * @returns Promise<Partial<AgentConfig>[]> - Array of demo agents (static + fetched)\n *\n * Handle-only entries (e.g., { handle: 'dan' }) are fetched in parallel via sdk.getPublicAgent()\n * Failed fetches are skipped silently with optional logging\n */\nexport async function getDemoAgents(sdk: PageLinesSDK): Promise<Partial<AgentConfig>[]> {\n // Separate static entries from handle-only entries\n const staticEntries = appStaticAgents.filter((entry): entry is Partial<AgentConfig> => !isHandleOnly(entry))\n const handleOnlyEntries = appStaticAgents.filter(isHandleOnly)\n\n // Fetch all handle-only entries in parallel (Promise.allSettled for graceful failure)\n const fetchResults = await Promise.allSettled(\n handleOnlyEntries.map(entry => sdk.getPublicAgent({ handle: entry.handle })),\n )\n\n // Extract successful fetches, log failures\n const fetchedAgents = fetchResults\n .map((result, index) => {\n if (result.status === 'fulfilled' && result.value) {\n return result.value\n }\n // Log failure but continue\n if (result.status === 'rejected' && sdk.logger) {\n sdk.logger.warn('Failed to fetch demo agent', {\n handle: handleOnlyEntries[index]?.handle,\n error: result.reason,\n })\n }\n return null\n })\n .filter((agent): agent is Partial<AgentConfig> => agent !== null)\n\n // Combine static + fetched\n return [...staticEntries, ...fetchedAgents]\n}\n\nexport function getDemoAgentByHandle(handle: string) {\n return appGetStaticAgentByHandle(handle)\n}\n\n// Direct re-exports\nexport { staticAgents } from '@/modules/agent/static/data'\n"],"names":["staticAgents","getStaticAgentByHandle","handle","a","__name","isHandleOnly","entry","getDemoAgents","sdk","staticEntries","appStaticAgents","handleOnlyEntries","fetchedAgents","result","index","agent","getDemoAgentByHandle","appGetStaticAgentByHandle"],"mappings":";;AAcO,MAAMA,IAAiC;AAAA,EAC5C;AAAA,IACE,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,IACT,QAAQ,EAAE,KAAK,iEAAA;AAAA,IACf,YAAY;AAAA,EAAA;AAAA,EAEd;AAAA,IACE,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA;AAAA;AAAA,IAGT,QAAQ,EAAE,KAAK,iEAAA;AAAA,IACf,YAAY;AAAA,EAAA;AAAA,EAEd;AAAA,IACE,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA;AAAA;AAAA,IAGT,QAAQ,EAAE,KAAK,gEAAA;AAAA,IACf,YAAY;AAAA,EAAA;AAAA,EAEd;AAAA,IACE,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA;AAAA;AAAA,IAGT,QAAQ,EAAE,KAAK,+DAAA;AAAA,IACf,YAAY;AAAA,EAAA;AAAA,EAEd;AAAA,I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AAC,GAAA;AAeT,eAAsBE,EAAcC,GAAoD;AAEtF,QAAMC,IAAgBC,EAAgB,OAAO,CAACJ,MAAyC,CAACD,EAAaC,CAAK,CAAC,GACrGK,IAAoBD,EAAgB,OAAOL,CAAY,GAQvDO,KALe,MAAM,QAAQ;AAAA,IACjCD,EAAkB,IAAI,CAAAL,MAASE,EAAI,eAAe,EAAE,QAAQF,EAAM,QAAQ,CAAC;AAAA,EAAA,GAK1E,IAAI,CAACO,GAAQC,MACRD,EAAO,WAAW,eAAeA,EAAO,QACnCA,EAAO,SAGZA,EAAO,WAAW,cAAcL,EAAI,UACtCA,EAAI,OAAO,KAAK,8BAA8B;AAAA,IAC5C,QAAQG,EAAkBG,CAAK,GAAG;AAAA,IAClC,OAAOD,EAAO;AAAA,EAAA,CACf,GAEI,KACR,EACA,OAAO,CAACE,MAAyCA,MAAU,IAAI;AAGlE,SAAO,CAAC,GAAGN,GAAe,GAAGG,CAAa;AAC5C;AA7BsBR,EAAAG,GAAA;AA+Bf,SAASS,EAAqBd,GAAgB;AACnD,SAAOe,EAA0Bf,CAAM;AACzC;AAFgBE,EAAAY,GAAA;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { AuthClient } from './clients/AuthClient';
|
|
|
5
5
|
export { ChatClient } from './clients/ChatClient';
|
|
6
6
|
export { UserClient } from './clients/UserClient';
|
|
7
7
|
export type { SDKContext } from './clients/types';
|
|
8
|
-
export { MediaSchema } from '@pagelines/
|
|
9
|
-
export type { Agent, User, EnrichedUser, MediaObject, ApiResponse, } from '@pagelines/
|
|
8
|
+
export { MediaSchema } from '@pagelines/core';
|
|
9
|
+
export type { Agent, User, EnrichedUser, MediaObject, ApiResponse, } from '@pagelines/core';
|
|
10
10
|
export { SOCIAL_PLATFORMS } from './constants/socialPlatforms';
|
|
11
11
|
export type { SocialPlatform } from './constants/socialPlatforms';
|