mulmocast 1.2.27 → 1.2.29

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.
Files changed (61) hide show
  1. package/assets/templates/documentary.json +19 -0
  2. package/lib/actions/image_agents.d.ts +16 -31
  3. package/lib/actions/image_agents.js +6 -5
  4. package/lib/actions/image_references.js +2 -2
  5. package/lib/actions/images.d.ts +17 -30
  6. package/lib/actions/images.js +4 -1
  7. package/lib/actions/index.d.ts +1 -0
  8. package/lib/actions/index.js +1 -0
  9. package/lib/actions/markdown.d.ts +3 -0
  10. package/lib/actions/markdown.js +61 -0
  11. package/lib/agents/image_replicate_agent.d.ts +7 -0
  12. package/lib/agents/image_replicate_agent.js +59 -0
  13. package/lib/agents/index.d.ts +2 -1
  14. package/lib/agents/index.js +2 -1
  15. package/lib/agents/movie_replicate_agent.js +9 -7
  16. package/lib/agents/puppeteer_crawler_agent.d.ts +0 -9
  17. package/lib/agents/puppeteer_crawler_agent.js +1 -1
  18. package/lib/cli/bin.js +2 -0
  19. package/lib/cli/commands/markdown/builder.d.ts +16 -0
  20. package/lib/cli/commands/markdown/builder.js +5 -0
  21. package/lib/cli/commands/markdown/handler.d.ts +4 -0
  22. package/lib/cli/commands/markdown/handler.js +11 -0
  23. package/lib/cli/commands/markdown/index.d.ts +4 -0
  24. package/lib/cli/commands/markdown/index.js +4 -0
  25. package/lib/data/promptTemplates.js +42 -0
  26. package/lib/data/scriptTemplates.js +160 -160
  27. package/lib/data/templateDataSet.d.ts +1 -0
  28. package/lib/data/templateDataSet.js +5 -1
  29. package/lib/mcp/aaa.js +1 -1
  30. package/lib/methods/mulmo_beat.d.ts +6 -1
  31. package/lib/types/agent.d.ts +12 -0
  32. package/lib/types/schema.d.ts +13 -0
  33. package/lib/types/schema.js +2 -0
  34. package/lib/types/type.d.ts +1 -1
  35. package/lib/utils/context.d.ts +3 -0
  36. package/lib/utils/context.js +1 -0
  37. package/lib/utils/image_plugins/image.d.ts +1 -1
  38. package/lib/utils/image_plugins/image.js +2 -2
  39. package/lib/utils/image_plugins/index.d.ts +7 -11
  40. package/lib/utils/image_plugins/index.js +1 -12
  41. package/lib/utils/image_plugins/markdown.d.ts +1 -0
  42. package/lib/utils/image_plugins/markdown.js +8 -1
  43. package/lib/utils/image_plugins/mermaid.d.ts +1 -0
  44. package/lib/utils/image_plugins/mermaid.js +9 -0
  45. package/lib/utils/image_plugins/movie.d.ts +1 -1
  46. package/lib/utils/image_plugins/movie.js +2 -2
  47. package/lib/utils/image_plugins/source.d.ts +2 -1
  48. package/lib/utils/image_plugins/source.js +34 -1
  49. package/lib/utils/image_plugins/text_slide.d.ts +1 -0
  50. package/lib/utils/image_plugins/text_slide.js +12 -1
  51. package/lib/utils/image_plugins/vision.js +1 -1
  52. package/lib/utils/provider2agent.d.ts +5 -0
  53. package/lib/utils/provider2agent.js +5 -0
  54. package/lib/utils/utils.js +3 -0
  55. package/package.json +5 -4
  56. package/scripts/templates/vision.json +160 -160
  57. package/scripts/test/test_image_refs.json +10 -0
  58. package/scripts/test/test_markdown.json +60 -0
  59. package/scripts/test/test_mv.json +6 -4
  60. package/scripts/test/test_replicate.json +18 -0
  61. package/scripts/test/test_vision.json +1 -1
