// Slide 11: Self-hosted vs Cloud -- pros/cons decision panel // Content slide: two cards with pros/cons. const ds = require('./design-system'); function createSlide(pres, theme) { const slide = pres.addSlide(); ds.helpers.slideBase(slide, pres, theme); ds.helpers.addHeader(slide, pres, theme, { eyebrow: 'STAGE 5: ECOSYSTEM', section: 'Deployment', title: 'Self-hosted vs Cloud: что выбрать', sectionNumber: 5, }); // Lead paragraph slide.addText( 'LangSmith и LangGraph Platform существуют в двух режимах: ' + 'managed Cloud (быстрый старт, оплата по usage) и Self-Hosted (ваш K8s/VM, ' + 'ваши данные остаются внутри периметра). Актуальная self-hosted версия -- v0.9.', { x: 0.5, y: 1.5, w: 9.0, h: 0.7, fontFace: ds.helpers.withFallback(theme.fonts.ui), fontSize: 13, color: theme.palette.text.secondary, align: 'left', valign: 'top', margin: 0, } ); // Two cards side by side const cards = [ { x: 0.5, title: 'Cloud', sub: 'smith.langchain.com + managed platform', pros: [ 'Zero-setup: API key и заводите trace-ы', 'Managed Postgres, Redis, scaling', 'Studio UI включен в подписку', 'Latest features сразу', ], cons: [ 'Данные уходят в чужой VPC (US-region)', 'Pay-per-trace: cost растет с нагрузкой', 'Vendor lock на retention policy', ], accentColor: 'primary', }, { x: 5.1, title: 'Self-Hosted', sub: 'Docker/Helm chart, v0.9', pros: [ 'Данные внутри своего VPC/compliance', 'Flat cost: предсказуемо для prod', 'Полный контроль над retention', 'Air-gapped окружения поддерживаются', ], cons: [ 'Ops: K8s, Postgres, Redis, ClickHouse', 'Обновления руками (breaking changes)', 'Studio UI = отдельный пакет', 'Не все beta-фичи доступны сразу', ], accentColor: 'secondary', }, ]; const cardY = 2.35; const cardW = 4.4; const cardH = 2.6; cards.forEach((c) => { const accent = c.accentColor === 'primary' ? theme.palette.accent.primary : theme.palette.accent.secondary; slide.addShape(pres.ShapeType.roundRect, { x: c.x, y: cardY, w: cardW, h: cardH, fill: { color: theme.palette.bg.elevated }, line: { color: theme.palette.border.subtle, width: 1 }, rectRadius: 0.1, }); // Left accent bar slide.addShape(pres.ShapeType.rect, { x: c.x, y: cardY, w: 0.08, h: cardH, fill: { color: accent }, line: { type: 'none' }, }); slide.addText(c.title, { x: c.x + 0.25, y: cardY + 0.15, w: cardW - 0.4, h: 0.4, fontFace: ds.helpers.withFallback(theme.fonts.ui), fontSize: 22, bold: true, color: accent, valign: 'middle', margin: 0, }); slide.addText(c.sub, { x: c.x + 0.25, y: cardY + 0.55, w: cardW - 0.4, h: 0.25, fontFace: ds.helpers.withFallback(theme.fonts.ui), fontSize: 10, italic: true, color: theme.palette.text.muted, valign: 'middle', margin: 0, }); // Pros slide.addText('+', { x: c.x + 0.25, y: cardY + 0.85, w: 0.25, h: 0.3, fontFace: ds.helpers.withFallback(theme.fonts.code), fontSize: 14, bold: true, color: theme.palette.state.success, valign: 'top', margin: 0, }); const prosBody = c.pros.map((p) => ({ text: p + '\n', options: { fontFace: ds.helpers.withFallback(theme.fonts.ui), fontSize: 10, color: theme.palette.text.primary, }, })); slide.addText(prosBody, { x: c.x + 0.5, y: cardY + 0.85, w: cardW - 0.65, h: 1.0, valign: 'top', paraSpaceAfter: 2, margin: 0, }); // Cons slide.addText('-', { x: c.x + 0.25, y: cardY + 1.9, w: 0.25, h: 0.3, fontFace: ds.helpers.withFallback(theme.fonts.code), fontSize: 14, bold: true, color: theme.palette.state.danger, valign: 'top', margin: 0, }); const consBody = c.cons.map((p) => ({ text: p + '\n', options: { fontFace: ds.helpers.withFallback(theme.fonts.ui), fontSize: 10, color: theme.palette.text.primary, }, })); slide.addText(consBody, { x: c.x + 0.5, y: cardY + 1.9, w: cardW - 0.65, h: 0.7, valign: 'top', paraSpaceAfter: 2, margin: 0, }); }); // Bottom meta strip slide.addText( 'Рекомендация: Cloud для prototype и команд до 5 инженеров; ' + 'self-hosted при compliance-требованиях и > 100M trace-ов в месяц.', { x: 0.5, y: 5.0, w: 9.0, h: 0.3, fontFace: ds.helpers.withFallback(theme.fonts.ui), fontSize: 10, italic: true, color: theme.palette.text.muted, align: 'left', valign: 'middle', margin: 0, } ); ds.helpers.addSourceLine(slide, pres, theme, { source: 'changelog.langchain.com/announcements/langsmith-self-hosted-v0-9', }); ds.helpers.addPageNumber(slide, pres, theme, 11); } module.exports = { createSlide };