invos 1.0.0
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/README.md +39 -0
- package/bin/invos.js +78 -0
- package/kit/.agents/skills/apple/DESCRIPTION.md +2 -0
- package/kit/.agents/skills/apple/apple-notes/SKILL.md +90 -0
- package/kit/.agents/skills/apple/apple-reminders/SKILL.md +130 -0
- package/kit/.agents/skills/audit/SKILL.md +177 -0
- package/kit/.agents/skills/design-marca/SKILL.md +92 -0
- package/kit/.agents/skills/humanizer/SKILL.md +476 -0
- package/kit/.agents/skills/instagram-carrossel/SKILL.md +79 -0
- package/kit/.agents/skills/instagram-carrossel/references/fetch-assets.md +77 -0
- package/kit/.agents/skills/instagram-carrossel/references/publish.md +48 -0
- package/kit/.agents/skills/instagram-carrossel/references/render-png.md +147 -0
- package/kit/.agents/skills/instagram-carrossel/scripts/publish.js +165 -0
- package/kit/.agents/skills/llm-wiki/SKILL.md +507 -0
- package/kit/.agents/skills/onboard/SKILL.md +152 -0
- package/kit/.agents/skills/pd-ikigai/SKILL.md +269 -0
- package/kit/.agents/skills/popular-web-designs/SKILL.md +214 -0
- package/kit/.agents/skills/popular-web-designs/templates/airbnb.md +259 -0
- package/kit/.agents/skills/popular-web-designs/templates/airtable.md +102 -0
- package/kit/.agents/skills/popular-web-designs/templates/apple.md +326 -0
- package/kit/.agents/skills/popular-web-designs/templates/bmw.md +193 -0
- package/kit/.agents/skills/popular-web-designs/templates/cal.md +272 -0
- package/kit/.agents/skills/popular-web-designs/templates/claude.md +325 -0
- package/kit/.agents/skills/popular-web-designs/templates/clay.md +317 -0
- package/kit/.agents/skills/popular-web-designs/templates/clickhouse.md +294 -0
- package/kit/.agents/skills/popular-web-designs/templates/cohere.md +279 -0
- package/kit/.agents/skills/popular-web-designs/templates/coinbase.md +142 -0
- package/kit/.agents/skills/popular-web-designs/templates/composio.md +320 -0
- package/kit/.agents/skills/popular-web-designs/templates/cursor.md +322 -0
- package/kit/.agents/skills/popular-web-designs/templates/elevenlabs.md +278 -0
- package/kit/.agents/skills/popular-web-designs/templates/expo.md +294 -0
- package/kit/.agents/skills/popular-web-designs/templates/figma.md +233 -0
- package/kit/.agents/skills/popular-web-designs/templates/framer.md +259 -0
- package/kit/.agents/skills/popular-web-designs/templates/hashicorp.md +291 -0
- package/kit/.agents/skills/popular-web-designs/templates/ibm.md +345 -0
- package/kit/.agents/skills/popular-web-designs/templates/intercom.md +159 -0
- package/kit/.agents/skills/popular-web-designs/templates/kraken.md +138 -0
- package/kit/.agents/skills/popular-web-designs/templates/linear.app.md +380 -0
- package/kit/.agents/skills/popular-web-designs/templates/lovable.md +311 -0
- package/kit/.agents/skills/popular-web-designs/templates/minimax.md +270 -0
- package/kit/.agents/skills/popular-web-designs/templates/mintlify.md +339 -0
- package/kit/.agents/skills/popular-web-designs/templates/miro.md +121 -0
- package/kit/.agents/skills/popular-web-designs/templates/mistral.ai.md +274 -0
- package/kit/.agents/skills/popular-web-designs/templates/mongodb.md +279 -0
- package/kit/.agents/skills/popular-web-designs/templates/notion.md +322 -0
- package/kit/.agents/skills/popular-web-designs/templates/nvidia.md +306 -0
- package/kit/.agents/skills/popular-web-designs/templates/ollama.md +280 -0
- package/kit/.agents/skills/popular-web-designs/templates/opencode.ai.md +294 -0
- package/kit/.agents/skills/popular-web-designs/templates/pinterest.md +243 -0
- package/kit/.agents/skills/popular-web-designs/templates/posthog.md +269 -0
- package/kit/.agents/skills/popular-web-designs/templates/raycast.md +281 -0
- package/kit/.agents/skills/popular-web-designs/templates/replicate.md +274 -0
- package/kit/.agents/skills/popular-web-designs/templates/resend.md +316 -0
- package/kit/.agents/skills/popular-web-designs/templates/revolut.md +198 -0
- package/kit/.agents/skills/popular-web-designs/templates/runwayml.md +257 -0
- package/kit/.agents/skills/popular-web-designs/templates/sanity.md +370 -0
- package/kit/.agents/skills/popular-web-designs/templates/sentry.md +275 -0
- package/kit/.agents/skills/popular-web-designs/templates/spacex.md +207 -0
- package/kit/.agents/skills/popular-web-designs/templates/spotify.md +259 -0
- package/kit/.agents/skills/popular-web-designs/templates/stripe.md +335 -0
- package/kit/.agents/skills/popular-web-designs/templates/supabase.md +268 -0
- package/kit/.agents/skills/popular-web-designs/templates/superhuman.md +265 -0
- package/kit/.agents/skills/popular-web-designs/templates/together.ai.md +276 -0
- package/kit/.agents/skills/popular-web-designs/templates/uber.md +308 -0
- package/kit/.agents/skills/popular-web-designs/templates/vercel.md +323 -0
- package/kit/.agents/skills/popular-web-designs/templates/voltagent.md +336 -0
- package/kit/.agents/skills/popular-web-designs/templates/warp.md +266 -0
- package/kit/.agents/skills/popular-web-designs/templates/webflow.md +105 -0
- package/kit/.agents/skills/popular-web-designs/templates/wise.md +186 -0
- package/kit/.agents/skills/popular-web-designs/templates/x.ai.md +270 -0
- package/kit/.agents/skills/popular-web-designs/templates/zapier.md +341 -0
- package/kit/.agents/skills/productivity/DESCRIPTION.md +3 -0
- package/kit/.agents/skills/productivity/google-workspace/SKILL.md +335 -0
- package/kit/.agents/skills/productivity/google-workspace/references/gmail-search-syntax.md +63 -0
- package/kit/.agents/skills/productivity/google-workspace/scripts/_hermes_home.py +42 -0
- package/kit/.agents/skills/productivity/google-workspace/scripts/google_api.py +1225 -0
- package/kit/.agents/skills/productivity/google-workspace/scripts/gws_bridge.py +111 -0
- package/kit/.agents/skills/productivity/google-workspace/scripts/setup.py +481 -0
- package/kit/.agents/skills/productivity/nano-pdf/SKILL.md +52 -0
- package/kit/.agents/skills/productivity/notion/SKILL.md +448 -0
- package/kit/.agents/skills/productivity/notion/references/block-types.md +112 -0
- package/kit/.agents/skills/productivity/ocr-and-documents/DESCRIPTION.md +3 -0
- package/kit/.agents/skills/productivity/ocr-and-documents/SKILL.md +172 -0
- package/kit/.agents/skills/productivity/ocr-and-documents/scripts/extract_marker.py +87 -0
- package/kit/.agents/skills/productivity/ocr-and-documents/scripts/extract_pymupdf.py +98 -0
- package/kit/.agents/skills/productivity/powerpoint/LICENSE.txt +30 -0
- package/kit/.agents/skills/productivity/powerpoint/SKILL.md +237 -0
- package/kit/.agents/skills/productivity/powerpoint/editing.md +205 -0
- package/kit/.agents/skills/productivity/powerpoint/pptxgenjs.md +420 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/__init__.py +0 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/add_slide.py +195 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/clean.py +286 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/helpers/__init__.py +0 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/helpers/merge_runs.py +199 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/helpers/simplify_redlines.py +197 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/pack.py +159 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-contentTypes.xsd +42 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-coreProperties.xsd +50 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-digSig.xsd +49 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-relationships.xsd +33 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/mce/mc.xsd +75 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/kit/.agents/skills/proposta/SKILL.md +159 -0
- package/kit/.agents/skills/proposta/references/proposta-avancada.md +17 -0
- package/kit/.agents/skills/proposta/references/proposta.html +187 -0
- package/kit/.agents/skills/session-checkpoint/SKILL.md +80 -0
- package/kit/.agents/skills/session-end/SKILL.md +166 -0
- package/kit/.agents/skills/session-start/SKILL.md +149 -0
- package/kit/.agents/skills/social-content/SKILL.md +119 -0
- package/kit/.agents/skills/stop-slop/CHANGELOG.md +24 -0
- package/kit/.agents/skills/stop-slop/LICENSE +21 -0
- package/kit/.agents/skills/stop-slop/README.md +62 -0
- package/kit/.agents/skills/stop-slop/SKILL.md +68 -0
- package/kit/.agents/skills/stop-slop/references/examples.md +59 -0
- package/kit/.agents/skills/stop-slop/references/phrases.md +128 -0
- package/kit/.agents/skills/stop-slop/references/structures.md +134 -0
- package/kit/.agents/squads/advisory-board/README.md +34 -0
- package/kit/.agents/squads/advisory-board/agents/board-chair.md +161 -0
- package/kit/.agents/squads/advisory-board/agents/brene-brown.md +296 -0
- package/kit/.agents/squads/advisory-board/agents/charlie-munger.md +590 -0
- package/kit/.agents/squads/advisory-board/agents/derek-sivers.md +268 -0
- package/kit/.agents/squads/advisory-board/agents/naval-ravikant.md +251 -0
- package/kit/.agents/squads/advisory-board/agents/patrick-lencioni.md +394 -0
- package/kit/.agents/squads/advisory-board/agents/peter-thiel.md +269 -0
- package/kit/.agents/squads/advisory-board/agents/ray-dalio.md +587 -0
- package/kit/.agents/squads/advisory-board/agents/reid-hoffman.md +278 -0
- package/kit/.agents/squads/advisory-board/agents/simon-sinek.md +291 -0
- package/kit/.agents/squads/advisory-board/agents/yvon-chouinard.md +275 -0
- package/kit/.agents/squads/advisory-board/checklists/output-quality.md +73 -0
- package/kit/.agents/squads/advisory-board/config/config.yaml +67 -0
- package/kit/.agents/squads/advisory-board/data/mental-models-catalog.yaml +178 -0
- package/kit/.agents/squads/advisory-board/data/routing-catalog.yaml +89 -0
- package/kit/.agents/squads/advisory-board/squad.yaml +50 -0
- package/kit/.agents/squads/advisory-board/tasks/convene-board.md +152 -0
- package/kit/.agents/squads/advisory-board/tasks/diagnose.md +138 -0
- package/kit/.agents/squads/advisory-board/tasks/evaluate-scaling.md +165 -0
- package/kit/.agents/squads/advisory-board/tasks/get-founder-counsel.md +169 -0
- package/kit/.agents/squads/advisory-board/tasks/resolve-culture-crisis.md +164 -0
- package/kit/.agents/squads/advisory-board/tasks/review.md +133 -0
- package/kit/.agents/squads/advisory-board/tasks/seek-investment-counsel.md +161 -0
- package/kit/.agents/squads/advisory-board/workflows/wf-board-meeting.yaml +115 -0
- package/kit/.agents/squads/advisory-board/workflows/wf-decision-framework.yaml +135 -0
- package/kit/.agents/squads/brand/README.md +179 -0
- package/kit/.agents/squads/brand/agents/alexandra-watkins.md +1869 -0
- package/kit/.agents/squads/brand/agents/april-dunford.md +1781 -0
- package/kit/.agents/squads/brand/agents/brand-chief.md +600 -0
- package/kit/.agents/squads/brand/agents/emily-heyward.md +1685 -0
- package/kit/.agents/squads/brand/agents/marty-neumeier.md +1642 -0
- package/kit/.agents/squads/brand/agents/michael-johnson.md +1814 -0
- package/kit/.agents/squads/brand/agents/sagi-haviv.md +2025 -0
- package/kit/.agents/squads/brand/checklists/brand-book-checklist.md +31 -0
- package/kit/.agents/squads/brand/checklists/brand-launch-checklist.md +52 -0
- package/kit/.agents/squads/brand/checklists/brand-strategy-checklist.md +45 -0
- package/kit/.agents/squads/brand/checklists/naming-checklist.md +48 -0
- package/kit/.agents/squads/brand/checklists/positioning-checklist.md +48 -0
- package/kit/.agents/squads/brand/checklists/smoke-tests.md +180 -0
- package/kit/.agents/squads/brand/checklists/visual-identity-checklist.md +61 -0
- package/kit/.agents/squads/brand/config.yaml +135 -0
- package/kit/.agents/squads/brand/data/brand-archetypes.md +135 -0
- package/kit/.agents/squads/brand/data/brand-audit-methodology.md +99 -0
- package/kit/.agents/squads/brand/data/brand-pantheon.md +61 -0
- package/kit/.agents/squads/brand/data/brand-voice-matrix.md +92 -0
- package/kit/.agents/squads/brand/data/color-psychology.md +125 -0
- package/kit/.agents/squads/brand/squad.yaml +123 -0
- package/kit/.agents/squads/brand/tasks/brand-audit.md +150 -0
- package/kit/.agents/squads/brand/tasks/brand-book-creation.md +136 -0
- package/kit/.agents/squads/brand/tasks/brand-diagnosis.md +135 -0
- package/kit/.agents/squads/brand/tasks/brand-touchpoint-audit.md +100 -0
- package/kit/.agents/squads/brand/tasks/coherence-check.md +132 -0
- package/kit/.agents/squads/brand/tasks/logo-evaluation.md +103 -0
- package/kit/.agents/squads/brand/tasks/movement-architecture.md +136 -0
- package/kit/.agents/squads/brand/tasks/naming-exercise.md +134 -0
- package/kit/.agents/squads/brand/tasks/positioning-exercise.md +146 -0
- package/kit/.agents/squads/brand/tasks/research-references.md +225 -0
- package/kit/.agents/squads/brand/tasks/visual-identity-brief.md +134 -0
- package/kit/.agents/squads/brand/templates/brand-book-tmpl.md +148 -0
- package/kit/.agents/squads/brand/templates/brand-soul-canvas-tmpl.md +80 -0
- package/kit/.agents/squads/brand/templates/naming-brief-tmpl.md +83 -0
- package/kit/.agents/squads/brand/templates/positioning-canvas-tmpl.md +60 -0
- package/kit/.agents/squads/brand/templates/visual-identity-brief-tmpl.md +109 -0
- package/kit/.agents/squads/brand/workflows/wf-brand-audit.yaml +148 -0
- package/kit/.agents/squads/brand/workflows/wf-brand-from-zero.yaml +229 -0
- package/kit/.agents/squads/brand/workflows/wf-brief-to-references.yaml +141 -0
- package/kit/.agents/squads/hormozi-squad/README.md +25 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-ads.md +159 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-advisor.md +178 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-audit.md +178 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-chief.md +121 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-closer.md +179 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-content.md +166 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-copy.md +152 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-hooks.md +177 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-launch.md +160 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-leads.md +198 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-models.md +191 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-offers.md +197 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-pricing.md +151 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-retention.md +166 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-scale.md +175 -0
- package/kit/.agents/squads/hormozi-squad/agents/hormozi-workshop.md +160 -0
- package/kit/.agents/squads/hormozi-squad/checklists/output-quality.md +71 -0
- package/kit/.agents/squads/hormozi-squad/config/config.yaml +183 -0
- package/kit/.agents/squads/hormozi-squad/data/hormozi-frameworks.yaml +105 -0
- package/kit/.agents/squads/hormozi-squad/data/routing-catalog.yaml +94 -0
- package/kit/.agents/squads/hormozi-squad/squad.yaml +60 -0
- package/kit/.agents/squads/hormozi-squad/tasks/audit-business.md +186 -0
- package/kit/.agents/squads/hormozi-squad/tasks/close-sale.md +179 -0
- package/kit/.agents/squads/hormozi-squad/tasks/create-hooks.md +159 -0
- package/kit/.agents/squads/hormozi-squad/tasks/create-offer.md +178 -0
- package/kit/.agents/squads/hormozi-squad/tasks/design-workshop.md +192 -0
- package/kit/.agents/squads/hormozi-squad/tasks/diagnose.md +166 -0
- package/kit/.agents/squads/hormozi-squad/tasks/generate-leads.md +187 -0
- package/kit/.agents/squads/hormozi-squad/tasks/plan-launch.md +179 -0
- package/kit/.agents/squads/hormozi-squad/tasks/review.md +133 -0
- package/kit/.agents/squads/hormozi-squad/tasks/set-pricing.md +167 -0
- package/kit/.agents/squads/hormozi-squad/workflows/wf-business-turnaround.yaml +104 -0
- package/kit/.agents/squads/hormozi-squad/workflows/wf-offer-creation.yaml +105 -0
- package/kit/.agents/squads/index.md +14 -0
- package/kit/.agents/squads/instagram-carrossel/DEPENDENCIES.md +75 -0
- package/kit/.agents/squads/instagram-carrossel/README.md +52 -0
- package/kit/.agents/squads/instagram-carrossel/RUN.md +115 -0
- package/kit/.agents/squads/instagram-carrossel/_memory/memories.md +16 -0
- package/kit/.agents/squads/instagram-carrossel/agents/copywriter/tasks/create-slides.md +96 -0
- package/kit/.agents/squads/instagram-carrossel/agents/copywriter/tasks/generate-angles.md +111 -0
- package/kit/.agents/squads/instagram-carrossel/agents/copywriter/tasks/optimize-copy.md +81 -0
- package/kit/.agents/squads/instagram-carrossel/agents/copywriter.custom.md +73 -0
- package/kit/.agents/squads/instagram-carrossel/agents/image-designer/tasks/create-slides.md +132 -0
- package/kit/.agents/squads/instagram-carrossel/agents/image-designer/tasks/propose-visual-identities.md +89 -0
- package/kit/.agents/squads/instagram-carrossel/agents/image-designer/tasks/render-export.md +100 -0
- package/kit/.agents/squads/instagram-carrossel/agents/image-designer.custom.md +47 -0
- package/kit/.agents/squads/instagram-carrossel/agents/publisher/tasks/validate-publish.md +50 -0
- package/kit/.agents/squads/instagram-carrossel/agents/publisher.custom.md +26 -0
- package/kit/.agents/squads/instagram-carrossel/agents/researcher/tasks/find-and-rank-news.md +105 -0
- package/kit/.agents/squads/instagram-carrossel/agents/researcher.custom.md +46 -0
- package/kit/.agents/squads/instagram-carrossel/agents/reviewer/tasks/generate-feedback.md +91 -0
- package/kit/.agents/squads/instagram-carrossel/agents/reviewer/tasks/score-content.md +103 -0
- package/kit/.agents/squads/instagram-carrossel/agents/reviewer.custom.md +53 -0
- package/kit/.agents/squads/instagram-carrossel/output/.gitkeep +0 -0
- package/kit/.agents/squads/instagram-carrossel/output/slides/.gitkeep +0 -0
- package/kit/.agents/squads/instagram-carrossel/output/slides/rendered/.gitkeep +0 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/data/anti-patterns.md +125 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/data/domain-framework.md +92 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/data/instagram-feed-best-practices.md +235 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/data/output-examples.md +244 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/data/quality-criteria.md +120 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/data/research-brief.md +135 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/data/tone-of-voice.md +32 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/pipeline.yaml +136 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-01-input-content.md +38 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-02-find-news.md +42 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-03-select-story.md +59 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-04-generate-angles.md +45 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-05-select-angle.md +64 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-06-create-copy.md +51 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-07-approve-copy.md +52 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-08-propose-visuals.md +42 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-09-select-visual.md +61 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-10-create-slides.md +55 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-11-approve-images.md +60 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-12-review.md +55 -0
- package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-13-publish.md +79 -0
- package/kit/.agents/squads/instagram-carrossel/squad-party.csv +6 -0
- package/kit/.agents/squads/instagram-carrossel/squad.yaml +70 -0
- package/kit/AGENTS.md +175 -0
- package/kit/CLAUDE.md +1 -0
- package/kit/COMECE-AQUI.md +207 -0
- package/kit/INVOS.json +37 -0
- package/kit/MEMORY.md +31 -0
- package/kit/README.md +434 -0
- package/kit/SECURITY.md +39 -0
- package/kit/clientes/README.md +72 -0
- package/kit/clientes/_index.md +32 -0
- package/kit/clientes/_template/arquivos/.gitkeep +0 -0
- package/kit/clientes/_template/contexto.md +21 -0
- package/kit/clientes/_template/entregas.md +20 -0
- package/kit/clientes/_template/perfil.md +47 -0
- package/kit/clientes/_template/propostas/.gitkeep +0 -0
- package/kit/conteudo/README.md +12 -0
- package/kit/conteudo/_fila.md +12 -0
- package/kit/conteudo/carrosseis/.gitkeep +0 -0
- package/kit/conteudo/publicados/.gitkeep +0 -0
- package/kit/docs/audit-enxugamento-sieve.md +187 -0
- package/kit/docs/cli.md +62 -0
- package/kit/docs/hotmart-webhook.md +96 -0
- package/kit/docs/lab-user.md +35 -0
- package/kit/docs/prd-invos-cli.md +264 -0
- package/kit/integracoes/README.md +31 -0
- package/kit/integracoes/composio/README.md +128 -0
- package/kit/integracoes/composio/marketing-tools.md +61 -0
- package/kit/marca/README.md +13 -0
- package/kit/marca/assets/.gitkeep +0 -0
- package/kit/marca/marca.md +57 -0
- package/kit/memoria/ativo.md +18 -0
- package/kit/memoria/decisoes.md +26 -0
- package/kit/memoria/empresa.md +46 -0
- package/kit/memoria/historico/README.md +8 -0
- package/kit/memoria/insights.md +11 -0
- package/kit/memoria/perfil.md +29 -0
- package/kit/memoria/projetos.md +27 -0
- package/kit/memoria/regras/_TEMPLATE-exemplo.md +15 -0
- package/kit/memoria/regras/task-com-dono.md +18 -0
- package/kit/scripts/smoke-estado.sh +32 -0
- package/kit/scripts/validar.sh +206 -0
- package/package.json +43 -0
- package/src/commands/doctor.js +104 -0
- package/src/commands/init.js +44 -0
- package/src/commands/install.js +41 -0
- package/src/commands/update.js +113 -0
- package/src/lock.js +47 -0
- package/src/manifest.js +10 -0
- package/src/resolve-kit.js +33 -0
- package/src/symlinks.js +78 -0
- package/src/utils.js +113 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Publish Instagram (subdoc de instagram-carrossel)
|
|
2
|
+
|
|
3
|
+
**Não é skill separada.** Carregar só se user disser “publica/pode postar” e houver `.env`.
|
|
4
|
+
|
|
5
|
+
## Default no INVOS (sem erro se faltar API)
|
|
6
|
+
|
|
7
|
+
**Não é obrigatório.** O skill `instagram-carrossel` termina com pack em `conteudo/carrosseis/` +
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
⚠️ Sua vez: subir PNGs no Instagram + colar caption.txt
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Só use publish automático se:
|
|
14
|
+
|
|
15
|
+
1. User disse **“publica” / “pode postar”**
|
|
16
|
+
2. `.env` tem as variáveis (nunca commitar)
|
|
17
|
+
3. Conta Instagram **Business** + Página Facebook
|
|
18
|
+
|
|
19
|
+
## Env (local only)
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# .env (gitignore)
|
|
23
|
+
INSTAGRAM_ACCESS_TOKEN=
|
|
24
|
+
INSTAGRAM_USER_ID=
|
|
25
|
+
IMGBB_API_KEY=
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Script
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
node --env-file=.env .agents/skills/instagram-carrossel/scripts/publish.js \
|
|
32
|
+
--images "path/slide-01.png,path/slide-02.png" \
|
|
33
|
+
--caption "legenda..."
|
|
34
|
+
# dry-run:
|
|
35
|
+
# ... --dry-run
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Imagens: JPEG/PNG conforme o script; preferir 2–10 slides. Caption max 2200 chars.
|
|
39
|
+
|
|
40
|
+
## Setup token (resumo)
|
|
41
|
+
|
|
42
|
+
Ver Meta Graph API Explorer: permissões `instagram_content_publish`, `instagram_basic`, `pages_read_engagement`.
|
|
43
|
+
User ID: Page → `instagram_business_account.id`.
|
|
44
|
+
Token longa duração (~60 dias).
|
|
45
|
+
|
|
46
|
+
## Se faltar chave / script falhar
|
|
47
|
+
|
|
48
|
+
Reportar erro real → manter handoff humano. **Nunca** inventar permalink de post.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Render PNG (subdoc de instagram-carrossel)
|
|
2
|
+
|
|
3
|
+
**Não é skill separada.** Carregar só quando o user pedir PNG/export ou o passo de render do squad full.
|
|
4
|
+
|
|
5
|
+
Renderiza HTML/CSS em PNG (Chrome headless padrão INVOS; Playwright opcional).
|
|
6
|
+
|
|
7
|
+
## Quando usar
|
|
8
|
+
|
|
9
|
+
Gerar slides de carrossel, gráficos sociais, qualquer HTML self-contained → PNG.
|
|
10
|
+
|
|
11
|
+
## Ordem de render (obrigatória)
|
|
12
|
+
|
|
13
|
+
1. **Chrome/Chromium headless** (padrão INVOS — sem MCP)
|
|
14
|
+
2. Playwright MCP se o harness tiver
|
|
15
|
+
3. Se nada existir: deixe HTML + instrução “abrir no browser / print” e **não** finja PNG
|
|
16
|
+
|
|
17
|
+
### Core Workflow
|
|
18
|
+
|
|
19
|
+
1. **Generate HTML** — arquivo self-contained (CSS inline, Google Fonts via `@import` ok).
|
|
20
|
+
|
|
21
|
+
2. **Save HTML** — ex.:
|
|
22
|
+
`.agents/squads/instagram-carrossel/output/slides/slide-01.html`
|
|
23
|
+
e espelho em `conteudo/carrosseis/$SLUG/slides/`.
|
|
24
|
+
|
|
25
|
+
3. **Start HTTP server** na pasta dos HTML:
|
|
26
|
+
```bash
|
|
27
|
+
python3 -m http.server 8765 --directory "OUTPUT_DIR" &
|
|
28
|
+
for i in $(seq 1 30); do curl -s http://localhost:8765 >/dev/null 2>&1 && break || sleep 0.1; done
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
4. **Render com Chrome headless** (macOS path padrão):
|
|
32
|
+
```bash
|
|
33
|
+
CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
|
|
34
|
+
# Linux: google-chrome || chromium
|
|
35
|
+
W=1080 H=1350 # INVOS default 4:5; squad legado pode pedir 1440
|
|
36
|
+
"$CHROME" --headless=new --no-sandbox --disable-gpu --hide-scrollbars \
|
|
37
|
+
--window-size=${W},${H} \
|
|
38
|
+
--screenshot="OUTPUT_DIR/rendered/slide-01.png" \
|
|
39
|
+
--virtual-time-budget=4000 \
|
|
40
|
+
"http://localhost:8765/slide-01.html"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
5. **Verify** — inspecionar PNG; re-render se quebrar.
|
|
44
|
+
|
|
45
|
+
6. **Stop server**:
|
|
46
|
+
```bash
|
|
47
|
+
pkill -f "http.server 8765" 2>/dev/null || true
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Viewport Presets (width x height)
|
|
51
|
+
|
|
52
|
+
Use these standard dimensions:
|
|
53
|
+
- Instagram Post: 1080 x 1080
|
|
54
|
+
- Instagram Carousel: 1080 x 1440
|
|
55
|
+
- Instagram Story/Reel: 1080 x 1920
|
|
56
|
+
- Facebook Post: 1200 x 630
|
|
57
|
+
- Twitter/X Post: 1200 x 675
|
|
58
|
+
- LinkedIn Post: 1200 x 627
|
|
59
|
+
- YouTube Thumbnail: 1280 x 720
|
|
60
|
+
- Custom: as specified by the squad
|
|
61
|
+
|
|
62
|
+
### HTML Template Guidelines
|
|
63
|
+
|
|
64
|
+
The HTML you generate MUST:
|
|
65
|
+
- Be self-contained (inline CSS, no external dependencies)
|
|
66
|
+
- Use web-safe fonts OR Google Fonts via `@import`
|
|
67
|
+
- Embed images as absolute paths or base64 data URIs
|
|
68
|
+
- Set exact body dimensions matching the viewport
|
|
69
|
+
- Use `margin: 0; padding: 0; overflow: hidden` on body
|
|
70
|
+
- Account for device pixel ratio if high-res needed
|
|
71
|
+
|
|
72
|
+
Example minimal structure:
|
|
73
|
+
```html
|
|
74
|
+
<!DOCTYPE html>
|
|
75
|
+
<html>
|
|
76
|
+
<head>
|
|
77
|
+
<meta charset="UTF-8">
|
|
78
|
+
<style>
|
|
79
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
80
|
+
body { width: 1080px; height: 1440px; overflow: hidden; }
|
|
81
|
+
/* ... your design ... */
|
|
82
|
+
</style>
|
|
83
|
+
</head>
|
|
84
|
+
<body>
|
|
85
|
+
<!-- Your content -->
|
|
86
|
+
</body>
|
|
87
|
+
</html>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Batch Rendering (Carousels/Multi-slide)
|
|
91
|
+
|
|
92
|
+
For multi-image outputs like carousels:
|
|
93
|
+
1. Generate one HTML file per slide
|
|
94
|
+
2. Start the HTTP server **once** before the batch (step 3 of Core Workflow)
|
|
95
|
+
3. Render each slide sequentially (step 4 repeated per slide)
|
|
96
|
+
4. Stop the HTTP server **once** after all slides are done (step 6 of Core Workflow)
|
|
97
|
+
5. Name output files with zero-padded numbers: slide-01.png, slide-02.png, slide-03.png
|
|
98
|
+
6. Keep all slides at the same viewport dimensions
|
|
99
|
+
|
|
100
|
+
### Best Practices
|
|
101
|
+
|
|
102
|
+
- Always verify the first rendered image before batch rendering
|
|
103
|
+
- Use CSS Grid/Flexbox for layout -- most reliable across renderers
|
|
104
|
+
- Avoid animations/transitions (static screenshot only)
|
|
105
|
+
- For rounded corners on images, use CSS `border-radius` + `overflow`
|
|
106
|
+
- For emoji rendering, rely on system fonts (Windows: Segoe UI Emoji)
|
|
107
|
+
- Test text overflow -- ensure no content is clipped unexpectedly
|
|
108
|
+
- Keep HTML files alongside output PNGs for easy re-rendering
|
|
109
|
+
|
|
110
|
+
### Typography & Readability Rules
|
|
111
|
+
|
|
112
|
+
Text must be legible in the target platform's smallest viewing context (mobile feed for social platforms). Text inside linked or embedded image files (JPG, PNG, base64 assets) is decorative and exempt. All HTML text nodes and inline SVG text are subject to these rules.
|
|
113
|
+
|
|
114
|
+
These are HARD minimums -- never go below them for readable text.
|
|
115
|
+
|
|
116
|
+
#### Minimum Font Sizes by Platform
|
|
117
|
+
|
|
118
|
+
| Text Role | Instagram Post/Carousel | Instagram Story/Reel | LinkedIn/Facebook | YouTube Thumb |
|
|
119
|
+
|------------------|------------------------|----------------------|-------------------|---------------|
|
|
120
|
+
| Hero / Display | 58px | 56px | 40px | 60px |
|
|
121
|
+
| Heading | 43px | 42px | 32px | 36px |
|
|
122
|
+
| Body / Bullets | 34px | 32px | 24px | 36px |
|
|
123
|
+
| Caption / Footer | 24px | 20px | 20px | 32px |
|
|
124
|
+
|
|
125
|
+
**Universal rule**: No text element meant to be read may use a font size smaller than 20px, on any platform.
|
|
126
|
+
|
|
127
|
+
#### Font Weight
|
|
128
|
+
|
|
129
|
+
- Body text and above: use font-weight 500+ (medium/semibold/bold)
|
|
130
|
+
- Caption text: font-weight 500+ strongly recommended; 400 only with explicit high-contrast background (4.5:1 ratio minimum)
|
|
131
|
+
- Avoid thin/light weights (100-300) for any readable text
|
|
132
|
+
|
|
133
|
+
#### Verification Checklist
|
|
134
|
+
|
|
135
|
+
Before calling `browser_take_screenshot`, scan your HTML and confirm:
|
|
136
|
+
- All text elements use explicit px sizes (not em/rem that could resolve smaller)
|
|
137
|
+
- No heading is below the Heading minimum for the target platform
|
|
138
|
+
- No body/bullet text is below the Body minimum
|
|
139
|
+
- No footer or metadata text is below the Caption minimum
|
|
140
|
+
- No readable text uses font-weight below 500 (caption at 400 only with 4.5:1 contrast background)
|
|
141
|
+
|
|
142
|
+
## Available operations
|
|
143
|
+
|
|
144
|
+
- **Render HTML to PNG** -- Convert self-contained HTML/CSS into a pixel-perfect screenshot
|
|
145
|
+
- **Batch Render** -- Render multiple slides/pages sequentially for carousels and multi-image content
|
|
146
|
+
- **Viewport Resize** -- Set precise viewport dimensions for any target platform
|
|
147
|
+
- **Quality Verification** -- Visually inspect rendered output and re-render if needed
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Instagram Carousel Publisher
|
|
3
|
+
// Usage: node --env-file=.env publish.js --images "slide1.jpg,slide2.jpg" --caption "..." [--dry-run]
|
|
4
|
+
|
|
5
|
+
import { readFileSync } from 'node:fs';
|
|
6
|
+
import { resolve } from 'node:path';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
|
|
9
|
+
// ── Argument parsing ──────────────────────────────────────────
|
|
10
|
+
|
|
11
|
+
export function parseArgs(argv) {
|
|
12
|
+
const args = { images: [], caption: '', dryRun: false };
|
|
13
|
+
for (let i = 2; i < argv.length; i++) {
|
|
14
|
+
if (argv[i] === '--images') {
|
|
15
|
+
if (i + 1 < argv.length) args.images = argv[++i].split(',').map(s => s.trim());
|
|
16
|
+
}
|
|
17
|
+
else if (argv[i] === '--caption') {
|
|
18
|
+
if (i + 1 < argv.length) args.caption = argv[++i];
|
|
19
|
+
}
|
|
20
|
+
else if (argv[i] === '--dry-run') args.dryRun = true;
|
|
21
|
+
}
|
|
22
|
+
return args;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// ── Image upload (imgBB) ──────────────────────────────────────
|
|
26
|
+
|
|
27
|
+
export async function uploadToImgBB(imagePath, apiKey) {
|
|
28
|
+
const absolutePath = resolve(imagePath);
|
|
29
|
+
const fileBuffer = readFileSync(absolutePath);
|
|
30
|
+
const base64Image = fileBuffer.toString('base64');
|
|
31
|
+
const form = new FormData();
|
|
32
|
+
form.append('key', apiKey);
|
|
33
|
+
form.append('image', base64Image);
|
|
34
|
+
const res = await fetch('https://api.imgbb.com/1/upload', {
|
|
35
|
+
method: 'POST',
|
|
36
|
+
body: form,
|
|
37
|
+
});
|
|
38
|
+
if (!res.ok) throw new Error(`imgBB upload failed [${res.status}]: ${await res.text()}`);
|
|
39
|
+
const json = await res.json();
|
|
40
|
+
if (!json.success) throw new Error(`imgBB upload failed: ${JSON.stringify(json)}`);
|
|
41
|
+
return json.data.url;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// ── Instagram Graph API ───────────────────────────────────────
|
|
45
|
+
|
|
46
|
+
const IG_BASE = 'https://graph.facebook.com/v21.0';
|
|
47
|
+
|
|
48
|
+
export async function createChildContainer(userId, imageUrl, accessToken) {
|
|
49
|
+
const params = new URLSearchParams({
|
|
50
|
+
image_url: imageUrl,
|
|
51
|
+
is_carousel_item: 'true',
|
|
52
|
+
access_token: accessToken,
|
|
53
|
+
});
|
|
54
|
+
const res = await fetch(`${IG_BASE}/${userId}/media?${params}`, { method: 'POST' });
|
|
55
|
+
if (!res.ok) throw new Error(`createChildContainer failed [${res.status}]: ${await res.text()}`);
|
|
56
|
+
return (await res.json()).id;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export async function getContainerStatus(containerId, accessToken) {
|
|
60
|
+
const params = new URLSearchParams({ fields: 'status_code', access_token: accessToken });
|
|
61
|
+
const res = await fetch(`${IG_BASE}/${containerId}?${params}`);
|
|
62
|
+
if (!res.ok) throw new Error(`getContainerStatus failed [${res.status}]: ${await res.text()}`);
|
|
63
|
+
return (await res.json()).status_code;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export async function pollUntilFinished(containerId, accessToken, timeoutMs = 60_000, intervalMs = 3_000) {
|
|
67
|
+
const deadline = Date.now() + timeoutMs;
|
|
68
|
+
while (Date.now() < deadline) {
|
|
69
|
+
const status = await getContainerStatus(containerId, accessToken);
|
|
70
|
+
if (status === 'FINISHED') return;
|
|
71
|
+
if (status === 'ERROR') throw new Error(`Container ${containerId} entered ERROR state`);
|
|
72
|
+
await new Promise(r => setTimeout(r, intervalMs));
|
|
73
|
+
}
|
|
74
|
+
throw new Error(`Container ${containerId} timed out after ${timeoutMs}ms`);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export async function createCarouselContainer(userId, childIds, caption, accessToken) {
|
|
78
|
+
const params = new URLSearchParams({
|
|
79
|
+
media_type: 'CAROUSEL',
|
|
80
|
+
children: childIds.join(','),
|
|
81
|
+
caption,
|
|
82
|
+
access_token: accessToken,
|
|
83
|
+
});
|
|
84
|
+
const res = await fetch(`${IG_BASE}/${userId}/media?${params}`, { method: 'POST' });
|
|
85
|
+
if (!res.ok) throw new Error(`createCarouselContainer failed [${res.status}]: ${await res.text()}`);
|
|
86
|
+
return (await res.json()).id;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export async function publishMedia(userId, containerId, accessToken) {
|
|
90
|
+
const params = new URLSearchParams({ creation_id: containerId, access_token: accessToken });
|
|
91
|
+
const res = await fetch(`${IG_BASE}/${userId}/media_publish?${params}`, { method: 'POST' });
|
|
92
|
+
if (!res.ok) throw new Error(`publishMedia failed [${res.status}]: ${await res.text()}`);
|
|
93
|
+
return (await res.json()).id;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export async function getPermalink(mediaId, accessToken) {
|
|
97
|
+
const params = new URLSearchParams({ fields: 'permalink', access_token: accessToken });
|
|
98
|
+
const res = await fetch(`${IG_BASE}/${mediaId}?${params}`);
|
|
99
|
+
if (!res.ok) return null; // non-fatal — just skip the URL display
|
|
100
|
+
const json = await res.json();
|
|
101
|
+
return json.permalink ?? null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// ── Main ──────────────────────────────────────────────────────
|
|
105
|
+
|
|
106
|
+
async function main() {
|
|
107
|
+
const { images, caption, dryRun } = parseArgs(process.argv);
|
|
108
|
+
|
|
109
|
+
if (!images.length) throw new Error('--images is required (e.g. --images "slide1.jpg,slide2.jpg")');
|
|
110
|
+
if (!caption) throw new Error('--caption is required');
|
|
111
|
+
if (images.length < 2 || images.length > 10) {
|
|
112
|
+
throw new Error(`Instagram carousels require 2–10 images (got ${images.length})`);
|
|
113
|
+
}
|
|
114
|
+
if (caption.length > 2200) {
|
|
115
|
+
throw new Error(`Caption exceeds Instagram's 2200-character limit (got ${caption.length})`);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const { INSTAGRAM_ACCESS_TOKEN, INSTAGRAM_USER_ID, IMGBB_API_KEY } = process.env;
|
|
119
|
+
if (!INSTAGRAM_ACCESS_TOKEN) throw new Error('INSTAGRAM_ACCESS_TOKEN is not set in environment');
|
|
120
|
+
if (!INSTAGRAM_USER_ID) throw new Error('INSTAGRAM_USER_ID is not set in environment');
|
|
121
|
+
if (!IMGBB_API_KEY) throw new Error('IMGBB_API_KEY is not set in environment. Get one at https://api.imgbb.com/');
|
|
122
|
+
|
|
123
|
+
console.log(`📸 Uploading ${images.length} image(s) to imgBB...`);
|
|
124
|
+
const imageUrls = await Promise.all(images.map(p => uploadToImgBB(p, IMGBB_API_KEY)));
|
|
125
|
+
imageUrls.forEach((url, i) => console.log(` [${i + 1}] ${url}`));
|
|
126
|
+
|
|
127
|
+
console.log('\n📦 Creating Instagram media containers...');
|
|
128
|
+
const childIds = await Promise.all(
|
|
129
|
+
imageUrls.map(url => createChildContainer(INSTAGRAM_USER_ID, url, INSTAGRAM_ACCESS_TOKEN))
|
|
130
|
+
);
|
|
131
|
+
console.log(` Container IDs: ${childIds.join(', ')}`);
|
|
132
|
+
|
|
133
|
+
console.log('\n⏳ Waiting for containers to finish processing...');
|
|
134
|
+
await Promise.all(childIds.map(id => pollUntilFinished(id, INSTAGRAM_ACCESS_TOKEN)));
|
|
135
|
+
console.log(' All containers ready.');
|
|
136
|
+
|
|
137
|
+
console.log('\n🎠 Creating carousel container...');
|
|
138
|
+
const carouselId = await createCarouselContainer(
|
|
139
|
+
INSTAGRAM_USER_ID, childIds, caption, INSTAGRAM_ACCESS_TOKEN
|
|
140
|
+
);
|
|
141
|
+
await pollUntilFinished(carouselId, INSTAGRAM_ACCESS_TOKEN);
|
|
142
|
+
console.log(` Carousel container ID: ${carouselId}`);
|
|
143
|
+
|
|
144
|
+
if (dryRun) {
|
|
145
|
+
console.log('\n✅ DRY RUN complete — skipping final publish call.');
|
|
146
|
+
console.log(` Carousel container ready: ${carouselId}`);
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
console.log('\n🚀 Publishing to Instagram...');
|
|
151
|
+
const postId = await publishMedia(INSTAGRAM_USER_ID, carouselId, INSTAGRAM_ACCESS_TOKEN);
|
|
152
|
+
const permalink = await getPermalink(postId, INSTAGRAM_ACCESS_TOKEN);
|
|
153
|
+
console.log(`\n✅ Published successfully!`);
|
|
154
|
+
console.log(` Post ID: ${postId}`);
|
|
155
|
+
if (permalink) console.log(` URL: ${permalink}`);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Run only when executed directly (not when imported for tests)
|
|
159
|
+
const isMain = process.argv[1] === fileURLToPath(import.meta.url);
|
|
160
|
+
if (isMain) {
|
|
161
|
+
main().catch(err => {
|
|
162
|
+
console.error(`\n❌ ${err.message}`);
|
|
163
|
+
process.exit(1);
|
|
164
|
+
});
|
|
165
|
+
}
|