@@ -6,6 +6,7 @@ export declare const templateDataSet: {
6
6
  children_book: string;
7
7
  coding: string;
8
8
  comic_strips: string;
9
+ documentary: string;
9
10
  drslump_comic: string;
10
11
  ghibli_comic: string;
11
12
  ghibli_comic_strips: string;
@@ -27,6 +27,10 @@ export const templateDataSet = {
27
27
  "```JSON\n" +
28
28
  `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]"}],"canvasSize":{"width":1536,"height":1024},"imageParams":{"style":"<style>A multi panel comic strips. 1990s American workplace humor. Clean, minimalist line art with muted colors. One character is a nerdy office worker with glasses</style>"}}\n` +
29
29
  "```",
30
+ documentary: "Generate 30 to 40 beats. Another AI will generate image for each beat based on the text description of that beat. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
31
+ "```JSON\n" +
32
+ `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]"}],"imageParams":{"style":"<style>Photo realistic and cinematic. Let the art convey the story and emotions without text. Use the image for the aspect ratio</style>"},"canvasSize":{"width":1536,"height":1024}}\n` +
33
+ "```",
30
34
  drslump_comic: "Another AI will generate images for each beat based on the image prompt of that beat. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
31
35
  "```JSON\n" +
32
36
  `{"$mulmocast":{"version":"1.1","credit":"closing"},"title":"[TITLE: Brief, engaging title for the topic]","lang":"en","references":[{"url":"[SOURCE_URL: URL of the source material]","title":"[SOURCE_TITLE: Title of the referenced article, or paper]","type":"[SOURCE_TYPE: article, paper]"}],"beats":[{"text":"[OPENING_BEAT: Introduce the topic with a hook. Reference the source material and set up why this topic matters. Usually 2-3 sentences that grab attention and provide context.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[MAIN_CONCEPT: Define or explain the core concept/idea. This should be the central focus of your narrative. Keep it clear and accessible.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_1: Additional context, examples, or elaboration that helps illustrate the main concept. This could include how it works, why it's important, or real-world applications.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[SUPPORTING_DETAIL_2: Continue with more examples, deeper explanation, or different aspects of the topic if needed.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[ADDITIONAL_BEATS: Add more beats as necessary to fully explore the topic. Complex topics may require 6-10+ beats to cover adequately. Each beat should advance the narrative or provide valuable information.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"},{"text":"[CONCLUSION/IMPACT: Wrap up with the significance, implications, or key takeaway. Help the audience understand why this matters to them.]","imagePrompt":"[IMAGE_PROMPT: A prompt for the image to be generated for this beat.]"}],"canvasSize":{"width":1536,"height":1024},"imageParams":{"style":"<style>Dragon Ball/Dr. Slump aesthetic.</style>","images":{"girl":{"type":"image","source":{"kind":"url","url":"https://raw.githubusercontent.com/receptron/mulmocast-media/refs/heads/main/characters/slump_presenter.png"}}}}}\n` +
@@ -81,6 +85,6 @@ export const templateDataSet = {
81
85
  "```",
82
86
  vision: "First, determine a set of slides (=beats) to present, and choose an appropriate style for each beat (from the JSON template blow) and add required data for it. For each beat, put an appropriate text to the text field for the presenter to read for that slide in details. Mention the reference in one of beats, if it exists. Use the JSON below as a template.\n" +
83
87
  "```JSON\n" +
84
- `{"$mulmocast":{"version":"1.1"},"lang":"en","title":"Sample Presentation","canvasSize":{"width":1536,"height":1024},"beats":[{"text":"sectionDividerPage","image":{"type":"vision","style":"sectionDividerPage","data":{"heading":"How AI Is Reshaping Referencing","subheading":"From sources to systems: reliability, traceability, and credit in the age of models"}}},{"text":"agendaPage","image":{"type":"vision","style":"agendaPage","data":{"title":"Agenda","items":["Executive summary","Reference reliability and hallucinations","Attribution and credit in AI workflows","Standards & compliance (academia, journalism, law)","Roadmap & recommendations"]}}},{"text":"executiveSummaryPage","image":{"type":"vision","style":"executiveSummaryPage","data":{"title":"Executive Summary","bullets":["AI accelerates discovery but introduces novel risks in citation accuracy and provenance.","RAG and structured retrieval reduce hallucinations when sources are governed and auditable.","Attribution standards are emerging; early adoption lowers legal and reputational exposure.","Watermarking and signed citations enable verifiable chains of reference.","Organizations need policy, training, and tooling to ensure traceable, compliant referencing."]}}},{"text":"keyMessageWithSupportsPage","image":{"type":"vision","style":"keyMessageWithSupportsPage","data":{"headline":"Trustworthy referencing is a prerequisite for AI at scale.","supports":["Stakeholders require verifiable provenance for critical decisions.","Standards (e.g., citations, licensing) are uneven across industries.","Tooling gaps persist between LLM outputs and enterprise compliance systems."]}}},{"text":"hypothesisPage","image":{"type":"vision","style":"hypothesisPage","data":{"hypothesis":"Firms that implement verifiable AI referencing will reduce risk and accelerate adoption.","implications":["Lower legal exposure on copyright and misinformation claims.","Faster audit cycles through machine-readable provenance.","Higher user confidence and usage in knowledge-heavy workflows."],"nextSteps":["Deploy governed retrieval with source whitelists.","Adopt signed citations and immutable logs for high-stakes outputs.","Train users on prompt patterns that preserve attribution."]}}},{"text":"issueTreePage","image":{"type":"vision","style":"issueTreePage","data":{"rootIssue":"How to ensure accurate, compliant AI referencing?","branches":[["Provenance capture","Source governance","Traceability"],["Legal & licensing","Attribution norms","Fair use boundaries"],["User behavior","Training & prompts","Review workflows"]]}}},{"text":"driverTreePage","image":{"type":"vision","style":"driverTreePage","data":{"metric":"Reference accuracy rate (%)","drivers":[["Governed corpus coverage","Retriever quality","Index freshness"],["Citation rendering logic","Signed-source support","Reviewer adherence"],["User prompt hygiene","Auto-evidence insertion","UI nudges"]]}}},{"text":"meceListPage","image":{"type":"vision","style":"meceListPage","data":{"title":"MECE: Reference Risk Areas","groups":[{"label":"Technical","items":["Hallucinations","Retriever gaps","Version drift"]},{"label":"Legal","items":["Copyright","Licensing","Privacy & PII"]},{"label":"Operational","items":["Review latency","Policy ambiguity","Training gaps"]}]}}},{"text":"pyramidPrinciplePage","image":{"type":"vision","style":"pyramidPrinciplePage","data":{"keyMessage":"Verifiable references unlock safe, scalable AI adoption.","supports":["Reduces legal and reputational risk","Improves stakeholder confidence","Shortens audit cycles"],"details":[["Use source whitelists","Track doc versions","Sign evidence blobs"],["Expose citations in UI","Link to canonical sources","Store prompts & context"],["Automate QA sampling","Monitor reference KPIs","Escalate anomalies"]]}}},{"text":"scqaPage","image":{"type":"vision","style":"scqaPage","data":{"situation":"Teams increasingly rely on AI to synthesize knowledge and draft outputs.","complication":"AI can misattribute or fabricate sources, risking credibility and compliance.","question":"How can we ensure references are accurate, traceable, and compliant?","answer":"Standardize governed retrieval, signed citations, and review workflows integrated into authoring tools."}}},{"text":"swotPage","image":{"type":"vision","style":"swotPage","data":{"strengths":["Speed of synthesis","Scalable drafting","Broad corpus reach"],"weaknesses":["Hallucinations","Opaque provenance","Reviewer overload"],"opportunities":["New evidence UX","Standardized attribution","Automated audits"],"threats":["Regulatory fines","Misinformation","IP disputes"]}}},{"text":"threeCPage","image":{"type":"vision","style":"threeCPage","data":{"company":["Commit to verifiable AI outputs","Invest in governed retrieval"],"customer":["Needs trustworthy citations","Wants explorable sources"],"competitor":["Adopting reference-safe workflows","Marketing 'trust' as a differentiator"]}}},{"text":"fourPPage","image":{"type":"vision","style":"fourPPage","data":{"product":["Reference-safe AI assistant","Evidence panel","Citation export"],"price":["Tiered by audit features","Enterprise compliance add-ons"],"place":["Browser extension","Docs add-in","APIs"],"promotion":["Risk reduction ROI","Case studies","Compliance partnerships"]}}},{"text":"sevenSPage","image":{"type":"vision","style":"sevenSPage","data":{"strategy":"Make 'trustworthy references' a core AI value prop","structure":"Central knowledge governance with federated champions","systems":"RAG, signing, audit logs integrated in content tools","sharedValues":"Truth, transparency, accountability","skills":"Prompting, retrieval tuning, compliance literacy","style":"Evidence-first culture","staff":"Knowledge stewards, AI librarians, compliance reviewers"}}},{"text":"valueChainPage","image":{"type":"vision","style":"valueChainPage","data":{"primary":["Ingestion","Indexing","Retrieval","Generation","Review","Publication"],"support":["Governance","Security","Compliance","Training","Monitoring"]}}},{"text":"porterFiveForcesPage","image":{"type":"vision","style":"porterFiveForcesPage","data":{"newEntrants":["AI-first doc tools","Verification startups"],"suppliers":["Model providers","Content licensors"],"buyers":["Enterprises","Universities","Newsrooms"],"substitutes":["Manual research","Traditional search-only"],"rivalry":["Platform ecosystems","Vertical specialists"]}}},{"text":"businessModelCanvasPage","image":{"type":"vision","style":"businessModelCanvasPage","data":{"blocks":{"Key Partners":["Model vendors","Content platforms","Auditors"],"Key Activities":["Indexing","Retrieval","Signing","QA"],"Key Resources":["Curated corpora","Embeddings index","Audit logs"],"Value Propositions":["Trustworthy AI outputs","Time saved","Reduced risk"],"Customer Relationships":["Embedded in workflows","SLAs"],"Channels":["Add-ins","APIs","Marketplace"],"Customer Segments":["Legal","Research","Editorial"],"Cost Structure":["Compute","Licenses","Review ops"],"Revenue Streams":["Seats","Usage","Compliance tier"]}}}},{"text":"customerJourneyPage","image":{"type":"vision","style":"customerJourneyPage","data":{"stages":["Discover","Draft","Verify","Publish","Audit"],"touchpoints":[["Search UI","Corpus filters"],["Editor plugin","Reference panel"],["Reviewer queue","Signed citations"],["Export formats","Permalinks"],["Randomized QA","Dashboards"]]}}},{"text":"stakeholderMapPage","image":{"type":"vision","style":"stakeholderMapPage","data":{"stakeholders":[{"style":"Legal","influence":9,"interest":8,"notes":"Reduce liability"},{"style":"Editorial","influence":7,"interest":9,"notes":"Protect credibility"},{"style":"Engineering","influence":8,"interest":7,"notes":"Build RAG & signing"},{"style":"End users","influence":6,"interest":10,"notes":"Need clarity & speed"}]}}},{"text":"raciPage","image":{"type":"vision","style":"raciPage","data":{"tasks":["Define policy","Implement RAG","Roll out training","Monitor KPIs"],"roles":["Legal","Engineering","L&D","Ops"],"assignments":[["A","R","C","I"],["C","A/R","I","I"],["I","C","A/R","I"],["C","R","I","A"]]}}},{"text":"okrKpiDashboardPage","image":{"type":"vision","style":"okrKpiDashboardPage","data":{"title":"Reference Quality KPIs","metrics":[{"label":"Reference accuracy","value":"97%","target":"≥95%","status":"On track"},{"label":"Signed citation coverage","value":"82%","target":"≥80%","status":"On track"},{"label":"Reviewer SLA","value":"4h","target":"≤6h","status":"On track"}]}}},{"text":"balancedScorecardPage","image":{"type":"vision","style":"balancedScorecardPage","data":{"perspectives":[{"style":"Financial","items":["Reduce rework costs","Avoid penalties"]},{"style":"Customer","items":["Trust score ↑","NPS ↑"]},{"style":"Internal","items":["QA automation","Corpus governance"]},{"style":"Learning & Growth","items":["Reviewer upskilling","Prompt playbooks"]}]}}},{"text":"quarterlyRoadmapPage","image":{"type":"vision","style":"quarterlyRoadmapPage","data":{"quarters":["Q1","Q2","Q3","Q4"],"items":[{"quarter":"Q1","label":"Policy & baseline KPIs"},{"quarter":"Q2","label":"Signed citations rollout"},{"quarter":"Q3","label":"Reviewer workflow automation"},{"quarter":"Q4","label":"External audits & certification"}]}}},{"text":"milestoneTimelinePage","image":{"type":"vision","style":"milestoneTimelinePage","data":{"title":"Implementation Timeline","milestones":[{"label":"Policy approved","date":"2025-02-01","notes":"Exec sign-off"},{"label":"RAG MVP live","date":"2025-04-15","notes":"Limited corpus"},{"label":"Signed citations","date":"2025-06-30","notes":"Tier-1 content"},{"label":"Audit-ready","date":"2025-09-30","notes":"Dashboards & sampling"}]}}},{"text":"ganttSimplePage","image":{"type":"vision","style":"ganttSimplePage","data":{"tasks":[{"style":"Policy drafting","start":"2025-01-05","end":"2025-02-01"},{"style":"RAG build","start":"2025-02-05","end":"2025-04-15"},{"style":"Signing & logs","start":"2025-04-01","end":"2025-06-30"},{"style":"Reviewer ops","start":"2025-05-15","end":"2025-08-01"}]}}},{"text":"waterfallPage","image":{"type":"vision","style":"waterfallPage","data":{"title":"Time Savings from AI Referencing (hrs/month)","steps":[{"label":"Baseline (manual search)","value":0},{"label":"RAG-enabled drafting","value":120},{"label":"Signed citations","value":160},{"label":"Automated QA","value":190}]}}},{"text":"funnelPage","image":{"type":"vision","style":"funnelPage","data":{"stages":[{"label":"Drafts created","value":1000},{"label":"Drafts with citations","value":850},{"label":"Signed citations","value":700},{"label":"Approved & published","value":630}]}}},{"text":"twoByTwoMatrixPage","image":{"type":"vision","style":"twoByTwoMatrixPage","data":{"xAxis":"Evidence depth","yAxis":"Ease of use","quadrants":[["Scholarly databases"],["AI assistants with signing"],["Raw web search"],["Legacy manual workflows"]]}}},{"text":"bcgMatrixPage","image":{"type":"vision","style":"bcgMatrixPage","data":{"stars":["Signed-citation AI editors"],"cashCows":["Governed enterprise search"],"questionMarks":["Generative browsers"],"dogs":["Unverified copy-paste tools"]}}},{"text":"geMcKinseyMatrixPage","image":{"type":"vision","style":"geMcKinseyMatrixPage","data":{"industryAttractiveness":["Regulatory clarity","IP-safe corpora","Audit tooling"],"competitiveStrength":["Corpus quality","Model integration","Compliance features"],"placements":[{"style":"Signed AI editor","row":0,"col":2},{"style":"Generic chatbot","row":1,"col":1},{"style":"Manual search","row":2,"col":0}]}}},{"text":"marimekkoPlaceholderPage","image":{"type":"vision","style":"marimekkoPlaceholderPage","data":{"title":"Content Types by Share & Effort","categories":["Academic","News","Internal docs","Web"]}}},{"text":"bubbleChartPlaceholderPage","image":{"type":"vision","style":"bubbleChartPlaceholderPage","data":{"title":"Risk vs Impact vs Adoption","points":[{"label":"Legal memos","x":8,"y":9,"r":20},{"label":"Blog posts","x":4,"y":5,"r":15},{"label":"Research briefs","x":7,"y":7,"r":18}]}}},{"text":"heatmapPlaceholderPage","image":{"type":"vision","style":"heatmapPlaceholderPage","data":{"rows":["Teams"],"cols":["Accuracy","Provenance","Speed","Compliance"],"values":[[8,7,9,6]]}}},{"text":"kpiHighlightPage","image":{"type":"vision","style":"kpiHighlightPage","data":{"title":"KPI Highlights","kpis":[{"label":"Reference Accuracy","value":"97%","delta":"+2pp"},{"label":"Signed Coverage","value":"82%","delta":"+5pp"},{"label":"Audit Exceptions","value":"1.2%","delta":"-0.4pp"}]}}},{"text":"beforeAfterPage","image":{"type":"vision","style":"beforeAfterPage","data":{"title":"Before vs After AI Referencing","before":["Manual searches","Inconsistent citations","Slow audits"],"after":["Governed retrieval","Standardized citations","Signed evidence"]}}},{"text":"optionEvaluationPage","image":{"type":"vision","style":"optionEvaluationPage","data":{"criteria":["Accuracy","Latency","Compliance","Cost"],"options":["Generic chatbot","RAG + signing","Manual review"],"scores":[[5,7,9,6],[8,7,9,7],[9,3,10,4]]}}},{"text":"riskMitigationPage","image":{"type":"vision","style":"riskMitigationPage","data":{"risks":[{"risk":"Misattribution","impact":"High","likelihood":"Medium","mitigation":"Signed citations + review"},{"risk":"Copyright claims","impact":"High","likelihood":"Low","mitigation":"Licensed corpora + filters"},{"risk":"PII leakage","impact":"High","likelihood":"Low","mitigation":"Redaction + policy"}]}}},{"text":"positioningMapPage","image":{"type":"vision","style":"positioningMapPage","data":{"xAxis":"Compliance readiness","yAxis":"User adoption","players":[{"style":"AI Editor (signed)","x":8,"y":8},{"style":"Generic chatbot","x":4,"y":7},{"style":"Manual research","x":9,"y":4}]}}},{"text":"tamSamSomPage","image":{"type":"vision","style":"tamSamSomPage","data":{"tam":50000000000,"sam":12000000000,"som":3000000000,"notes":"Knowledge-heavy enterprises, academia, and media markets."}}},{"text":"marketDriversPage","image":{"type":"vision","style":"marketDriversPage","data":{"title":"Market Growth Drivers","drivers":["Regulatory push for provenance","Enterprise AI adoption","Cost pressure to automate reviews"]}}},{"text":"revenueModelPage","image":{"type":"vision","style":"revenueModelPage","data":{"streams":["Seats","Usage","Compliance add-on"],"pricingNotes":"Discounts for academic & nonprofit segments with strict compliance needs."}}},{"text":"costStructurePage","image":{"type":"vision","style":"costStructurePage","data":{"buckets":["Compute","Licenses","Storage","Review ops"],"fixedVsVariable":["Fixed: platform & storage","Variable: compute & review time"]}}},{"text":"orgChartPage","image":{"type":"vision","style":"orgChartPage","data":{"nodes":[{"id":"1","label":"Head of Knowledge Governance","parentId":""},{"id":"2","label":"AI Librarian","parentId":"1"},{"id":"3","label":"Compliance Reviewer","parentId":"1"}]}}},{"text":"capabilityMaturityPage","image":{"type":"vision","style":"capabilityMaturityPage","data":{"capabilities":[{"style":"Provenance capture","level":3},{"style":"Signing & verification","level":2},{"style":"Reviewer workflow","level":4}]}}},{"text":"techRoadmapPage","image":{"type":"vision","style":"techRoadmapPage","data":{"phases":["MVP","Scale","Certify"],"items":[{"phase":"MVP","label":"Governed RAG"},{"phase":"Scale","label":"Signed citations"},{"phase":"Certify","label":"External audits"}]}}},{"text":"digitalMaturityPage","image":{"type":"vision","style":"digitalMaturityPage","data":{"dimensions":["Data","Process","People","Tech"],"levels":[3,3,2,4],"notes":"Prioritize training and governance backlog."}}},{"text":"ecosystemMapPage","image":{"type":"vision","style":"ecosystemMapPage","data":{"categories":["Models","Content","Tooling","Auditors"],"entities":[{"category":"Models","style":"General LLMs"},{"category":"Content","style":"Licensed databases"},{"category":"Tooling","style":"Signing libraries"},{"category":"Auditors","style":"External firms"}]}}},{"text":"changeCurvePage","image":{"type":"vision","style":"changeCurvePage","data":{"stages":["Awareness","Understanding","Adoption","Advocacy"],"notes":"Evidence-first culture requires incentives and leadership modeling."}}},{"text":"communicationPlanPage","image":{"type":"vision","style":"communicationPlanPage","data":{"audiences":["Executives","Managers","Contributors"],"channels":["Town halls","Docs add-in tips","Slack nudges"],"cadence":"Bi-weekly updates for first two quarters"}}},{"text":"integrationPlanPage","image":{"type":"vision","style":"integrationPlanPage","data":{"workstreams":["Tech","Policy","Training","Ops"],"milestones":["MVP live","Org-wide training","Audit pilot"]}}},{"text":"benchmarkingTablePage","image":{"type":"vision","style":"benchmarkingTablePage","data":{"metrics":["Accuracy","Provenance","Latency","Cost"],"competitors":["Manual","Generic chatbot","Signed AI editor"]}}},{"text":"surveyResultsPage","image":{"type":"vision","style":"surveyResultsPage","data":{"questions":["Do you trust AI references?","Is evidence easy to review?"],"summaries":["Trust increased post-signing rollout.","Review time dropped by 35%."]}}},{"text":"personasPage","image":{"type":"vision","style":"personasPage","data":{"personas":[{"style":"Researcher","bio":"Synthesizes reports daily","needs":["Accurate citations","Deep sources"]},{"style":"Editor","bio":"Approves publications","needs":["Fast verification","Audit trail"]}]}}},{"text":"segmentationPage","image":{"type":"vision","style":"segmentationPage","data":{"segments":["Academic","Enterprise","Media"],"descriptors":["Risk tolerance","Compliance needs","Speed expectations"]}}},{"text":"pricingWaterfallPage","image":{"type":"vision","style":"pricingWaterfallPage","data":{"steps":[{"label":"List price","value":100},{"label":"Compliance discount","value":-15},{"label":"Volume discount","value":-10},{"label":"Final","value":75}]}}},{"text":"sensitivityAnalysisPage","image":{"type":"vision","style":"sensitivityAnalysisPage","data":{"variables":["Corpus coverage","Reviewer time","Compute cost"],"scenarios":["Best case","Expected","Stress"]}}},{"text":"pLBreakdownPage","image":{"type":"vision","style":"pLBreakdownPage","data":{"categories":["Revenue","COGS","Opex"],"values":[20,8,6]}}},{"text":"cashFlowPage","image":{"type":"vision","style":"cashFlowPage","data":{"inflows":[8,10,12,14],"outflows":[6,7,8,9]}}},{"text":"balanceSheetPage","image":{"type":"vision","style":"balanceSheetPage","data":{"assets":["Cash","Intangibles","Receivables"],"liabilities":["Deferred revenue","Accounts payable"],"equity":["Paid-in capital","Retained earnings"]}}},{"text":"shareholderValueTreePage","image":{"type":"vision","style":"shareholderValueTreePage","data":{"drivers":["Adoption","Retention","Compliance premium"]}}},{"text":"npvSummaryPage","image":{"type":"vision","style":"npvSummaryPage","data":{"npv":12500000,"assumptions":["3-year horizon","10% discount rate","Compliance uplift included"]}}},{"text":"scenarioPlanningPage","image":{"type":"vision","style":"scenarioPlanningPage","data":{"scenarios":["Tight regulation","Moderate","Self-regulation"],"impacts":["Higher audit cost","Balanced investment","Faster rollout"]}}},{"text":"complianceHeatmapPage","image":{"type":"vision","style":"complianceHeatmapPage","data":{"areas":["Copyright","Privacy","Disclosure"],"levels":["Green","Amber","Red"]}}},{"text":"esgFrameworkPage","image":{"type":"vision","style":"esgFrameworkPage","data":{"environmental":["Efficient compute","Green datacenters"],"social":["Source credit","Anti-bias reviews"],"governance":["Audit logs","Policy oversight"]}}},{"text":"csrInitiativesPage","image":{"type":"vision","style":"csrInitiativesPage","data":{"initiatives":["Open citations to public research","Academic partnerships"]}}},{"text":"sustainabilityRoadmapPage","image":{"type":"vision","style":"sustainabilityRoadmapPage","data":{"phases":["Measure","Reduce","Offset"],"actions":["Track energy per query","Optimize inference","Offset remaining"]}}},{"text":"circularEconomyMapPage","image":{"type":"vision","style":"circularEconomyMapPage","data":{"loops":["Data ingestion","Use","Feedback","Curation"]}}},{"text":"innovationFunnelPage","image":{"type":"vision","style":"innovationFunnelPage","data":{"stages":["Ideas","Prototypes","Pilots","Scale"],"counts":[120,24,8,3]}}},{"text":"productRoadmapPage","image":{"type":"vision","style":"productRoadmapPage","data":{"releases":["R1","R2","R3"],"items":[{"release":"R1","label":"Evidence panel"},{"release":"R2","label":"Signed citations"},{"release":"R3","label":"Reviewer automation"}]}}},{"text":"launchPlanPage","image":{"type":"vision","style":"launchPlanPage","data":{"workstreams":["Marketing","Sales","Success"],"milestones":["Beta cohort","GA","Case studies"],"risks":["Overpromise","Adoption lag","Change resistance"]}}},{"text":"pipelineFunnelPage","image":{"type":"vision","style":"pipelineFunnelPage","data":{"stages":["Leads","Qualified","Trials","Paid"],"values":[400,220,120,60]}}},{"text":"salesDashboardPage","image":{"type":"vision","style":"salesDashboardPage","data":{"metrics":["Win rate 32%","Cycle time 48d","Avg deal $85k"],"notes":"Education on value of signed references shortens cycles."}}},{"text":"marketingMixPage","image":{"type":"vision","style":"marketingMixPage","data":{"levers":["Content marketing","Compliance webinars","Partner co-sell","Analyst briefings"],"notes":"Lead with risk reduction and measurable trust."}}},{"text":"customerSuccessJourneyPage","image":{"type":"vision","style":"customerSuccessJourneyPage","data":{"stages":["Onboard","Adopt","Expand","Renew"],"metrics":["Time-to-value","Feature usage","CSAT","Renewal rate"]}}},{"text":"supportOrgModelPage","image":{"type":"vision","style":"supportOrgModelPage","data":{"tiers":["Tier 1","Tier 2","Tier 3"],"roles":["Agent","Specialist","Engineer"]}}},{"text":"partnershipMapPage","image":{"type":"vision","style":"partnershipMapPage","data":{"categories":["Licensing","Technology","Audit"],"partners":[{"style":"Content provider A","category":"Licensing"},{"style":"Signing toolkit B","category":"Technology"},{"style":"Audit firm C","category":"Audit"}]}}},{"text":"mAPipelinePage","image":{"type":"vision","style":"mAPipelinePage","data":{"stages":["Identify","Evaluate","Negotiate","Integrate"],"targets":["Evidence startup X","Audit SaaS Y"]}}},{"text":"synergyCapturePage","image":{"type":"vision","style":"synergyCapturePage","data":{"sources":["Cross-sell","Shared infra","Joint R&D"],"values":[4,1.5,2]}}},{"text":"cultureValuesPage","image":{"type":"vision","style":"cultureValuesPage","data":{"values":["Truth","Transparency","Accountability"],"behaviors":["Cite sources","Log context","Flag uncertainty"]}}},{"text":"thankYouContactPage","image":{"type":"vision","style":"thankYouContactPage","data":{"message":"Thank you!","style":"AI Referencing Taskforce","email":"references@company.example","url":"https://example.com/ai-references","qrImageUrl":"https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=https://example.com/ai-references"}}}]}\n` +
88
+ `{"$mulmocast":{"version":"1.1"},"lang":"en","title":"Sample Presentation","canvasSize":{"width":1536,"height":1024},"beats":[{"text":"sectionDividerSlide","image":{"type":"vision","style":"sectionDividerSlide","data":{"heading":"How AI Is Reshaping Referencing","subheading":"From sources to systems: reliability, traceability, and credit in the age of models"}}},{"text":"agendaSlide","image":{"type":"vision","style":"agendaSlide","data":{"title":"Agenda","items":["Executive summary","Reference reliability and hallucinations","Attribution and credit in AI workflows","Standards & compliance (academia, journalism, law)","Roadmap & recommendations"]}}},{"text":"executiveSummarySlide","image":{"type":"vision","style":"executiveSummarySlide","data":{"title":"Executive Summary","bullets":["AI accelerates discovery but introduces novel risks in citation accuracy and provenance.","RAG and structured retrieval reduce hallucinations when sources are governed and auditable.","Attribution standards are emerging; early adoption lowers legal and reputational exposure.","Watermarking and signed citations enable verifiable chains of reference.","Organizations need policy, training, and tooling to ensure traceable, compliant referencing."]}}},{"text":"keyMessageWithSupportsSlide","image":{"type":"vision","style":"keyMessageWithSupportsSlide","data":{"headline":"Trustworthy referencing is a prerequisite for AI at scale.","supports":["Stakeholders require verifiable provenance for critical decisions.","Standards (e.g., citations, licensing) are uneven across industries.","Tooling gaps persist between LLM outputs and enterprise compliance systems."]}}},{"text":"hypothesisSlide","image":{"type":"vision","style":"hypothesisSlide","data":{"hypothesis":"Firms that implement verifiable AI referencing will reduce risk and accelerate adoption.","implications":["Lower legal exposure on copyright and misinformation claims.","Faster audit cycles through machine-readable provenance.","Higher user confidence and usage in knowledge-heavy workflows."],"nextSteps":["Deploy governed retrieval with source whitelists.","Adopt signed citations and immutable logs for high-stakes outputs.","Train users on prompt patterns that preserve attribution."]}}},{"text":"issueTreeSlide","image":{"type":"vision","style":"issueTreeSlide","data":{"rootIssue":"How to ensure accurate, compliant AI referencing?","branches":[["Provenance capture","Source governance","Traceability"],["Legal & licensing","Attribution norms","Fair use boundaries"],["User behavior","Training & prompts","Review workflows"]]}}},{"text":"driverTreeSlide","image":{"type":"vision","style":"driverTreeSlide","data":{"metric":"Reference accuracy rate (%)","drivers":[["Governed corpus coverage","Retriever quality","Index freshness"],["Citation rendering logic","Signed-source support","Reviewer adherence"],["User prompt hygiene","Auto-evidence insertion","UI nudges"]]}}},{"text":"meceListSlide","image":{"type":"vision","style":"meceListSlide","data":{"title":"MECE: Reference Risk Areas","groups":[{"label":"Technical","items":["Hallucinations","Retriever gaps","Version drift"]},{"label":"Legal","items":["Copyright","Licensing","Privacy & PII"]},{"label":"Operational","items":["Review latency","Policy ambiguity","Training gaps"]}]}}},{"text":"pyramidPrincipleSlide","image":{"type":"vision","style":"pyramidPrincipleSlide","data":{"keyMessage":"Verifiable references unlock safe, scalable AI adoption.","supports":["Reduces legal and reputational risk","Improves stakeholder confidence","Shortens audit cycles"],"details":[["Use source whitelists","Track doc versions","Sign evidence blobs"],["Expose citations in UI","Link to canonical sources","Store prompts & context"],["Automate QA sampling","Monitor reference KPIs","Escalate anomalies"]]}}},{"text":"scqaSlide","image":{"type":"vision","style":"scqaSlide","data":{"situation":"Teams increasingly rely on AI to synthesize knowledge and draft outputs.","complication":"AI can misattribute or fabricate sources, risking credibility and compliance.","question":"How can we ensure references are accurate, traceable, and compliant?","answer":"Standardize governed retrieval, signed citations, and review workflows integrated into authoring tools."}}},{"text":"swotSlide","image":{"type":"vision","style":"swotSlide","data":{"strengths":["Speed of synthesis","Scalable drafting","Broad corpus reach"],"weaknesses":["Hallucinations","Opaque provenance","Reviewer overload"],"opportunities":["New evidence UX","Standardized attribution","Automated audits"],"threats":["Regulatory fines","Misinformation","IP disputes"]}}},{"text":"threeCSlide","image":{"type":"vision","style":"threeCSlide","data":{"company":["Commit to verifiable AI outputs","Invest in governed retrieval"],"customer":["Needs trustworthy citations","Wants explorable sources"],"competitor":["Adopting reference-safe workflows","Marketing 'trust' as a differentiator"]}}},{"text":"fourPSlide","image":{"type":"vision","style":"fourPSlide","data":{"product":["Reference-safe AI assistant","Evidence panel","Citation export"],"price":["Tiered by audit features","Enterprise compliance add-ons"],"place":["Browser extension","Docs add-in","APIs"],"promotion":["Risk reduction ROI","Case studies","Compliance partnerships"]}}},{"text":"sevenSSlide","image":{"type":"vision","style":"sevenSSlide","data":{"strategy":"Make 'trustworthy references' a core AI value prop","structure":"Central knowledge governance with federated champions","systems":"RAG, signing, audit logs integrated in content tools","sharedValues":"Truth, transparency, accountability","skills":"Prompting, retrieval tuning, compliance literacy","style":"Evidence-first culture","staff":"Knowledge stewards, AI librarians, compliance reviewers"}}},{"text":"valueChainSlide","image":{"type":"vision","style":"valueChainSlide","data":{"primary":["Ingestion","Indexing","Retrieval","Generation","Review","Publication"],"support":["Governance","Security","Compliance","Training","Monitoring"]}}},{"text":"porterFiveForcesSlide","image":{"type":"vision","style":"porterFiveForcesSlide","data":{"newEntrants":["AI-first doc tools","Verification startups"],"suppliers":["Model providers","Content licensors"],"buyers":["Enterprises","Universities","Newsrooms"],"substitutes":["Manual research","Traditional search-only"],"rivalry":["Platform ecosystems","Vertical specialists"]}}},{"text":"businessModelCanvasSlide","image":{"type":"vision","style":"businessModelCanvasSlide","data":{"blocks":{"Key Partners":["Model vendors","Content platforms","Auditors"],"Key Activities":["Indexing","Retrieval","Signing","QA"],"Key Resources":["Curated corpora","Embeddings index","Audit logs"],"Value Propositions":["Trustworthy AI outputs","Time saved","Reduced risk"],"Customer Relationships":["Embedded in workflows","SLAs"],"Channels":["Add-ins","APIs","Marketplace"],"Customer Segments":["Legal","Research","Editorial"],"Cost Structure":["Compute","Licenses","Review ops"],"Revenue Streams":["Seats","Usage","Compliance tier"]}}}},{"text":"customerJourneySlide","image":{"type":"vision","style":"customerJourneySlide","data":{"stages":["Discover","Draft","Verify","Publish","Audit"],"touchpoints":[["Search UI","Corpus filters"],["Editor plugin","Reference panel"],["Reviewer queue","Signed citations"],["Export formats","Permalinks"],["Randomized QA","Dashboards"]]}}},{"text":"stakeholderMapSlide","image":{"type":"vision","style":"stakeholderMapSlide","data":{"stakeholders":[{"style":"Legal","influence":9,"interest":8,"notes":"Reduce liability"},{"style":"Editorial","influence":7,"interest":9,"notes":"Protect credibility"},{"style":"Engineering","influence":8,"interest":7,"notes":"Build RAG & signing"},{"style":"End users","influence":6,"interest":10,"notes":"Need clarity & speed"}]}}},{"text":"raciSlide","image":{"type":"vision","style":"raciSlide","data":{"tasks":["Define policy","Implement RAG","Roll out training","Monitor KPIs"],"roles":["Legal","Engineering","L&D","Ops"],"assignments":[["A","R","C","I"],["C","A/R","I","I"],["I","C","A/R","I"],["C","R","I","A"]]}}},{"text":"okrKpiDashboardSlide","image":{"type":"vision","style":"okrKpiDashboardSlide","data":{"title":"Reference Quality KPIs","metrics":[{"label":"Reference accuracy","value":"97%","target":"≥95%","status":"On track"},{"label":"Signed citation coverage","value":"82%","target":"≥80%","status":"On track"},{"label":"Reviewer SLA","value":"4h","target":"≤6h","status":"On track"}]}}},{"text":"balancedScorecardSlide","image":{"type":"vision","style":"balancedScorecardSlide","data":{"perspectives":[{"style":"Financial","items":["Reduce rework costs","Avoid penalties"]},{"style":"Customer","items":["Trust score ↑","NPS ↑"]},{"style":"Internal","items":["QA automation","Corpus governance"]},{"style":"Learning & Growth","items":["Reviewer upskilling","Prompt playbooks"]}]}}},{"text":"quarterlyRoadmapSlide","image":{"type":"vision","style":"quarterlyRoadmapSlide","data":{"quarters":["Q1","Q2","Q3","Q4"],"items":[{"quarter":"Q1","label":"Policy & baseline KPIs"},{"quarter":"Q2","label":"Signed citations rollout"},{"quarter":"Q3","label":"Reviewer workflow automation"},{"quarter":"Q4","label":"External audits & certification"}]}}},{"text":"milestoneTimelineSlide","image":{"type":"vision","style":"milestoneTimelineSlide","data":{"title":"Implementation Timeline","milestones":[{"label":"Policy approved","date":"2025-02-01","notes":"Exec sign-off"},{"label":"RAG MVP live","date":"2025-04-15","notes":"Limited corpus"},{"label":"Signed citations","date":"2025-06-30","notes":"Tier-1 content"},{"label":"Audit-ready","date":"2025-09-30","notes":"Dashboards & sampling"}]}}},{"text":"ganttSimpleSlide","image":{"type":"vision","style":"ganttSimpleSlide","data":{"tasks":[{"style":"Policy drafting","start":"2025-01-05","end":"2025-02-01"},{"style":"RAG build","start":"2025-02-05","end":"2025-04-15"},{"style":"Signing & logs","start":"2025-04-01","end":"2025-06-30"},{"style":"Reviewer ops","start":"2025-05-15","end":"2025-08-01"}]}}},{"text":"waterfallSlide","image":{"type":"vision","style":"waterfallSlide","data":{"title":"Time Savings from AI Referencing (hrs/month)","steps":[{"label":"Baseline (manual search)","value":0},{"label":"RAG-enabled drafting","value":120},{"label":"Signed citations","value":160},{"label":"Automated QA","value":190}]}}},{"text":"funnelSlide","image":{"type":"vision","style":"funnelSlide","data":{"stages":[{"label":"Drafts created","value":1000},{"label":"Drafts with citations","value":850},{"label":"Signed citations","value":700},{"label":"Approved & published","value":630}]}}},{"text":"twoByTwoMatrixSlide","image":{"type":"vision","style":"twoByTwoMatrixSlide","data":{"xAxis":"Evidence depth","yAxis":"Ease of use","quadrants":[["Scholarly databases"],["AI assistants with signing"],["Raw web search"],["Legacy manual workflows"]]}}},{"text":"bcgMatrixSlide","image":{"type":"vision","style":"bcgMatrixSlide","data":{"stars":["Signed-citation AI editors"],"cashCows":["Governed enterprise search"],"questionMarks":["Generative browsers"],"dogs":["Unverified copy-paste tools"]}}},{"text":"geMcKinseyMatrixSlide","image":{"type":"vision","style":"geMcKinseyMatrixSlide","data":{"industryAttractiveness":["Regulatory clarity","IP-safe corpora","Audit tooling"],"competitiveStrength":["Corpus quality","Model integration","Compliance features"],"placements":[{"style":"Signed AI editor","row":0,"col":2},{"style":"Generic chatbot","row":1,"col":1},{"style":"Manual search","row":2,"col":0}]}}},{"text":"marimekkoPlaceholderSlide","image":{"type":"vision","style":"marimekkoPlaceholderSlide","data":{"title":"Content Types by Share & Effort","categories":["Academic","News","Internal docs","Web"]}}},{"text":"bubbleChartPlaceholderSlide","image":{"type":"vision","style":"bubbleChartPlaceholderSlide","data":{"title":"Risk vs Impact vs Adoption","points":[{"label":"Legal memos","x":8,"y":9,"r":20},{"label":"Blog posts","x":4,"y":5,"r":15},{"label":"Research briefs","x":7,"y":7,"r":18}]}}},{"text":"heatmapPlaceholderSlide","image":{"type":"vision","style":"heatmapPlaceholderSlide","data":{"rows":["Teams"],"cols":["Accuracy","Provenance","Speed","Compliance"],"values":[[8,7,9,6]]}}},{"text":"kpiHighlightSlide","image":{"type":"vision","style":"kpiHighlightSlide","data":{"title":"KPI Highlights","kpis":[{"label":"Reference Accuracy","value":"97%","delta":"+2pp"},{"label":"Signed Coverage","value":"82%","delta":"+5pp"},{"label":"Audit Exceptions","value":"1.2%","delta":"-0.4pp"}]}}},{"text":"beforeAfterSlide","image":{"type":"vision","style":"beforeAfterSlide","data":{"title":"Before vs After AI Referencing","before":["Manual searches","Inconsistent citations","Slow audits"],"after":["Governed retrieval","Standardized citations","Signed evidence"]}}},{"text":"optionEvaluationSlide","image":{"type":"vision","style":"optionEvaluationSlide","data":{"criteria":["Accuracy","Latency","Compliance","Cost"],"options":["Generic chatbot","RAG + signing","Manual review"],"scores":[[5,7,9,6],[8,7,9,7],[9,3,10,4]]}}},{"text":"riskMitigationSlide","image":{"type":"vision","style":"riskMitigationSlide","data":{"risks":[{"risk":"Misattribution","impact":"High","likelihood":"Medium","mitigation":"Signed citations + review"},{"risk":"Copyright claims","impact":"High","likelihood":"Low","mitigation":"Licensed corpora + filters"},{"risk":"PII leakage","impact":"High","likelihood":"Low","mitigation":"Redaction + policy"}]}}},{"text":"positioningMapSlide","image":{"type":"vision","style":"positioningMapSlide","data":{"xAxis":"Compliance readiness","yAxis":"User adoption","players":[{"style":"AI Editor (signed)","x":8,"y":8},{"style":"Generic chatbot","x":4,"y":7},{"style":"Manual research","x":9,"y":4}]}}},{"text":"tamSamSomSlide","image":{"type":"vision","style":"tamSamSomSlide","data":{"tam":50000000000,"sam":12000000000,"som":3000000000,"notes":"Knowledge-heavy enterprises, academia, and media markets."}}},{"text":"marketDriversSlide","image":{"type":"vision","style":"marketDriversSlide","data":{"title":"Market Growth Drivers","drivers":["Regulatory push for provenance","Enterprise AI adoption","Cost pressure to automate reviews"]}}},{"text":"revenueModelSlide","image":{"type":"vision","style":"revenueModelSlide","data":{"streams":["Seats","Usage","Compliance add-on"],"pricingNotes":"Discounts for academic & nonprofit segments with strict compliance needs."}}},{"text":"costStructureSlide","image":{"type":"vision","style":"costStructureSlide","data":{"buckets":["Compute","Licenses","Storage","Review ops"],"fixedVsVariable":["Fixed: platform & storage","Variable: compute & review time"]}}},{"text":"orgChartSlide","image":{"type":"vision","style":"orgChartSlide","data":{"nodes":[{"id":"1","label":"Head of Knowledge Governance","parentId":""},{"id":"2","label":"AI Librarian","parentId":"1"},{"id":"3","label":"Compliance Reviewer","parentId":"1"}]}}},{"text":"capabilityMaturitySlide","image":{"type":"vision","style":"capabilityMaturitySlide","data":{"capabilities":[{"style":"Provenance capture","level":3},{"style":"Signing & verification","level":2},{"style":"Reviewer workflow","level":4}]}}},{"text":"techRoadmapSlide","image":{"type":"vision","style":"techRoadmapSlide","data":{"phases":["MVP","Scale","Certify"],"items":[{"phase":"MVP","label":"Governed RAG"},{"phase":"Scale","label":"Signed citations"},{"phase":"Certify","label":"External audits"}]}}},{"text":"digitalMaturitySlide","image":{"type":"vision","style":"digitalMaturitySlide","data":{"dimensions":["Data","Process","People","Tech"],"levels":[3,3,2,4],"notes":"Prioritize training and governance backlog."}}},{"text":"ecosystemMapSlide","image":{"type":"vision","style":"ecosystemMapSlide","data":{"categories":["Models","Content","Tooling","Auditors"],"entities":[{"category":"Models","style":"General LLMs"},{"category":"Content","style":"Licensed databases"},{"category":"Tooling","style":"Signing libraries"},{"category":"Auditors","style":"External firms"}]}}},{"text":"changeCurveSlide","image":{"type":"vision","style":"changeCurveSlide","data":{"stages":["Awareness","Understanding","Adoption","Advocacy"],"notes":"Evidence-first culture requires incentives and leadership modeling."}}},{"text":"communicationPlanSlide","image":{"type":"vision","style":"communicationPlanSlide","data":{"audiences":["Executives","Managers","Contributors"],"channels":["Town halls","Docs add-in tips","Slack nudges"],"cadence":"Bi-weekly updates for first two quarters"}}},{"text":"integrationPlanSlide","image":{"type":"vision","style":"integrationPlanSlide","data":{"workstreams":["Tech","Policy","Training","Ops"],"milestones":["MVP live","Org-wide training","Audit pilot"]}}},{"text":"benchmarkingTableSlide","image":{"type":"vision","style":"benchmarkingTableSlide","data":{"metrics":["Accuracy","Provenance","Latency","Cost"],"competitors":["Manual","Generic chatbot","Signed AI editor"]}}},{"text":"surveyResultsSlide","image":{"type":"vision","style":"surveyResultsSlide","data":{"questions":["Do you trust AI references?","Is evidence easy to review?"],"summaries":["Trust increased post-signing rollout.","Review time dropped by 35%."]}}},{"text":"personasSlide","image":{"type":"vision","style":"personasSlide","data":{"personas":[{"style":"Researcher","bio":"Synthesizes reports daily","needs":["Accurate citations","Deep sources"]},{"style":"Editor","bio":"Approves publications","needs":["Fast verification","Audit trail"]}]}}},{"text":"segmentationSlide","image":{"type":"vision","style":"segmentationSlide","data":{"segments":["Academic","Enterprise","Media"],"descriptors":["Risk tolerance","Compliance needs","Speed expectations"]}}},{"text":"pricingWaterfallSlide","image":{"type":"vision","style":"pricingWaterfallSlide","data":{"steps":[{"label":"List price","value":100},{"label":"Compliance discount","value":-15},{"label":"Volume discount","value":-10},{"label":"Final","value":75}]}}},{"text":"sensitivityAnalysisSlide","image":{"type":"vision","style":"sensitivityAnalysisSlide","data":{"variables":["Corpus coverage","Reviewer time","Compute cost"],"scenarios":["Best case","Expected","Stress"]}}},{"text":"pLBreakdownSlide","image":{"type":"vision","style":"pLBreakdownSlide","data":{"categories":["Revenue","COGS","Opex"],"values":[20,8,6]}}},{"text":"cashFlowSlide","image":{"type":"vision","style":"cashFlowSlide","data":{"inflows":[8,10,12,14],"outflows":[6,7,8,9]}}},{"text":"balanceSheetSlide","image":{"type":"vision","style":"balanceSheetSlide","data":{"assets":["Cash","Intangibles","Receivables"],"liabilities":["Deferred revenue","Accounts payable"],"equity":["Paid-in capital","Retained earnings"]}}},{"text":"shareholderValueTreeSlide","image":{"type":"vision","style":"shareholderValueTreeSlide","data":{"drivers":["Adoption","Retention","Compliance premium"]}}},{"text":"npvSummarySlide","image":{"type":"vision","style":"npvSummarySlide","data":{"npv":12500000,"assumptions":["3-year horizon","10% discount rate","Compliance uplift included"]}}},{"text":"scenarioPlanningSlide","image":{"type":"vision","style":"scenarioPlanningSlide","data":{"scenarios":["Tight regulation","Moderate","Self-regulation"],"impacts":["Higher audit cost","Balanced investment","Faster rollout"]}}},{"text":"complianceHeatmapSlide","image":{"type":"vision","style":"complianceHeatmapSlide","data":{"areas":["Copyright","Privacy","Disclosure"],"levels":["Green","Amber","Red"]}}},{"text":"esgFrameworkSlide","image":{"type":"vision","style":"esgFrameworkSlide","data":{"environmental":["Efficient compute","Green datacenters"],"social":["Source credit","Anti-bias reviews"],"governance":["Audit logs","Policy oversight"]}}},{"text":"csrInitiativesSlide","image":{"type":"vision","style":"csrInitiativesSlide","data":{"initiatives":["Open citations to public research","Academic partnerships"]}}},{"text":"sustainabilityRoadmapSlide","image":{"type":"vision","style":"sustainabilityRoadmapSlide","data":{"phases":["Measure","Reduce","Offset"],"actions":["Track energy per query","Optimize inference","Offset remaining"]}}},{"text":"circularEconomyMapSlide","image":{"type":"vision","style":"circularEconomyMapSlide","data":{"loops":["Data ingestion","Use","Feedback","Curation"]}}},{"text":"innovationFunnelSlide","image":{"type":"vision","style":"innovationFunnelSlide","data":{"stages":["Ideas","Prototypes","Pilots","Scale"],"counts":[120,24,8,3]}}},{"text":"productRoadmapSlide","image":{"type":"vision","style":"productRoadmapSlide","data":{"releases":["R1","R2","R3"],"items":[{"release":"R1","label":"Evidence panel"},{"release":"R2","label":"Signed citations"},{"release":"R3","label":"Reviewer automation"}]}}},{"text":"launchPlanSlide","image":{"type":"vision","style":"launchPlanSlide","data":{"workstreams":["Marketing","Sales","Success"],"milestones":["Beta cohort","GA","Case studies"],"risks":["Overpromise","Adoption lag","Change resistance"]}}},{"text":"pipelineFunnelSlide","image":{"type":"vision","style":"pipelineFunnelSlide","data":{"stages":["Leads","Qualified","Trials","Paid"],"values":[400,220,120,60]}}},{"text":"salesDashboardSlide","image":{"type":"vision","style":"salesDashboardSlide","data":{"metrics":["Win rate 32%","Cycle time 48d","Avg deal $85k"],"notes":"Education on value of signed references shortens cycles."}}},{"text":"marketingMixSlide","image":{"type":"vision","style":"marketingMixSlide","data":{"levers":["Content marketing","Compliance webinars","Partner co-sell","Analyst briefings"],"notes":"Lead with risk reduction and measurable trust."}}},{"text":"customerSuccessJourneySlide","image":{"type":"vision","style":"customerSuccessJourneySlide","data":{"stages":["Onboard","Adopt","Expand","Renew"],"metrics":["Time-to-value","Feature usage","CSAT","Renewal rate"]}}},{"text":"supportOrgModelSlide","image":{"type":"vision","style":"supportOrgModelSlide","data":{"tiers":["Tier 1","Tier 2","Tier 3"],"roles":["Agent","Specialist","Engineer"]}}},{"text":"partnershipMapSlide","image":{"type":"vision","style":"partnershipMapSlide","data":{"categories":["Licensing","Technology","Audit"],"partners":[{"style":"Content provider A","category":"Licensing"},{"style":"Signing toolkit B","category":"Technology"},{"style":"Audit firm C","category":"Audit"}]}}},{"text":"mAPipelineSlide","image":{"type":"vision","style":"mAPipelineSlide","data":{"stages":["Identify","Evaluate","Negotiate","Integrate"],"targets":["Evidence startup X","Audit SaaS Y"]}}},{"text":"synergyCaptureSlide","image":{"type":"vision","style":"synergyCaptureSlide","data":{"sources":["Cross-sell","Shared infra","Joint R&D"],"values":[4,1.5,2]}}},{"text":"cultureValuesSlide","image":{"type":"vision","style":"cultureValuesSlide","data":{"values":["Truth","Transparency","Accountability"],"behaviors":["Cite sources","Log context","Flag uncertainty"]}}},{"text":"thankYouContactSlide","image":{"type":"vision","style":"thankYouContactSlide","data":{"message":"Thank you!","style":"AI Referencing Taskforce","email":"references@company.example","url":"https://example.com/ai-references","qrImageUrl":"https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=https://example.com/ai-references"}}}]}\n` +
85
89
  "```",
86
90
  };
package/lib/mcp/aaa.js CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- process.env.DOTENV_CONFIG_QUIET = 'true';
2
+ process.env.DOTENV_CONFIG_QUIET = "true";
3
3
  import dotenv from "dotenv";
4
4
  dotenv.config();
@@ -1,6 +1,11 @@
1
1
  import { MulmoBeat } from "../types/index.js";
2
2
  export declare const MulmoBeatMethods: {
3
3
  getHtmlPrompt(beat: MulmoBeat): string | undefined;
4
- getPlugin(beat: MulmoBeat): typeof import("../utils/image_plugins/text_slide.js") | typeof import("../utils/image_plugins/markdown.js") | typeof import("../utils/image_plugins/chart.js") | typeof import("../utils/image_plugins/mermaid.js") | typeof import("../utils/image_plugins/html_tailwind.js") | typeof import("../utils/image_plugins/image.js") | typeof import("../utils/image_plugins/movie.js") | typeof import("../utils/image_plugins/beat.js") | typeof import("../utils/image_plugins/voice_over.js") | typeof import("../utils/image_plugins/vision.js");
4
+ getPlugin(beat: MulmoBeat): {
5
+ imageType: string;
6
+ process: (params: import("../types/type.js").ImageProcessorParams) => Promise<string | undefined> | void;
7
+ path: (params: import("../types/type.js").ImageProcessorParams) => string | undefined;
8
+ markdown?: (params: import("../types/type.js").ImageProcessorParams) => string | undefined;
9
+ };
5
10
  getImageReferenceForImageGenerator(beat: MulmoBeat, imageRefs: Record<string, string>): string[];
6
11
  };
@@ -44,6 +44,17 @@ export type OpenAIImageAgentParams = ImageAgentParams & {
44
44
  moderation: OpenAIImageModeration | null | undefined;
45
45
  quality?: OpenAIImageQuality;
46
46
  };
47
+ export type ReplicateImageAgentParams = {
48
+ model: `${string}/${string}` | undefined;
49
+ canvasSize: {
50
+ width: number;
51
+ height: number;
52
+ };
53
+ aspectRatio?: string;
54
+ outputSize?: number;
55
+ steps?: number;
56
+ guidanceScale?: number;
57
+ };
47
58
  export type OpenAIImageAgentConfig = {
48
59
  baseURL?: string;
49
60
  apiKey?: string;
@@ -55,6 +66,7 @@ export type GoogleImageAgentConfig = {
55
66
  export type GenAIImageAgentConfig = {
56
67
  apiKey?: string;
57
68
  };
69
+ export type ReplicateImageAgentConfig = AgentConfig;
58
70
  export type MovieAgentInputs = AgentPromptInputs & {
59
71
  imagePath?: string;
60
72
  movieFile: string;
@@ -5777,8 +5777,10 @@ export declare const mulmoStudioBeatSchema: z.ZodObject<{
5777
5777
  lipSyncFile: z.ZodOptional<z.ZodString>;
5778
5778
  captionFile: z.ZodOptional<z.ZodString>;
5779
5779
  htmlImageFile: z.ZodOptional<z.ZodString>;
5780
+ markdown: z.ZodOptional<z.ZodString>;
5780
5781
  }, "strict", z.ZodTypeAny, {
5781
5782
  duration?: number | undefined;
5783
+ markdown?: string | undefined;
5782
5784
  id?: string | undefined;
5783
5785
  startAt?: number | undefined;
5784
5786
  hash?: string | undefined;
@@ -5795,6 +5797,7 @@ export declare const mulmoStudioBeatSchema: z.ZodObject<{
5795
5797
  htmlImageFile?: string | undefined;
5796
5798
  }, {
5797
5799
  duration?: number | undefined;
5800
+ markdown?: string | undefined;
5798
5801
  id?: string | undefined;
5799
5802
  startAt?: number | undefined;
5800
5803
  hash?: string | undefined;
@@ -6027,10 +6030,12 @@ export declare const mulmoSessionStateSchema: z.ZodObject<{
6027
6030
  multiLingual: z.ZodBoolean;
6028
6031
  caption: z.ZodBoolean;
6029
6032
  pdf: z.ZodBoolean;
6033
+ markdown: z.ZodBoolean;
6030
6034
  }, "strip", z.ZodTypeAny, {
6031
6035
  image: boolean;
6032
6036
  video: boolean;
6033
6037
  audio: boolean;
6038
+ markdown: boolean;
6034
6039
  pdf: boolean;
6035
6040
  multiLingual: boolean;
6036
6041
  caption: boolean;
@@ -6038,6 +6043,7 @@ export declare const mulmoSessionStateSchema: z.ZodObject<{
6038
6043
  image: boolean;
6039
6044
  video: boolean;
6040
6045
  audio: boolean;
6046
+ markdown: boolean;
6041
6047
  pdf: boolean;
6042
6048
  multiLingual: boolean;
6043
6049
  caption: boolean;
@@ -6078,6 +6084,7 @@ export declare const mulmoSessionStateSchema: z.ZodObject<{
6078
6084
  image: boolean;
6079
6085
  video: boolean;
6080
6086
  audio: boolean;
6087
+ markdown: boolean;
6081
6088
  pdf: boolean;
6082
6089
  multiLingual: boolean;
6083
6090
  caption: boolean;
@@ -6098,6 +6105,7 @@ export declare const mulmoSessionStateSchema: z.ZodObject<{
6098
6105
  image: boolean;
6099
6106
  video: boolean;
6100
6107
  audio: boolean;
6108
+ markdown: boolean;
6101
6109
  pdf: boolean;
6102
6110
  multiLingual: boolean;
6103
6111
  caption: boolean;
@@ -8479,8 +8487,10 @@ export declare const mulmoStudioSchema: z.ZodObject<{
8479
8487
  lipSyncFile: z.ZodOptional<z.ZodString>;
8480
8488
  captionFile: z.ZodOptional<z.ZodString>;
8481
8489
  htmlImageFile: z.ZodOptional<z.ZodString>;
8490
+ markdown: z.ZodOptional<z.ZodString>;
8482
8491
  }, "strict", z.ZodTypeAny, {
8483
8492
  duration?: number | undefined;
8493
+ markdown?: string | undefined;
8484
8494
  id?: string | undefined;
8485
8495
  startAt?: number | undefined;
8486
8496
  hash?: string | undefined;
@@ -8497,6 +8507,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
8497
8507
  htmlImageFile?: string | undefined;
8498
8508
  }, {
8499
8509
  duration?: number | undefined;
8510
+ markdown?: string | undefined;
8500
8511
  id?: string | undefined;
8501
8512
  startAt?: number | undefined;
8502
8513
  hash?: string | undefined;
@@ -8515,6 +8526,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
8515
8526
  }, "strict", z.ZodTypeAny, {
8516
8527
  beats: {
8517
8528
  duration?: number | undefined;
8529
+ markdown?: string | undefined;
8518
8530
  id?: string | undefined;
8519
8531
  startAt?: number | undefined;
8520
8532
  hash?: string | undefined;
@@ -8862,6 +8874,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
8862
8874
  }, {
8863
8875
  beats: {
8864
8876
  duration?: number | undefined;
8877
+ markdown?: string | undefined;
8865
8878
  id?: string | undefined;
8866
8879
  startAt?: number | undefined;
8867
8880
  hash?: string | undefined;
@@ -404,6 +404,7 @@ export const mulmoStudioBeatSchema = z
404
404
  lipSyncFile: z.string().optional(), // path to the lip sync file
405
405
  captionFile: z.string().optional(), // path to the caption image
406
406
  htmlImageFile: z.string().optional(), // path to the html image
407
+ markdown: z.string().optional(), // markdown string (alternative to image)
407
408
  })
408
409
  .strict();
409
410
  export const mulmoStudioMultiLingualDataSchema = z.object({
@@ -424,6 +425,7 @@ export const mulmoSessionStateSchema = z.object({
424
425
  multiLingual: z.boolean(),
425
426
  caption: z.boolean(),
426
427
  pdf: z.boolean(),
428
+ markdown: z.boolean(),
427
429
  }),
428
430
  inBeatSession: z.object({
429
431
  audio: z.record(z.string(), z.boolean()),
@@ -85,7 +85,7 @@ export type Text2HtmlAgentInfo = {
85
85
  };
86
86
  export type BeatMediaType = "movie" | "image";
87
87
  export type StoryToScriptGenerateMode = (typeof storyToScriptGenerateMode)[keyof typeof storyToScriptGenerateMode];
88
- export type SessionType = "audio" | "image" | "video" | "multiLingual" | "caption" | "pdf";
88
+ export type SessionType = "audio" | "image" | "video" | "multiLingual" | "caption" | "pdf" | "markdown";
89
89
  export type BeatSessionType = "audio" | "image" | "multiLingual" | "caption" | "movie" | "html" | "imageReference" | "soundEffect" | "lipSync";
90
90
  export type SessionProgressEvent = {
91
91
  kind: "session";
@@ -2,6 +2,7 @@ import type { MulmoStudioBeat, MulmoScript, MulmoPresentationStyle, MulmoStudioM
2
2
  export declare const createStudioData: (_mulmoScript: MulmoScript, fileName: string, videoCaptionLang?: string, presentationStyle?: MulmoPresentationStyle | null) => {
3
3
  beats: {
4
4
  duration?: number | undefined;
5
+ markdown?: string | undefined;
5
6
  id?: string | undefined;
6
7
  startAt?: number | undefined;
7
8
  hash?: string | undefined;
@@ -354,6 +355,7 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
354
355
  studio: {
355
356
  beats: {
356
357
  duration?: number | undefined;
358
+ markdown?: string | undefined;
357
359
  id?: string | undefined;
358
360
  startAt?: number | undefined;
359
361
  hash?: string | undefined;
@@ -831,6 +833,7 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
831
833
  multiLingual: boolean;
832
834
  caption: boolean;
833
835
  pdf: boolean;
836
+ markdown: boolean;
834
837
  };
835
838
  inBeatSession: {
836
839
  audio: {};
@@ -34,6 +34,7 @@ const initSessionState = () => {
34
34
  multiLingual: false,
35
35
  caption: false,
36
36
  pdf: false,
37
+ markdown: false,
37
38
  },
38
39
  inBeatSession: {
39
40
  audio: {},
@@ -1,3 +1,3 @@
1
1
  export declare const imageType = "image";
2
- export declare const process: (params: import("../../index.common.js").ImageProcessorParams) => string | undefined;
2
+ export declare const process: (params: import("../../index.common.js").ImageProcessorParams) => Promise<string | undefined>;
3
3
  export declare const path: (params: import("../../index.common.js").ImageProcessorParams) => string | undefined;
@@ -1,4 +1,4 @@
1
- import { processSource } from "./source.js";
1
+ import { processSource, pathSource } from "./source.js";
2
2
  export const imageType = "image";
3
3
  export const process = processSource(imageType);
4
- export const path = processSource(imageType);
4
+ export const path = pathSource(imageType);
@@ -1,11 +1,7 @@
1
- import * as pluginTextSlide from "./text_slide.js";
2
- import * as pluginMarkdown from "./markdown.js";
3
- import * as pluginChart from "./chart.js";
4
- import * as pluginMermaid from "./mermaid.js";
5
- import * as pluginHtmlTailwind from "./html_tailwind.js";
6
- import * as pluginImage from "./image.js";
7
- import * as pluginMovie from "./movie.js";
8
- import * as pluginBeat from "./beat.js";
9
- import * as pluginVoiceOver from "./voice_over.js";
10
- import * as pluginVision from "./vision.js";
11
- export declare const findImagePlugin: (imageType?: string) => typeof pluginTextSlide | typeof pluginMarkdown | typeof pluginChart | typeof pluginMermaid | typeof pluginHtmlTailwind | typeof pluginImage | typeof pluginMovie | typeof pluginBeat | typeof pluginVoiceOver | typeof pluginVision | undefined;
1
+ import { ImageProcessorParams } from "../../types/index.js";
2
+ export declare const findImagePlugin: (imageType?: string) => {
3
+ imageType: string;
4
+ process: (params: ImageProcessorParams) => Promise<string | undefined> | void;
5
+ path: (params: ImageProcessorParams) => string | undefined;
6
+ markdown?: (params: ImageProcessorParams) => string | undefined;
7
+ } | undefined;
@@ -8,18 +8,7 @@ import * as pluginMovie from "./movie.js";
8
8
  import * as pluginBeat from "./beat.js";
9
9
  import * as pluginVoiceOver from "./voice_over.js";
10
10
  import * as pluginVision from "./vision.js";
11
- const imagePlugins = [
12
- pluginTextSlide,
13
- pluginMarkdown,
14
- pluginImage,
15
- pluginChart,
16
- pluginMermaid,
17
- pluginMovie,
18
- pluginHtmlTailwind,
19
- pluginBeat,
20
- pluginVoiceOver,
21
- pluginVision,
22
- ];
11
+ const imagePlugins = [pluginTextSlide, pluginMarkdown, pluginImage, pluginChart, pluginMermaid, pluginMovie, pluginHtmlTailwind, pluginBeat, pluginVoiceOver, pluginVision];
23
12
  export const findImagePlugin = (imageType) => {
24
13
  return imagePlugins.find((plugin) => plugin.imageType === imageType);
25
14
  };
@@ -2,3 +2,4 @@ import { ImageProcessorParams } from "../../types/index.js";
2
2
  export declare const imageType = "markdown";
3
3
  export declare const process: (params: ImageProcessorParams) => Promise<string | undefined>;
4
4
  export declare const path: (params: ImageProcessorParams) => string;
5
+ export declare const markdown: (params: ImageProcessorParams) => string | undefined;
@@ -5,9 +5,16 @@ const processMarkdown = async (params) => {
5
5
  const { beat, imagePath, textSlideStyle, canvasSize } = params;
6
6
  if (!beat.image || beat.image.type !== imageType)
7
7
  return;
8
- const markdown = Array.isArray(beat.image.markdown) ? beat.image.markdown.join("\n") : beat.image.markdown;
8
+ const markdown = dumpMarkdown(params) ?? "";
9
9
  await renderMarkdownToImage(markdown, textSlideStyle, imagePath, canvasSize.width, canvasSize.height);
10
10
  return imagePath;
11
11
  };
12
+ const dumpMarkdown = (params) => {
13
+ const { beat } = params;
14
+ if (!beat.image || beat.image.type !== imageType)
15
+ return;
16
+ return Array.isArray(beat.image.markdown) ? beat.image.markdown.join("\n") : beat.image.markdown;
17
+ };
12
18
  export const process = processMarkdown;
13
19
  export const path = parrotingImagePath;
20
+ export const markdown = dumpMarkdown;
@@ -2,3 +2,4 @@ import { ImageProcessorParams } from "../../types/index.js";
2
2
  export declare const imageType = "mermaid";
3
3
  export declare const process: (params: ImageProcessorParams) => Promise<string | undefined>;
4
4
  export declare const path: (params: ImageProcessorParams) => string;
5
+ export declare const markdown: (params: ImageProcessorParams) => string | undefined;
@@ -19,5 +19,14 @@ const processMermaid = async (params) => {
19
19
  }
20
20
  return imagePath;
21
21
  };
22
+ const dumpMarkdown = (params) => {
23
+ const { beat } = params;
24
+ if (!beat.image || beat.image.type !== imageType)
25
+ return;
26
+ if (beat.image.code.kind !== "text")
27
+ return; // support only text for now
28
+ return `\`\`\`mermaid\n${beat.image.code.text}\n\`\`\``;
29
+ };
22
30
  export const process = processMermaid;
23
31
  export const path = parrotingImagePath;
32
+ export const markdown = dumpMarkdown;
@@ -1,3 +1,3 @@
1
1
  export declare const imageType = "movie";
2
- export declare const process: (params: import("../../index.common.js").ImageProcessorParams) => string | undefined;
2
+ export declare const process: (params: import("../../index.common.js").ImageProcessorParams) => Promise<string | undefined>;
3
3
  export declare const path: (params: import("../../index.common.js").ImageProcessorParams) => string | undefined;
@@ -1,4 +1,4 @@
1
- import { processSource } from "./source.js";
1
+ import { processSource, pathSource } from "./source.js";
2
2
  export const imageType = "movie";
3
3
  export const process = processSource(imageType);
4
- export const path = processSource(imageType);
4
+ export const path = pathSource(imageType);
@@ -1,4 +1,5 @@
1
1
  import { ImageProcessorParams } from "../../types/index.js";
2
2
  type ImageType = "image" | "movie";
3
- export declare const processSource: (imageType: ImageType) => (params: ImageProcessorParams) => string | undefined;
3
+ export declare const processSource: (imageType: ImageType) => (params: ImageProcessorParams) => Promise<string | undefined>;
4
+ export declare const pathSource: (__: ImageType) => (params: ImageProcessorParams) => string | undefined;
4
5
  export {};
@@ -1,10 +1,28 @@
1
+ import fs from "fs";
1
2
  import { GraphAILogger } from "graphai";
2
3
  import { MulmoMediaSourceMethods } from "../../methods/mulmo_media_source.js";
4
+ function fixExtention(path, imageType) {
5
+ if (imageType === "movie") {
6
+ return path.replace(/\.png$/, ".mov");
7
+ }
8
+ return path;
9
+ }
3
10
  export const processSource = (imageType) => {
4
- return (params) => {
11
+ return async (params) => {
5
12
  const { beat, context } = params;
6
13
  if (!beat?.image || beat.image.type !== imageType)
7
14
  return;
15
+ if (beat.image.source.kind === "url") {
16
+ const response = await fetch(beat.image.source.url);
17
+ if (!response.ok) {
18
+ throw new Error(`Failed to download image: ${beat.image.source.url}`);
19
+ }
20
+ const buffer = Buffer.from(await response.arrayBuffer());
21
+ // Detect file extension from Content-Type header or URL
22
+ const imagePath = fixExtention(params.imagePath, beat.image.type);
23
+ await fs.promises.writeFile(imagePath, buffer);
24
+ return imagePath;
25
+ }
8
26
  const path = MulmoMediaSourceMethods.resolve(beat.image.source, context);
9
27
  if (path) {
10
28
  return path;
@@ -13,3 +31,18 @@ export const processSource = (imageType) => {
13
31
  throw new Error(`ERROR: unknown ${imageType} source type`);
14
32
  };
15
33
  };
34
+ export const pathSource = (__) => {
35
+ return (params) => {
36
+ const { beat, context } = params;
37
+ if (beat.image?.type == "image" || beat.image?.type == "movie") {
38
+ if (beat.image.source?.kind === "url") {
39
+ return fixExtention(params.imagePath, beat.image.type);
40
+ }
41
+ const path = MulmoMediaSourceMethods.resolve(beat.image.source, context);
42
+ if (path) {
43
+ return path;
44
+ }
45
+ return undefined;
46
+ }
47
+ };
48
+ };
@@ -2,3 +2,4 @@ import { ImageProcessorParams } from "../../types/index.js";
2
2
  export declare const imageType = "textSlide";
3
3
  export declare const process: (params: ImageProcessorParams) => Promise<string | undefined>;
4
4
  export declare const path: (params: ImageProcessorParams) => string;
5
+ export declare const markdown: (params: ImageProcessorParams) => string | undefined;
@@ -6,7 +6,7 @@ const processTextSlide = async (params) => {
6
6
  if (!beat.image || beat.image.type !== imageType)
7
7
  return;
8
8
  const slide = beat.image.slide;
9
- const markdown = `# ${slide.title}\n` + (slide.subtitle ? `## ${slide.subtitle}\n` : "") + (slide.bullets ?? []).map((text) => `- ${text}`).join("\n");
9
+ const markdown = dumpMarkdown(params) ?? "";
10
10
  const topMargin = (() => {
11
11
  if (slide.bullets?.length && slide.bullets.length > 0) {
12
12
  return "";
@@ -17,5 +17,16 @@ const processTextSlide = async (params) => {
17
17
  await renderMarkdownToImage(markdown, textSlideStyle + topMargin, imagePath, canvasSize.width, canvasSize.height);
18
18
  return imagePath;
19
19
  };
20
+ const dumpMarkdown = (params) => {
21
+ const { beat } = params;
22
+ if (!beat.image || beat.image.type !== imageType)
23
+ return;
24
+ const slide = beat.image.slide;
25
+ const titleString = slide.title ? `# ${slide.title}\n` : "";
26
+ const subtitleString = slide.subtitle ? `## ${slide.subtitle}\n` : "";
27
+ const bulletsString = (slide.bullets ?? []).map((text) => `- ${text}`).join("\n");
28
+ return `${titleString}${subtitleString}${bulletsString}`;
29
+ };
20
30
  export const process = processTextSlide;
21
31
  export const path = parrotingImagePath;
32
+ export const markdown = dumpMarkdown;