arkaos 4.26.0 → 4.28.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 +7 -5
- package/THE-ARKAOS-GUIDE.md +7 -7
- package/VERSION +1 -1
- package/arka/SKILL.md +1 -1
- package/arka/skills/human-writing/SKILL.md +106 -0
- package/arka/skills/human-writing/references/anti-slop-phrases.md +131 -0
- package/arka/skills/human-writing/references/checklist.md +66 -0
- package/arka/skills/human-writing/references/content-refresh.md +38 -0
- package/arka/skills/human-writing/references/plain-english-alternatives.md +394 -0
- package/arka/skills/human-writing/references/pt-pt-anti-slop.md +82 -0
- package/arka/skills/human-writing/references/stop-slop.LICENSE +21 -0
- package/arka/skills/human-writing/references/structural-patterns.md +151 -0
- package/config/claude-agents/content-marketer.md +1 -1
- package/config/claude-agents/content-strategist.md +1 -1
- package/config/claude-agents/eduardo-copy.md +13 -0
- package/config/claude-agents/lifecycle-marketer.md +50 -0
- package/config/claude-agents/pr-partnerships.md +50 -0
- package/config/claude-agents/product-marketer.md +50 -0
- package/config/claude-agents/repurpose-distributor.md +1 -1
- package/config/claude-agents/sales-copywriter.md +1 -1
- package/config/claude-agents/scriptwriter.md +1 -1
- package/config/claude-agents/viral-engineer.md +1 -1
- package/config/evals/community.yaml +137 -0
- package/config/evals/content.yaml +298 -0
- package/config/evals/landing.yaml +927 -0
- package/config/evals/marketing.yaml +3836 -0
- package/config/evals/saas.yaml +616 -0
- package/config/evals/sales.yaml +437 -0
- package/config/skills-curated.yaml +2 -2
- package/config/skills-provenance.yaml +194 -21
- package/core/registry/generator.py +7 -0
- package/departments/community/SKILL.md +1 -0
- package/departments/community/skills/community-marketing/SKILL.md +200 -0
- package/departments/content/SKILL.md +1 -0
- package/departments/content/agents/content-strategist.yaml +1 -0
- package/departments/content/agents/repurpose-distributor.yaml +1 -0
- package/departments/content/agents/scriptwriter.yaml +1 -0
- package/departments/content/agents/viral-engineer.yaml +1 -0
- package/departments/content/skills/image-create/SKILL.md +375 -0
- package/departments/content/skills/image-create/references/ai-image-prompting.md +229 -0
- package/departments/content/skills/video-produce/SKILL.md +220 -0
- package/departments/content/skills/video-produce/references/ai-video-prompting.md +175 -0
- package/departments/content/skills/video-produce/references/edit-anatomy.md +84 -0
- package/departments/landing/SKILL.md +3 -0
- package/departments/landing/agents/sales-copywriter.yaml +1 -0
- package/departments/landing/skills/affiliate-bridge/SKILL.md +291 -5
- package/departments/landing/skills/affiliate-bridge/references/affiliate-programs.md +167 -0
- package/departments/landing/skills/affiliate-bridge/references/program-examples.md +143 -0
- package/departments/landing/skills/copy-framework/SKILL.md +241 -0
- package/departments/landing/skills/copy-framework/references/copy-frameworks.md +344 -0
- package/departments/landing/skills/copy-framework/references/natural-transitions.md +272 -0
- package/departments/landing/skills/lead-magnet/SKILL.md +337 -0
- package/departments/landing/skills/lead-magnet/references/benchmarks.md +129 -0
- package/departments/landing/skills/lead-magnet/references/format-guide.md +196 -0
- package/departments/landing/skills/offer-create/SKILL.md +105 -8
- package/departments/landing/skills/offer-create/references/bonus-stacking.md +150 -0
- package/departments/landing/skills/offer-create/references/examples.md +215 -0
- package/departments/landing/skills/offer-create/references/guarantee-design.md +172 -0
- package/departments/landing/skills/offer-create/references/offer-anatomy.md +203 -0
- package/departments/landing/skills/offer-create/references/offer-formats.md +240 -0
- package/departments/landing/skills/offer-create/references/scarcity-urgency.md +175 -0
- package/departments/landing/skills/offer-create/references/value-equation.md +134 -0
- package/departments/landing/skills/optimize-page/SKILL.md +185 -4
- package/departments/landing/skills/optimize-page/references/experiments.md +248 -0
- package/departments/landing/skills/optimize-page/references/form.md +422 -0
- package/departments/landing/skills/page-architect/SKILL.md +373 -5
- package/departments/landing/skills/page-architect/references/mermaid-templates.md +216 -0
- package/departments/landing/skills/page-architect/references/navigation-patterns.md +305 -0
- package/departments/landing/skills/page-architect/references/site-type-templates.md +293 -0
- package/departments/landing/skills/popup-design/SKILL.md +481 -0
- package/departments/landing/skills/signup-optimize/SKILL.md +385 -0
- package/departments/marketing/SKILL.md +22 -1
- package/departments/marketing/agents/content-marketer.yaml +1 -0
- package/departments/marketing/agents/growth-marketing/lifecycle-marketer.yaml +75 -0
- package/departments/marketing/agents/growth-marketing/pr-partnerships.yaml +74 -0
- package/departments/marketing/agents/growth-marketing/product-marketer.yaml +79 -0
- package/departments/marketing/agents/marketing-director.yaml +1 -0
- package/departments/marketing/skills/ab-test/SKILL.md +322 -3
- package/departments/marketing/skills/ab-test/references/sample-size-guide.md +263 -0
- package/departments/marketing/skills/ab-test/references/test-templates.md +277 -0
- package/departments/marketing/skills/ad-creative/SKILL.md +451 -0
- package/departments/marketing/skills/ad-creative/references/creative-review-page.md +106 -0
- package/departments/marketing/skills/ad-creative/references/creative-roadmap.md +118 -0
- package/departments/marketing/skills/ad-creative/references/generative-tools.md +637 -0
- package/departments/marketing/skills/ad-creative/references/hook-system.md +115 -0
- package/departments/marketing/skills/ad-creative/references/imessage-video-ads.md +201 -0
- package/departments/marketing/skills/ad-creative/references/motion-video-ads.md +126 -0
- package/departments/marketing/skills/ad-creative/references/platform-specs.md +213 -0
- package/departments/marketing/skills/ad-creative/references/static-ad-templates.md +200 -0
- package/departments/marketing/skills/ai-seo/SKILL.md +520 -0
- package/departments/marketing/skills/ai-seo/references/citations-vs-recommendations.md +85 -0
- package/departments/marketing/skills/ai-seo/references/content-patterns.md +287 -0
- package/departments/marketing/skills/ai-seo/references/content-types.md +71 -0
- package/departments/marketing/skills/ai-seo/references/okf.md +104 -0
- package/departments/marketing/skills/ai-seo/references/platform-ranking-factors.md +154 -0
- package/departments/marketing/skills/analytics-report/SKILL.md +310 -1
- package/departments/marketing/skills/analytics-report/references/event-library.md +260 -0
- package/departments/marketing/skills/analytics-report/references/ga4-implementation.md +300 -0
- package/departments/marketing/skills/analytics-report/references/gtm-implementation.md +390 -0
- package/departments/marketing/skills/aso/SKILL.md +336 -0
- package/departments/marketing/skills/aso/references/apple-specs.md +107 -0
- package/departments/marketing/skills/aso/references/benchmarks.md +129 -0
- package/departments/marketing/skills/aso/references/google-play-specs.md +131 -0
- package/departments/marketing/skills/aso/references/report-template.md +213 -0
- package/departments/marketing/skills/aso/references/scoring-criteria.md +213 -0
- package/departments/marketing/skills/co-marketing/SKILL.md +316 -0
- package/departments/marketing/skills/cold-email/SKILL.md +80 -0
- package/departments/marketing/skills/cold-email/references/benchmarks.md +83 -0
- package/departments/marketing/skills/cold-email/references/follow-up-sequences.md +81 -0
- package/departments/marketing/skills/cold-email/references/frameworks.md +90 -0
- package/departments/marketing/skills/cold-email/references/personalization.md +79 -0
- package/departments/marketing/skills/cold-email/references/subject-lines.md +53 -0
- package/departments/marketing/skills/competitor-analysis/SKILL.md +262 -5
- package/departments/marketing/skills/competitor-analysis/references/content-architecture.md +271 -0
- package/departments/marketing/skills/competitor-analysis/references/templates.md +223 -0
- package/departments/marketing/skills/competitor-profile/SKILL.md +447 -0
- package/departments/marketing/skills/competitor-profile/references/templates.md +167 -0
- package/departments/marketing/skills/competitor-profile/references/tool-reference.md +179 -0
- package/departments/marketing/skills/content-strategy/SKILL.md +398 -0
- package/departments/marketing/skills/content-strategy/references/headless-cms.md +194 -0
- package/departments/marketing/skills/council/SKILL.md +185 -0
- package/departments/marketing/skills/council/references/advisor-template.md +51 -0
- package/departments/marketing/skills/council/references/advisors/alex-hormozi.md +43 -0
- package/departments/marketing/skills/council/references/advisors/ann-handley.md +43 -0
- package/departments/marketing/skills/council/references/advisors/april-dunford.md +41 -0
- package/departments/marketing/skills/council/references/advisors/byron-sharp.md +43 -0
- package/departments/marketing/skills/council/references/advisors/claude-hopkins.md +42 -0
- package/departments/marketing/skills/council/references/advisors/david-ogilvy.md +42 -0
- package/departments/marketing/skills/council/references/advisors/eugene-schwartz.md +42 -0
- package/departments/marketing/skills/council/references/advisors/gary-halbert.md +43 -0
- package/departments/marketing/skills/council/references/advisors/gary-vaynerchuk.md +43 -0
- package/departments/marketing/skills/council/references/advisors/rory-sutherland.md +42 -0
- package/departments/marketing/skills/council/references/advisors/russell-brunson.md +43 -0
- package/departments/marketing/skills/council/references/advisors/seth-godin.md +43 -0
- package/departments/marketing/skills/customer-research/SKILL.md +318 -0
- package/departments/marketing/skills/customer-research/references/source-guides.md +401 -0
- package/departments/marketing/skills/directory-submit/SKILL.md +409 -0
- package/departments/marketing/skills/directory-submit/references/directory-list.md +477 -0
- package/departments/marketing/skills/directory-submit/references/positioning-variations.md +232 -0
- package/departments/marketing/skills/directory-submit/references/submission-tracker-template.csv +266 -0
- package/departments/marketing/skills/email-sequence/SKILL.md +309 -2
- package/departments/marketing/skills/email-sequence/references/copy-guidelines.md +113 -0
- package/departments/marketing/skills/email-sequence/references/email-types.md +515 -0
- package/departments/marketing/skills/email-sequence/references/sequence-templates.md +168 -0
- package/departments/marketing/skills/free-tools/SKILL.md +203 -0
- package/departments/marketing/skills/free-tools/references/tool-types.md +217 -0
- package/departments/marketing/skills/marketing-ideas/SKILL.md +191 -0
- package/departments/marketing/skills/marketing-ideas/references/ideas-by-category.md +366 -0
- package/departments/marketing/skills/marketing-loops/SKILL.md +136 -0
- package/departments/marketing/skills/marketing-loops/references/loop-catalog.md +687 -0
- package/departments/marketing/skills/marketing-loops/references/loop-guardrails.md +73 -0
- package/departments/marketing/skills/marketing-loops/references/loop-orchestration.md +69 -0
- package/departments/marketing/skills/marketing-loops/references/loop-state.md +67 -0
- package/departments/marketing/skills/marketing-loops/references/loop-template.md +79 -0
- package/departments/marketing/skills/marketing-plan/SKILL.md +302 -0
- package/departments/marketing/skills/marketing-plan/references/aarrr-framework.md +180 -0
- package/departments/marketing/skills/marketing-plan/references/budget-planning.md +168 -0
- package/departments/marketing/skills/marketing-plan/references/client-types.md +373 -0
- package/departments/marketing/skills/marketing-plan/references/current-state-rubric.md +255 -0
- package/departments/marketing/skills/marketing-plan/references/example-quietude.md +972 -0
- package/departments/marketing/skills/marketing-plan/references/funding-stage-unlocks.md +230 -0
- package/departments/marketing/skills/marketing-plan/references/growth-patterns.md +148 -0
- package/departments/marketing/skills/marketing-plan/references/idea-cross-reference.md +265 -0
- package/departments/marketing/skills/marketing-plan/references/measurement-framework.md +213 -0
- package/departments/marketing/skills/marketing-plan/references/methodology.md +363 -0
- package/departments/marketing/skills/marketing-plan/references/ops-stack-mapping.md +197 -0
- package/departments/marketing/skills/marketing-plan/references/plan-template.md +494 -0
- package/departments/marketing/skills/marketing-plan/references/team-and-agency-model.md +278 -0
- package/departments/marketing/skills/marketing-psychology/SKILL.md +479 -0
- package/departments/marketing/skills/paid-campaign/SKILL.md +452 -3
- package/departments/marketing/skills/paid-campaign/references/abm-playbook.md +93 -0
- package/departments/marketing/skills/paid-campaign/references/ad-copy-templates.md +207 -0
- package/departments/marketing/skills/paid-campaign/references/audience-targeting.md +243 -0
- package/departments/marketing/skills/paid-campaign/references/b2b-paid-playbook.md +115 -0
- package/departments/marketing/skills/paid-campaign/references/conversion-tracking.md +361 -0
- package/departments/marketing/skills/paid-campaign/references/google-search-playbook.md +120 -0
- package/departments/marketing/skills/paid-campaign/references/linkedin-b2b-playbook.md +107 -0
- package/departments/marketing/skills/paid-campaign/references/meta-decision-system.md +143 -0
- package/departments/marketing/skills/paid-campaign/references/platform-setup-checklists.md +277 -0
- package/departments/marketing/skills/paid-campaign/references/rsa-output-spec.md +88 -0
- package/departments/marketing/skills/product-marketing/SKILL.md +141 -0
- package/departments/marketing/skills/programmatic-seo/SKILL.md +74 -3
- package/departments/marketing/skills/programmatic-seo/references/playbooks.md +308 -0
- package/departments/marketing/skills/public-relations/SKILL.md +167 -0
- package/departments/marketing/skills/public-relations/references/journalist-pitching.md +368 -0
- package/departments/marketing/skills/public-relations/references/media-outlets.md +207 -0
- package/departments/marketing/skills/public-relations/references/newsjacking.md +218 -0
- package/departments/marketing/skills/public-relations/references/press-platforms.md +188 -0
- package/departments/marketing/skills/schema-markup/SKILL.md +203 -0
- package/departments/marketing/skills/schema-markup/references/schema-examples.md +398 -0
- package/departments/marketing/skills/seo-audit/SKILL.md +470 -1
- package/departments/marketing/skills/seo-audit/references/ai-writing-detection.md +200 -0
- package/departments/marketing/skills/seo-audit/references/international-seo.md +230 -0
- package/departments/marketing/skills/sms-campaign/SKILL.md +363 -0
- package/departments/marketing/skills/sms-campaign/references/compliance.md +202 -0
- package/departments/marketing/skills/sms-campaign/references/platforms.md +318 -0
- package/departments/marketing/skills/sms-campaign/references/sequence-templates.md +282 -0
- package/departments/marketing/skills/social-strategy/SKILL.md +414 -3
- package/departments/marketing/skills/social-strategy/references/carousel-frameworks.md +141 -0
- package/departments/marketing/skills/social-strategy/references/listening-sources-template.md +123 -0
- package/departments/marketing/skills/social-strategy/references/listening.md +283 -0
- package/departments/marketing/skills/social-strategy/references/platform-limits.md +110 -0
- package/departments/marketing/skills/social-strategy/references/platforms.md +170 -0
- package/departments/marketing/skills/social-strategy/references/post-templates.md +179 -0
- package/departments/marketing/skills/social-strategy/references/reverse-engineering.md +195 -0
- package/departments/marketing/skills/social-strategy/references/short-form-video.md +237 -0
- package/departments/marketing/squad.yaml +10 -1
- package/departments/marketing/tools/LICENSE +21 -0
- package/departments/marketing/tools/REGISTRY.md +590 -0
- package/departments/marketing/tools/clis/README.md +198 -0
- package/departments/marketing/tools/clis/activecampaign.js +435 -0
- package/departments/marketing/tools/clis/adobe-analytics.js +161 -0
- package/departments/marketing/tools/clis/ahrefs.js +192 -0
- package/departments/marketing/tools/clis/airops.js +163 -0
- package/departments/marketing/tools/clis/amplitude.js +182 -0
- package/departments/marketing/tools/clis/apollo.js +142 -0
- package/departments/marketing/tools/clis/beehiiv.js +245 -0
- package/departments/marketing/tools/clis/brevo.js +368 -0
- package/departments/marketing/tools/clis/buffer.js +260 -0
- package/departments/marketing/tools/clis/calendly.js +253 -0
- package/departments/marketing/tools/clis/clay.js +159 -0
- package/departments/marketing/tools/clis/clearbit.js +163 -0
- package/departments/marketing/tools/clis/close.js +232 -0
- package/departments/marketing/tools/clis/coupler.js +173 -0
- package/departments/marketing/tools/clis/crossbeam.js +193 -0
- package/departments/marketing/tools/clis/customer-io.js +205 -0
- package/departments/marketing/tools/clis/dataforseo.js +257 -0
- package/departments/marketing/tools/clis/demio.js +149 -0
- package/departments/marketing/tools/clis/dub.js +158 -0
- package/departments/marketing/tools/clis/exa.js +147 -0
- package/departments/marketing/tools/clis/g2.js +186 -0
- package/departments/marketing/tools/clis/ga4.js +194 -0
- package/departments/marketing/tools/clis/github-prospects.js +257 -0
- package/departments/marketing/tools/clis/google-ads.js +189 -0
- package/departments/marketing/tools/clis/google-search-console.js +166 -0
- package/departments/marketing/tools/clis/hotjar.js +167 -0
- package/departments/marketing/tools/clis/hunter.js +249 -0
- package/departments/marketing/tools/clis/instantly.js +270 -0
- package/departments/marketing/tools/clis/intercom.js +399 -0
- package/departments/marketing/tools/clis/keywords-everywhere.js +185 -0
- package/departments/marketing/tools/clis/kit.js +232 -0
- package/departments/marketing/tools/clis/klaviyo.js +348 -0
- package/departments/marketing/tools/clis/lemlist.js +221 -0
- package/departments/marketing/tools/clis/linkedin-ads.js +185 -0
- package/departments/marketing/tools/clis/livestorm.js +292 -0
- package/departments/marketing/tools/clis/mailchimp.js +220 -0
- package/departments/marketing/tools/clis/mention-me.js +161 -0
- package/departments/marketing/tools/clis/meta-ads.js +181 -0
- package/departments/marketing/tools/clis/mixpanel.js +248 -0
- package/departments/marketing/tools/clis/onesignal.js +241 -0
- package/departments/marketing/tools/clis/optimizely.js +233 -0
- package/departments/marketing/tools/clis/outreach.js +213 -0
- package/departments/marketing/tools/clis/paddle.js +385 -0
- package/departments/marketing/tools/clis/partnerstack.js +382 -0
- package/departments/marketing/tools/clis/pendo.js +221 -0
- package/departments/marketing/tools/clis/plausible.js +249 -0
- package/departments/marketing/tools/clis/postmark.js +375 -0
- package/departments/marketing/tools/clis/rankparse.js +196 -0
- package/departments/marketing/tools/clis/resend.js +370 -0
- package/departments/marketing/tools/clis/rewardful.js +160 -0
- package/departments/marketing/tools/clis/savvycal.js +223 -0
- package/departments/marketing/tools/clis/segment.js +192 -0
- package/departments/marketing/tools/clis/semrush.js +207 -0
- package/departments/marketing/tools/clis/sendgrid.js +211 -0
- package/departments/marketing/tools/clis/similarweb.js +214 -0
- package/departments/marketing/tools/clis/snov.js +237 -0
- package/departments/marketing/tools/clis/supermetrics.js +169 -0
- package/departments/marketing/tools/clis/tiktok-ads.js +190 -0
- package/departments/marketing/tools/clis/tolt.js +153 -0
- package/departments/marketing/tools/clis/trustpilot.js +276 -0
- package/departments/marketing/tools/clis/typeform.js +269 -0
- package/departments/marketing/tools/clis/wistia.js +301 -0
- package/departments/marketing/tools/clis/zapier.js +165 -0
- package/departments/marketing/tools/clis/zoominfo.js +223 -0
- package/departments/marketing/tools/composio/README.md +105 -0
- package/departments/marketing/tools/composio/marketing-tools.md +91 -0
- package/departments/marketing/tools/integrations/activecampaign.md +337 -0
- package/departments/marketing/tools/integrations/adobe-analytics.md +156 -0
- package/departments/marketing/tools/integrations/ahrefs.md +142 -0
- package/departments/marketing/tools/integrations/airops.md +128 -0
- package/departments/marketing/tools/integrations/amplitude.md +135 -0
- package/departments/marketing/tools/integrations/apollo.md +148 -0
- package/departments/marketing/tools/integrations/attentive.md +152 -0
- package/departments/marketing/tools/integrations/audiencetap.md +125 -0
- package/departments/marketing/tools/integrations/beehiiv.md +157 -0
- package/departments/marketing/tools/integrations/brevo.md +268 -0
- package/departments/marketing/tools/integrations/browserbase.md +111 -0
- package/departments/marketing/tools/integrations/buffer.md +138 -0
- package/departments/marketing/tools/integrations/calendly.md +161 -0
- package/departments/marketing/tools/integrations/clay.md +149 -0
- package/departments/marketing/tools/integrations/clearbit.md +142 -0
- package/departments/marketing/tools/integrations/close.md +191 -0
- package/departments/marketing/tools/integrations/cogny.md +153 -0
- package/departments/marketing/tools/integrations/composio.md +190 -0
- package/departments/marketing/tools/integrations/contentful.md +160 -0
- package/departments/marketing/tools/integrations/coupler.md +142 -0
- package/departments/marketing/tools/integrations/crossbeam.md +137 -0
- package/departments/marketing/tools/integrations/customer-io.md +187 -0
- package/departments/marketing/tools/integrations/dataforseo.md +165 -0
- package/departments/marketing/tools/integrations/demio.md +182 -0
- package/departments/marketing/tools/integrations/dub-co.md +160 -0
- package/departments/marketing/tools/integrations/exa.md +145 -0
- package/departments/marketing/tools/integrations/firecrawl.md +144 -0
- package/departments/marketing/tools/integrations/firehose.md +159 -0
- package/departments/marketing/tools/integrations/g2.md +179 -0
- package/departments/marketing/tools/integrations/ga4.md +126 -0
- package/departments/marketing/tools/integrations/github.md +182 -0
- package/departments/marketing/tools/integrations/gong.md +144 -0
- package/departments/marketing/tools/integrations/google-ads.md +159 -0
- package/departments/marketing/tools/integrations/google-search-console.md +147 -0
- package/departments/marketing/tools/integrations/heygen.md +126 -0
- package/departments/marketing/tools/integrations/hotjar.md +147 -0
- package/departments/marketing/tools/integrations/hubspot.md +178 -0
- package/departments/marketing/tools/integrations/hunter.md +90 -0
- package/departments/marketing/tools/integrations/hyperframes.md +180 -0
- package/departments/marketing/tools/integrations/instantly.md +104 -0
- package/departments/marketing/tools/integrations/intercom.md +292 -0
- package/departments/marketing/tools/integrations/introw.md +182 -0
- package/departments/marketing/tools/integrations/keywords-everywhere.md +207 -0
- package/departments/marketing/tools/integrations/kit.md +167 -0
- package/departments/marketing/tools/integrations/klaviyo.md +228 -0
- package/departments/marketing/tools/integrations/lemlist.md +110 -0
- package/departments/marketing/tools/integrations/linkedin-ads.md +164 -0
- package/departments/marketing/tools/integrations/livestorm.md +313 -0
- package/departments/marketing/tools/integrations/mailchimp.md +150 -0
- package/departments/marketing/tools/integrations/mention-me.md +160 -0
- package/departments/marketing/tools/integrations/meta-ads.md +147 -0
- package/departments/marketing/tools/integrations/mixpanel.md +137 -0
- package/departments/marketing/tools/integrations/nitrosend.md +113 -0
- package/departments/marketing/tools/integrations/onesignal.md +229 -0
- package/departments/marketing/tools/integrations/optimizely.md +171 -0
- package/departments/marketing/tools/integrations/outreach.md +172 -0
- package/departments/marketing/tools/integrations/paddle.md +212 -0
- package/departments/marketing/tools/integrations/partnerstack.md +222 -0
- package/departments/marketing/tools/integrations/pendo.md +208 -0
- package/departments/marketing/tools/integrations/plausible.md +177 -0
- package/departments/marketing/tools/integrations/plivo.md +140 -0
- package/departments/marketing/tools/integrations/posthog.md +151 -0
- package/departments/marketing/tools/integrations/postmark.md +234 -0
- package/departments/marketing/tools/integrations/postscript.md +126 -0
- package/departments/marketing/tools/integrations/rankparse.md +257 -0
- package/departments/marketing/tools/integrations/rb2b.md +110 -0
- package/departments/marketing/tools/integrations/resend.md +212 -0
- package/departments/marketing/tools/integrations/rewardful.md +147 -0
- package/departments/marketing/tools/integrations/salesforce.md +150 -0
- package/departments/marketing/tools/integrations/sanity.md +148 -0
- package/departments/marketing/tools/integrations/savvycal.md +181 -0
- package/departments/marketing/tools/integrations/segment.md +159 -0
- package/departments/marketing/tools/integrations/semrush.md +121 -0
- package/departments/marketing/tools/integrations/sendgrid.md +161 -0
- package/departments/marketing/tools/integrations/sequenzy.md +306 -0
- package/departments/marketing/tools/integrations/shopify.md +176 -0
- package/departments/marketing/tools/integrations/similarweb.md +150 -0
- package/departments/marketing/tools/integrations/snov.md +94 -0
- package/departments/marketing/tools/integrations/sparktoro.md +127 -0
- package/departments/marketing/tools/integrations/strapi.md +167 -0
- package/departments/marketing/tools/integrations/stripe.md +148 -0
- package/departments/marketing/tools/integrations/supermetrics.md +145 -0
- package/departments/marketing/tools/integrations/tiktok-ads.md +161 -0
- package/departments/marketing/tools/integrations/tolt.md +144 -0
- package/departments/marketing/tools/integrations/truelist.md +184 -0
- package/departments/marketing/tools/integrations/trustpilot.md +191 -0
- package/departments/marketing/tools/integrations/twilio.md +152 -0
- package/departments/marketing/tools/integrations/typeform.md +190 -0
- package/departments/marketing/tools/integrations/webflow.md +198 -0
- package/departments/marketing/tools/integrations/wistia.md +164 -0
- package/departments/marketing/tools/integrations/wordpress.md +175 -0
- package/departments/marketing/tools/integrations/zapier.md +244 -0
- package/departments/marketing/tools/integrations/zoominfo.md +191 -0
- package/departments/quality/agents/copy-director.yaml +1 -0
- package/departments/saas/SKILL.md +1 -0
- package/departments/saas/skills/churn-analysis/SKILL.md +421 -4
- package/departments/saas/skills/churn-analysis/references/cancel-flow-patterns.md +316 -0
- package/departments/saas/skills/churn-analysis/references/dunning-playbook.md +408 -0
- package/departments/saas/skills/launch-execute/SKILL.md +346 -4
- package/departments/saas/skills/onboarding-optimize/SKILL.md +218 -4
- package/departments/saas/skills/onboarding-optimize/references/experiments.md +258 -0
- package/departments/saas/skills/paywall-design/SKILL.md +256 -0
- package/departments/saas/skills/paywall-design/references/experiments.md +164 -0
- package/departments/saas/skills/pricing-strategy/SKILL.md +224 -0
- package/departments/saas/skills/pricing-strategy/references/research-methods.md +152 -0
- package/departments/saas/skills/pricing-strategy/references/tier-structure.md +232 -0
- package/departments/sales/SKILL.md +3 -0
- package/departments/sales/skills/prospecting/SKILL.md +297 -0
- package/departments/sales/skills/prospecting/references/b2b-prospecting.md +106 -0
- package/departments/sales/skills/prospecting/references/compliance.md +123 -0
- package/departments/sales/skills/prospecting/references/data-sources.md +287 -0
- package/departments/sales/skills/prospecting/references/demand-signals.md +129 -0
- package/departments/sales/skills/prospecting/references/local-prospecting.md +165 -0
- package/departments/sales/skills/prospecting/references/saas-prospecting.md +123 -0
- package/departments/sales/skills/revops/SKILL.md +379 -0
- package/departments/sales/skills/revops/references/automation-playbooks.md +290 -0
- package/departments/sales/skills/revops/references/lifecycle-definitions.md +278 -0
- package/departments/sales/skills/revops/references/routing-rules.md +203 -0
- package/departments/sales/skills/revops/references/scoring-models.md +247 -0
- package/departments/sales/skills/sales-enablement/SKILL.md +396 -0
- package/departments/sales/skills/sales-enablement/references/deck-frameworks.md +263 -0
- package/departments/sales/skills/sales-enablement/references/demo-scripts.md +355 -0
- package/departments/sales/skills/sales-enablement/references/objection-library.md +270 -0
- package/departments/sales/skills/sales-enablement/references/one-pager-templates.md +208 -0
- package/harness/codex/AGENTS.md +8 -8
- package/harness/copilot/copilot-instructions.md +8 -8
- package/harness/cursor/rules/arkaos.mdc +9 -9
- package/harness/gemini/GEMINI.md +8 -8
- package/harness/opencode/AGENTS.md +8 -8
- package/harness/zed/.rules +8 -8
- package/knowledge/agents-registry-v2.json +170 -8
- package/knowledge/commands-registry.json +693 -99
- package/knowledge/skills-manifest.json +459 -20
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/scripts/tools/evals_import.py +183 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const TOKEN = process.env.MIXPANEL_TOKEN
|
|
4
|
+
const API_KEY = process.env.MIXPANEL_API_KEY
|
|
5
|
+
const SECRET = process.env.MIXPANEL_SECRET
|
|
6
|
+
const INGESTION_URL = 'https://api.mixpanel.com'
|
|
7
|
+
const QUERY_URL = 'https://mixpanel.com/api/2.0'
|
|
8
|
+
const EXPORT_URL = 'https://data.mixpanel.com/api/2.0'
|
|
9
|
+
|
|
10
|
+
if (!TOKEN && !API_KEY) {
|
|
11
|
+
console.error(JSON.stringify({ error: 'MIXPANEL_TOKEN (for ingestion) or MIXPANEL_API_KEY + MIXPANEL_SECRET (for query/export) environment variables required' }))
|
|
12
|
+
process.exit(1)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async function ingestApi(method, path, body) {
|
|
16
|
+
const headers = { 'Content-Type': 'application/json' }
|
|
17
|
+
if (args['dry-run']) {
|
|
18
|
+
const maskedBody = body ? JSON.parse(JSON.stringify(body)) : undefined
|
|
19
|
+
if (Array.isArray(maskedBody)) maskedBody.forEach(item => {
|
|
20
|
+
if (item.properties && item.properties.token) item.properties.token = '***'
|
|
21
|
+
if (item.$token) item.$token = '***'
|
|
22
|
+
})
|
|
23
|
+
return { _dry_run: true, method, url: `${INGESTION_URL}${path}`, headers, body: maskedBody }
|
|
24
|
+
}
|
|
25
|
+
const res = await fetch(`${INGESTION_URL}${path}`, {
|
|
26
|
+
method,
|
|
27
|
+
headers,
|
|
28
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
29
|
+
})
|
|
30
|
+
const text = await res.text()
|
|
31
|
+
try {
|
|
32
|
+
return JSON.parse(text)
|
|
33
|
+
} catch {
|
|
34
|
+
return { status: res.status, body: text }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async function queryApi(method, baseUrl, path, params) {
|
|
39
|
+
if (!API_KEY || !SECRET) {
|
|
40
|
+
return { error: 'MIXPANEL_API_KEY and MIXPANEL_SECRET required for query/export operations' }
|
|
41
|
+
}
|
|
42
|
+
const auth = Buffer.from(`${API_KEY}:${SECRET}`).toString('base64')
|
|
43
|
+
const url = params ? `${baseUrl}${path}?${params}` : `${baseUrl}${path}`
|
|
44
|
+
const headers = {
|
|
45
|
+
'Authorization': `Basic ${auth}`,
|
|
46
|
+
'Content-Type': 'application/json',
|
|
47
|
+
}
|
|
48
|
+
if (args['dry-run']) {
|
|
49
|
+
return { _dry_run: true, method, url, headers: { ...headers, Authorization: '***' } }
|
|
50
|
+
}
|
|
51
|
+
const res = await fetch(url, {
|
|
52
|
+
method,
|
|
53
|
+
headers,
|
|
54
|
+
})
|
|
55
|
+
const text = await res.text()
|
|
56
|
+
try {
|
|
57
|
+
return JSON.parse(text)
|
|
58
|
+
} catch {
|
|
59
|
+
return { status: res.status, body: text }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function queryApiPost(path, body) {
|
|
64
|
+
if (!API_KEY || !SECRET) {
|
|
65
|
+
return { error: 'MIXPANEL_API_KEY and MIXPANEL_SECRET required for query/export operations' }
|
|
66
|
+
}
|
|
67
|
+
const auth = Buffer.from(`${API_KEY}:${SECRET}`).toString('base64')
|
|
68
|
+
const headers = {
|
|
69
|
+
'Authorization': `Basic ${auth}`,
|
|
70
|
+
'Content-Type': 'application/json',
|
|
71
|
+
}
|
|
72
|
+
if (args['dry-run']) {
|
|
73
|
+
return { _dry_run: true, method: 'POST', url: `${QUERY_URL}${path}`, headers: { ...headers, Authorization: '***' }, body: body || undefined }
|
|
74
|
+
}
|
|
75
|
+
const res = await fetch(`${QUERY_URL}${path}`, {
|
|
76
|
+
method: 'POST',
|
|
77
|
+
headers,
|
|
78
|
+
body: JSON.stringify(body),
|
|
79
|
+
})
|
|
80
|
+
const text = await res.text()
|
|
81
|
+
try {
|
|
82
|
+
return JSON.parse(text)
|
|
83
|
+
} catch {
|
|
84
|
+
return { status: res.status, body: text }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function parseArgs(args) {
|
|
89
|
+
const result = { _: [] }
|
|
90
|
+
for (let i = 0; i < args.length; i++) {
|
|
91
|
+
const arg = args[i]
|
|
92
|
+
if (arg.startsWith('--')) {
|
|
93
|
+
const key = arg.slice(2)
|
|
94
|
+
const next = args[i + 1]
|
|
95
|
+
if (next && !next.startsWith('--')) {
|
|
96
|
+
result[key] = next
|
|
97
|
+
i++
|
|
98
|
+
} else {
|
|
99
|
+
result[key] = true
|
|
100
|
+
}
|
|
101
|
+
} else {
|
|
102
|
+
result._.push(arg)
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return result
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const args = parseArgs(process.argv.slice(2))
|
|
109
|
+
const [cmd, sub, ...rest] = args._
|
|
110
|
+
|
|
111
|
+
async function main() {
|
|
112
|
+
let result
|
|
113
|
+
|
|
114
|
+
switch (cmd) {
|
|
115
|
+
case 'track':
|
|
116
|
+
switch (sub) {
|
|
117
|
+
case 'event': {
|
|
118
|
+
if (!TOKEN) { result = { error: 'MIXPANEL_TOKEN required for tracking' }; break }
|
|
119
|
+
if (!args['distinct-id']) { result = { error: '--distinct-id required' }; break }
|
|
120
|
+
if (!args.event) { result = { error: '--event required' }; break }
|
|
121
|
+
let properties
|
|
122
|
+
try { properties = args.properties ? JSON.parse(args.properties) : {} } catch { result = { error: 'Invalid JSON in --properties' }; break }
|
|
123
|
+
properties.token = TOKEN
|
|
124
|
+
properties.distinct_id = args['distinct-id']
|
|
125
|
+
result = await ingestApi('POST', '/track', [{
|
|
126
|
+
event: args.event,
|
|
127
|
+
properties,
|
|
128
|
+
}])
|
|
129
|
+
break
|
|
130
|
+
}
|
|
131
|
+
default:
|
|
132
|
+
result = { error: 'Unknown track subcommand. Use: event' }
|
|
133
|
+
}
|
|
134
|
+
break
|
|
135
|
+
|
|
136
|
+
case 'profiles':
|
|
137
|
+
switch (sub) {
|
|
138
|
+
case 'set': {
|
|
139
|
+
if (!TOKEN) { result = { error: 'MIXPANEL_TOKEN required for profiles' }; break }
|
|
140
|
+
if (!args['distinct-id']) { result = { error: '--distinct-id required' }; break }
|
|
141
|
+
let properties
|
|
142
|
+
try { properties = args.properties ? JSON.parse(args.properties) : {} } catch { result = { error: 'Invalid JSON in --properties' }; break }
|
|
143
|
+
result = await ingestApi('POST', '/engage', [{
|
|
144
|
+
$token: TOKEN,
|
|
145
|
+
$distinct_id: args['distinct-id'],
|
|
146
|
+
$set: properties,
|
|
147
|
+
}])
|
|
148
|
+
break
|
|
149
|
+
}
|
|
150
|
+
default:
|
|
151
|
+
result = { error: 'Unknown profiles subcommand. Use: set' }
|
|
152
|
+
}
|
|
153
|
+
break
|
|
154
|
+
|
|
155
|
+
case 'query':
|
|
156
|
+
switch (sub) {
|
|
157
|
+
case 'events': {
|
|
158
|
+
if (!args['project-id']) { result = { error: '--project-id required' }; break }
|
|
159
|
+
const body = {
|
|
160
|
+
project_id: parseInt(args['project-id']),
|
|
161
|
+
bookmark_id: null,
|
|
162
|
+
params: {
|
|
163
|
+
events: [{ event: args.event || 'all' }],
|
|
164
|
+
time_range: {
|
|
165
|
+
from_date: args['from-date'] || new Date(Date.now() - 30 * 86400000).toISOString().slice(0, 10),
|
|
166
|
+
to_date: args['to-date'] || new Date().toISOString().slice(0, 10),
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
}
|
|
170
|
+
result = await queryApiPost('/insights', body)
|
|
171
|
+
break
|
|
172
|
+
}
|
|
173
|
+
default:
|
|
174
|
+
result = { error: 'Unknown query subcommand. Use: events' }
|
|
175
|
+
}
|
|
176
|
+
break
|
|
177
|
+
|
|
178
|
+
case 'funnels':
|
|
179
|
+
switch (sub) {
|
|
180
|
+
case 'get': {
|
|
181
|
+
if (!args['funnel-id']) { result = { error: '--funnel-id required' }; break }
|
|
182
|
+
const params = new URLSearchParams()
|
|
183
|
+
params.set('funnel_id', args['funnel-id'])
|
|
184
|
+
if (args['from-date']) params.set('from_date', args['from-date'])
|
|
185
|
+
if (args['to-date']) params.set('to_date', args['to-date'])
|
|
186
|
+
result = await queryApi('GET', QUERY_URL, '/funnels', params)
|
|
187
|
+
break
|
|
188
|
+
}
|
|
189
|
+
default:
|
|
190
|
+
result = { error: 'Unknown funnels subcommand. Use: get' }
|
|
191
|
+
}
|
|
192
|
+
break
|
|
193
|
+
|
|
194
|
+
case 'retention':
|
|
195
|
+
switch (sub) {
|
|
196
|
+
case 'get': {
|
|
197
|
+
if (!args['from-date'] || !args['to-date']) { result = { error: '--from-date and --to-date required (YYYY-MM-DD)' }; break }
|
|
198
|
+
const params = new URLSearchParams()
|
|
199
|
+
params.set('from_date', args['from-date'])
|
|
200
|
+
params.set('to_date', args['to-date'])
|
|
201
|
+
params.set('retention_type', 'birth')
|
|
202
|
+
if (args['born-event']) params.set('born_event', args['born-event'])
|
|
203
|
+
result = await queryApi('GET', QUERY_URL, '/retention', params)
|
|
204
|
+
break
|
|
205
|
+
}
|
|
206
|
+
default:
|
|
207
|
+
result = { error: 'Unknown retention subcommand. Use: get' }
|
|
208
|
+
}
|
|
209
|
+
break
|
|
210
|
+
|
|
211
|
+
case 'export':
|
|
212
|
+
switch (sub) {
|
|
213
|
+
case 'events': {
|
|
214
|
+
if (!args['from-date']) { result = { error: '--from-date required' }; break }
|
|
215
|
+
if (!args['to-date']) { result = { error: '--to-date required' }; break }
|
|
216
|
+
const params = new URLSearchParams()
|
|
217
|
+
params.set('from_date', args['from-date'])
|
|
218
|
+
params.set('to_date', args['to-date'])
|
|
219
|
+
if (args.event) params.set('event', JSON.stringify([args.event]))
|
|
220
|
+
result = await queryApi('GET', EXPORT_URL, '/export', params)
|
|
221
|
+
break
|
|
222
|
+
}
|
|
223
|
+
default:
|
|
224
|
+
result = { error: 'Unknown export subcommand. Use: events' }
|
|
225
|
+
}
|
|
226
|
+
break
|
|
227
|
+
|
|
228
|
+
default:
|
|
229
|
+
result = {
|
|
230
|
+
error: 'Unknown command',
|
|
231
|
+
usage: {
|
|
232
|
+
track: 'track event --distinct-id <id> --event <name> [--properties <json>]',
|
|
233
|
+
profiles: 'profiles set --distinct-id <id> [--properties <json>]',
|
|
234
|
+
query: 'query events --project-id <id> [--event <name>] [--from-date <date>] [--to-date <date>]',
|
|
235
|
+
funnels: 'funnels get --funnel-id <id> [--from-date <date>] [--to-date <date>]',
|
|
236
|
+
retention: 'retention get [--from-date <date>] [--to-date <date>] [--born-event <event>]',
|
|
237
|
+
export: 'export events --from-date <date> --to-date <date>',
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
console.log(JSON.stringify(result, null, 2))
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
main().catch(err => {
|
|
246
|
+
console.error(JSON.stringify({ error: err.message }))
|
|
247
|
+
process.exit(1)
|
|
248
|
+
})
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const REST_API_KEY = process.env.ONESIGNAL_REST_API_KEY
|
|
4
|
+
const APP_ID = process.env.ONESIGNAL_APP_ID
|
|
5
|
+
const BASE_URL = 'https://api.onesignal.com'
|
|
6
|
+
|
|
7
|
+
if (!REST_API_KEY) {
|
|
8
|
+
console.error(JSON.stringify({ error: 'ONESIGNAL_REST_API_KEY environment variable required' }))
|
|
9
|
+
process.exit(1)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (!APP_ID) {
|
|
13
|
+
console.error(JSON.stringify({ error: 'ONESIGNAL_APP_ID environment variable required' }))
|
|
14
|
+
process.exit(1)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async function api(method, path, body) {
|
|
18
|
+
const headers = {
|
|
19
|
+
'Authorization': `Basic ${REST_API_KEY}`,
|
|
20
|
+
'Content-Type': 'application/json',
|
|
21
|
+
'Accept': 'application/json',
|
|
22
|
+
}
|
|
23
|
+
if (args['dry-run']) {
|
|
24
|
+
return { _dry_run: true, method, url: `${BASE_URL}${path}`, headers: { ...headers, Authorization: '***' }, body: body || undefined }
|
|
25
|
+
}
|
|
26
|
+
const res = await fetch(`${BASE_URL}${path}`, {
|
|
27
|
+
method,
|
|
28
|
+
headers,
|
|
29
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
30
|
+
})
|
|
31
|
+
const text = await res.text()
|
|
32
|
+
try {
|
|
33
|
+
return JSON.parse(text)
|
|
34
|
+
} catch {
|
|
35
|
+
return { status: res.status, body: text }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function parseArgs(args) {
|
|
40
|
+
const result = { _: [] }
|
|
41
|
+
for (let i = 0; i < args.length; i++) {
|
|
42
|
+
const arg = args[i]
|
|
43
|
+
if (arg.startsWith('--')) {
|
|
44
|
+
const key = arg.slice(2)
|
|
45
|
+
const next = args[i + 1]
|
|
46
|
+
if (next && !next.startsWith('--')) {
|
|
47
|
+
result[key] = next
|
|
48
|
+
i++
|
|
49
|
+
} else {
|
|
50
|
+
result[key] = true
|
|
51
|
+
}
|
|
52
|
+
} else {
|
|
53
|
+
result._.push(arg)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return result
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const args = parseArgs(process.argv.slice(2))
|
|
60
|
+
const [cmd, sub, ...rest] = args._
|
|
61
|
+
|
|
62
|
+
async function main() {
|
|
63
|
+
let result
|
|
64
|
+
const limit = args.limit ? Number(args.limit) : 50
|
|
65
|
+
const offset = args.offset ? Number(args.offset) : 0
|
|
66
|
+
|
|
67
|
+
switch (cmd) {
|
|
68
|
+
case 'notifications':
|
|
69
|
+
switch (sub) {
|
|
70
|
+
case 'send': {
|
|
71
|
+
const message = args.message
|
|
72
|
+
if (!message) { result = { error: '--message required' }; break }
|
|
73
|
+
const payload = {
|
|
74
|
+
app_id: APP_ID,
|
|
75
|
+
contents: { en: message },
|
|
76
|
+
}
|
|
77
|
+
if (args.heading) payload.headings = { en: args.heading }
|
|
78
|
+
if (args.url) payload.url = args.url
|
|
79
|
+
if (args.data) {
|
|
80
|
+
try { payload.data = JSON.parse(args.data) } catch { payload.data = { value: args.data } }
|
|
81
|
+
}
|
|
82
|
+
if (args.segment) {
|
|
83
|
+
payload.included_segments = args.segment.split(',')
|
|
84
|
+
} else if (args.emails) {
|
|
85
|
+
payload.include_email_tokens = args.emails.split(',')
|
|
86
|
+
} else if (args['player-ids']) {
|
|
87
|
+
payload.include_player_ids = args['player-ids'].split(',')
|
|
88
|
+
} else if (args.aliases) {
|
|
89
|
+
try {
|
|
90
|
+
payload.include_aliases = JSON.parse(args.aliases)
|
|
91
|
+
} catch {
|
|
92
|
+
payload.include_aliases = { external_id: args.aliases.split(',') }
|
|
93
|
+
}
|
|
94
|
+
payload.target_channel = args.channel || 'push'
|
|
95
|
+
} else {
|
|
96
|
+
payload.included_segments = ['Subscribed Users']
|
|
97
|
+
}
|
|
98
|
+
if (args['send-after']) payload.send_after = args['send-after']
|
|
99
|
+
if (args.ttl) payload.ttl = Number(args.ttl)
|
|
100
|
+
result = await api('POST', '/api/v1/notifications', payload)
|
|
101
|
+
break
|
|
102
|
+
}
|
|
103
|
+
case 'list': {
|
|
104
|
+
result = await api('GET', `/api/v1/notifications?app_id=${APP_ID}&limit=${limit}&offset=${offset}`)
|
|
105
|
+
break
|
|
106
|
+
}
|
|
107
|
+
case 'get': {
|
|
108
|
+
const id = args.id
|
|
109
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
110
|
+
result = await api('GET', `/api/v1/notifications/${id}?app_id=${APP_ID}`)
|
|
111
|
+
break
|
|
112
|
+
}
|
|
113
|
+
case 'cancel': {
|
|
114
|
+
const id = args.id
|
|
115
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
116
|
+
result = await api('DELETE', `/api/v1/notifications/${id}?app_id=${APP_ID}`)
|
|
117
|
+
break
|
|
118
|
+
}
|
|
119
|
+
default:
|
|
120
|
+
result = { error: 'Unknown notifications subcommand. Use: send, list, get, cancel' }
|
|
121
|
+
}
|
|
122
|
+
break
|
|
123
|
+
|
|
124
|
+
case 'segments':
|
|
125
|
+
switch (sub) {
|
|
126
|
+
case 'list': {
|
|
127
|
+
result = await api('GET', `/api/v1/apps/${APP_ID}/segments?offset=${offset}&limit=${limit}`)
|
|
128
|
+
break
|
|
129
|
+
}
|
|
130
|
+
case 'create': {
|
|
131
|
+
const name = args.name
|
|
132
|
+
if (!name) { result = { error: '--name required' }; break }
|
|
133
|
+
let filters
|
|
134
|
+
try { filters = args.filters ? JSON.parse(args.filters) : [{ field: 'session_count', relation: '>', value: '0' }] } catch { result = { error: 'Invalid JSON in --filters' }; break }
|
|
135
|
+
result = await api('POST', `/api/v1/apps/${APP_ID}/segments`, { name, filters })
|
|
136
|
+
break
|
|
137
|
+
}
|
|
138
|
+
case 'delete': {
|
|
139
|
+
const id = args.id
|
|
140
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
141
|
+
result = await api('DELETE', `/api/v1/apps/${APP_ID}/segments/${id}`)
|
|
142
|
+
break
|
|
143
|
+
}
|
|
144
|
+
default:
|
|
145
|
+
result = { error: 'Unknown segments subcommand. Use: list, create, delete' }
|
|
146
|
+
}
|
|
147
|
+
break
|
|
148
|
+
|
|
149
|
+
case 'users':
|
|
150
|
+
switch (sub) {
|
|
151
|
+
case 'get': {
|
|
152
|
+
const aliasLabel = args['alias-label'] || 'external_id'
|
|
153
|
+
const aliasId = args['alias-id']
|
|
154
|
+
if (!aliasId) { result = { error: '--alias-id required' }; break }
|
|
155
|
+
result = await api('GET', `/api/v1/apps/${APP_ID}/users/by/${aliasLabel}/${aliasId}`)
|
|
156
|
+
break
|
|
157
|
+
}
|
|
158
|
+
case 'create': {
|
|
159
|
+
const payload = {}
|
|
160
|
+
if (args['external-id']) {
|
|
161
|
+
payload.identity = { external_id: args['external-id'] }
|
|
162
|
+
}
|
|
163
|
+
if (args.email) {
|
|
164
|
+
payload.subscriptions = [{ type: 'Email', token: args.email }]
|
|
165
|
+
}
|
|
166
|
+
if (args.tags) {
|
|
167
|
+
try { payload.tags = JSON.parse(args.tags) } catch { result = { error: 'Invalid --tags JSON' }; break }
|
|
168
|
+
}
|
|
169
|
+
result = await api('POST', `/api/v1/apps/${APP_ID}/users`, payload)
|
|
170
|
+
break
|
|
171
|
+
}
|
|
172
|
+
case 'delete': {
|
|
173
|
+
const aliasLabel = args['alias-label'] || 'external_id'
|
|
174
|
+
const aliasId = args['alias-id']
|
|
175
|
+
if (!aliasId) { result = { error: '--alias-id required' }; break }
|
|
176
|
+
result = await api('DELETE', `/api/v1/apps/${APP_ID}/users/by/${aliasLabel}/${aliasId}`)
|
|
177
|
+
break
|
|
178
|
+
}
|
|
179
|
+
default:
|
|
180
|
+
result = { error: 'Unknown users subcommand. Use: get, create, delete' }
|
|
181
|
+
}
|
|
182
|
+
break
|
|
183
|
+
|
|
184
|
+
case 'templates':
|
|
185
|
+
switch (sub) {
|
|
186
|
+
case 'list': {
|
|
187
|
+
result = await api('GET', `/api/v1/templates?app_id=${APP_ID}&limit=${limit}&offset=${offset}`)
|
|
188
|
+
break
|
|
189
|
+
}
|
|
190
|
+
case 'get': {
|
|
191
|
+
const id = args.id
|
|
192
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
193
|
+
result = await api('GET', `/api/v1/templates/${id}?app_id=${APP_ID}`)
|
|
194
|
+
break
|
|
195
|
+
}
|
|
196
|
+
case 'create': {
|
|
197
|
+
const name = args.name
|
|
198
|
+
if (!name) { result = { error: '--name required' }; break }
|
|
199
|
+
const payload = { app_id: APP_ID, name }
|
|
200
|
+
if (args.message) payload.contents = { en: args.message }
|
|
201
|
+
if (args.heading) payload.headings = { en: args.heading }
|
|
202
|
+
result = await api('POST', '/api/v1/templates', payload)
|
|
203
|
+
break
|
|
204
|
+
}
|
|
205
|
+
default:
|
|
206
|
+
result = { error: 'Unknown templates subcommand. Use: list, get, create' }
|
|
207
|
+
}
|
|
208
|
+
break
|
|
209
|
+
|
|
210
|
+
case 'app':
|
|
211
|
+
switch (sub) {
|
|
212
|
+
case 'get': {
|
|
213
|
+
result = await api('GET', `/api/v1/apps/${APP_ID}`)
|
|
214
|
+
break
|
|
215
|
+
}
|
|
216
|
+
default:
|
|
217
|
+
result = { error: 'Unknown app subcommand. Use: get' }
|
|
218
|
+
}
|
|
219
|
+
break
|
|
220
|
+
|
|
221
|
+
default:
|
|
222
|
+
result = {
|
|
223
|
+
error: 'Unknown command',
|
|
224
|
+
usage: {
|
|
225
|
+
notifications: 'notifications [send --message <msg> --segment <s> | list | get --id <id> | cancel --id <id>]',
|
|
226
|
+
segments: 'segments [list | create --name <n> --filters <json> | delete --id <id>]',
|
|
227
|
+
users: 'users [get --alias-id <id> | create --external-id <id> --email <e> | delete --alias-id <id>]',
|
|
228
|
+
templates: 'templates [list | get --id <id> | create --name <n> --message <msg>]',
|
|
229
|
+
app: 'app [get]',
|
|
230
|
+
options: '--limit <n> --offset <n>',
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
console.log(JSON.stringify(result, null, 2))
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
main().catch(err => {
|
|
239
|
+
console.error(JSON.stringify({ error: err.message }))
|
|
240
|
+
process.exit(1)
|
|
241
|
+
})
|