adyou 0.4.0 → 0.5.1

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/core/site.js CHANGED
@@ -57,6 +57,10 @@ export async function readSite(url) {
57
57
  logo = abs(finalUrl, attr(img, 'src'));
58
58
  }
59
59
  const themeColor = meta(html, 'theme-color');
60
+ // 본문 이미지 — 아이콘·svg·트래킹 픽셀 제외 · width/height 힌트로 큰 것 우선 · 최대 8장
61
+ const imgTags = (html.match(/<img\b[^>]*>/gi) || []);
62
+ const scored = imgTags.map((t) => { const src = abs(finalUrl, attr(t, 'src') || attr(t, 'data-src') || (attr(t, 'srcset') || '').split(/\s+/)[0]); const w = Number(attr(t, 'width') || 0); const h = Number(attr(t, 'height') || 0); const alt = (attr(t, 'alt') || '').toLowerCase(); return { src, score: (w * h || 40000) + (/hero|product|screen|main|banner/.test(alt + (src || '')) ? 100000 : 0), bad: !src || /\.svg(\?|$)|\.gif(\?|$)|icon|logo|sprite|pixel|badge|avatar|emoji|1x1|spacer|data:/i.test(src || '') || (w && w < 120) || (h && h < 120) }; }).filter((x) => !x.bad && x.src);
63
+ const images = [...new Set([...(ogImage ? [ogImage] : []), ...scored.sort((a, b) => b.score - a.score).map((x) => x.src)])].slice(0, 8);
60
64
  const colors = [...new Set([...(html.match(/#[0-9a-fA-F]{6}\b/g) || [])].map((c) => c.toLowerCase()).filter((c) => !/^#(fff|000|ffffff|000000)/.test(c)))].slice(0, 12);
61
65
  const headings = [...new Set((html.match(/<h[1-3][^>]*>([\s\S]*?)<\/h[1-3]>/gi) || []).map((h) => stripHtml(h)).filter((h) => h.length > 1 && h.length < 120))].slice(0, 20);
62
66
  const text = stripHtml(html).slice(0, 6000);
@@ -76,5 +80,5 @@ export async function readSite(url) {
76
80
  catch {
77
81
  utmPreserved = null;
78
82
  }
79
- return { url, finalUrl, status, title, description, lang: lang || 'ko', ogImage, logo, themeColor, colors, headings, prices, text, hasFbq: /fbq\(/.test(html), pixelIds, gtagIds, ga4Ids, csp, utmPreserved };
83
+ return { url, finalUrl, status, title, description, lang: lang || 'ko', ogImage, logo, themeColor, colors, images, headings, prices, text, hasFbq: /fbq\(/.test(html), pixelIds, gtagIds, ga4Ids, csp, utmPreserved };
80
84
  }
@@ -62,6 +62,22 @@ export type Brief = {
62
62
  specialCategory?: string | null;
63
63
  confirmed?: boolean;
64
64
  notes?: string;
65
+ /** 업종 키(플레이북 선택 · creatives/playbook.ts INDUSTRIES) */
66
+ industry?: string;
67
+ /** 소재 비주얼 장르(우선순위 · 예 ['photoreal','ugc'] · 애니·게임 브랜드는 ['anime','ugc']) */
68
+ visualGenres?: string[];
69
+ /** 핵심 타겟 프로필 — UGC 배우·화법·관심사에 쓴다 */
70
+ audienceProfile?: {
71
+ ageRange?: string;
72
+ gender?: string;
73
+ persona?: string;
74
+ interests?: string[];
75
+ painPoint?: string;
76
+ };
77
+ /** 광고에 쓸 증거(숫자·수상·후기 등 사이트에 근거 있는 것만) */
78
+ proofPoints?: string[];
79
+ /** 사이트에서 뽑은 참고 이미지 URL(제품·화면) */
80
+ siteImages?: string[];
65
81
  };
66
82
  export type Concept = {
67
83
  key: string;
@@ -77,6 +93,9 @@ export type Concept = {
77
93
  videoPrompt?: string;
78
94
  videoLines?: string[];
79
95
  videoVoice?: string;
96
+ /** 콘티(포맷별 3박자 대본 · creatives/storyboard.ts) · 시장 언어별 문구 */
97
+ storyboards?: import('./creatives/storyboard.js').Storyboard[];
98
+ i18n?: import('./creatives/storyboard.js').I18n;
80
99
  };
81
100
  /** 소재 자산 — 이미지(PNG) 또는 영상(MP4). type 이 없으면 이미지. costKrw 는 생성 원가(원). variant 는 같은 크기의 A/B 변형 구분(기본 ''). */
82
101
  export type CreativeAsset = {
@@ -88,6 +107,8 @@ export type CreativeAsset = {
88
107
  medium: 'meta' | 'google' | 'both';
89
108
  type?: 'image' | 'video';
90
109
  variant?: string;
110
+ lang?: string;
111
+ format?: string;
91
112
  durationSec?: number;
92
113
  mime?: string;
93
114
  costKrw?: number;
@@ -117,6 +138,7 @@ export type Placement = {
117
138
  kind: string;
118
139
  concept?: string;
119
140
  format?: 'image' | 'video';
141
+ lang?: string;
120
142
  externalId: string;
121
143
  name: string;
122
144
  status: string;
package/dist/index.d.ts CHANGED
@@ -11,6 +11,9 @@ export * from './core/creatives/media.js';
11
11
  export * from './core/creatives/video.js';
12
12
  export * from './core/creatives/videofx.js';
13
13
  export * from './core/creatives/factory.js';
14
+ export * from './core/creatives/playbook.js';
15
+ export * from './core/creatives/storyboard.js';
16
+ export * from './core/creatives/siteshots.js';
14
17
  export { computePlan, type PlanInput } from './core/plan.js';
15
18
  export * from './core/optimize.js';
16
19
  export * from './core/report.js';
package/dist/index.js CHANGED
@@ -12,6 +12,9 @@ export * from './core/creatives/media.js';
12
12
  export * from './core/creatives/video.js';
13
13
  export * from './core/creatives/videofx.js';
14
14
  export * from './core/creatives/factory.js';
15
+ export * from './core/creatives/playbook.js';
16
+ export * from './core/creatives/storyboard.js';
17
+ export * from './core/creatives/siteshots.js';
15
18
  export { computePlan } from './core/plan.js';
16
19
  export * from './core/optimize.js';
17
20
  export * from './core/report.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adyou",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "ADYou — 대행사 없이, 당신이 직접. 사이트 주소 하나로 광고 소재·매체 등록·자동 운영·보고까지: AI 광고 자율주행 CLI + MCP 서버(Meta·Google · 생성은 항상 PAUSED · 승인 뒤 시작)",
5
5
  "type": "module",
6
6
  "license": "MIT",