@egbe-ai/opencode 0.0.0-stage → 0.1.8
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/LICENSE +4 -0
- package/README.md +124 -2
- package/index.js +5 -0
- package/package.json +55 -4
- package/plugin.js +230 -0
- package/session-log.js +315 -0
- package/skills/.egbe-catalog/manifest.json +1 -0
- package/skills/egbe-os-analytics/SKILL.md +499 -0
- package/skills/egbe-os-analytics/canonical-events.v1.json +256 -0
- package/skills/egbe-os-analytics/references/session-funnel.md +130 -0
- package/skills/egbe-os-analytics/references/workflows/activation-tracking.md +147 -0
- package/skills/egbe-os-analytics/references/workflows/landing-click-tracking.md +209 -0
- package/skills/egbe-os-analytics/references/workflows/payment-lifecycle-tracking.md +122 -0
- package/skills/egbe-os-analytics/references/workflows/product-funnel-tracking.md +77 -0
- package/skills/egbe-os-analytics/references/workflows/signup-lifecycle-tracking.md +208 -0
- package/skills/egbe-os-analytics/scripts/umami_funnel.py +927 -0
- package/skills/egbe-os-apollo-lead-finder/SKILL.md +135 -0
- package/skills/egbe-os-apollo-lead-finder/references/operations.md +240 -0
- package/skills/egbe-os-apollo-lead-finder/scripts/enrich.js +6 -0
- package/skills/egbe-os-apollo-lead-finder/scripts/enrich.sh +4 -0
- package/skills/egbe-os-apollo-lead-finder/scripts/find-leads.js +6 -0
- package/skills/egbe-os-apollo-lead-finder/scripts/find-leads.sh +4 -0
- package/skills/egbe-os-apollo-lead-finder/scripts/lib/apollo-client.js +343 -0
- package/skills/egbe-os-apollo-lead-finder/scripts/lib/connection-identity.js +17 -0
- package/skills/egbe-os-apollo-lead-finder/scripts/lib/helpers.js +127 -0
- package/skills/egbe-os-apollo-lead-finder/scripts/lib/places-filters.js +217 -0
- package/skills/egbe-os-apollo-lead-finder/scripts/lib/sourcing.js +153 -0
- package/skills/egbe-os-apollo-lead-finder/scripts/places-leads.js +653 -0
- package/skills/egbe-os-apollo-lead-finder/scripts/places-leads.sh +4 -0
- package/skills/egbe-os-apollo-lead-finder/scripts/search.js +6 -0
- package/skills/egbe-os-apollo-lead-finder/scripts/search.sh +4 -0
- package/skills/egbe-os-campaign-landing-page/SKILL.md +95 -0
- package/skills/egbe-os-campaign-landing-page/agents/openai.yaml +4 -0
- package/skills/egbe-os-campaign-landing-page/references/leads-calendar-and-tracking.md +66 -0
- package/skills/egbe-os-campaign-landing-page/references/os-wiring.md +58 -0
- package/skills/egbe-os-campaign-landing-page/references/qa.md +40 -0
- package/skills/egbe-os-campaign-landing-page/references/routing.md +32 -0
- package/skills/egbe-os-db/SKILL.md +174 -0
- package/skills/egbe-os-deploy/SKILL.md +412 -0
- package/skills/egbe-os-design/SKILL.md +182 -0
- package/skills/egbe-os-design-landing-page/SKILL.md +117 -0
- package/skills/egbe-os-design-landing-page/agents/openai.yaml +4 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/.dockerignore +11 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/AGENTS.md +31 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/Dockerfile +21 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/eslint.config.mjs +18 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/next.config.ts +11 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/package.json +36 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/postcss.config.mjs +7 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/public/.gitkeep +1 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/sentry.edge.config.ts +13 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/sentry.server.config.ts +13 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/src/app/global-error.tsx +19 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/src/app/globals.css +22 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/src/app/layout.tsx +21 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/src/app/page.tsx +3 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/src/app/privacy/page.tsx +28 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/src/components/egbe-analytics.tsx +39 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/src/instrumentation-client.ts +15 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/src/instrumentation.ts +13 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/src/lib/egbe-observability.generated.ts +20 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/src/lib/utils.ts +6 -0
- package/skills/egbe-os-design-landing-page/assets/scaffold/tsconfig.json +34 -0
- package/skills/egbe-os-design-landing-page/references/application-preparation.md +44 -0
- package/skills/egbe-os-design-landing-page/references/page-inputs.md +22 -0
- package/skills/egbe-os-destination-readiness/SKILL.md +132 -0
- package/skills/egbe-os-destination-readiness/references/checks.md +130 -0
- package/skills/egbe-os-destination-readiness/references/network-requirements.md +34 -0
- package/skills/egbe-os-destination-readiness/references/report.md +116 -0
- package/skills/egbe-os-domains/SKILL.md +189 -0
- package/skills/egbe-os-errors/SKILL.md +259 -0
- package/skills/egbe-os-git/SKILL.md +275 -0
- package/skills/egbe-os-git/references/issues.md +33 -0
- package/skills/egbe-os-google-ads/SKILL.md +163 -0
- package/skills/egbe-os-google-ads/references/artifacts.md +133 -0
- package/skills/egbe-os-google-ads/references/campaigns.md +157 -0
- package/skills/egbe-os-google-ads/references/conversions.md +153 -0
- package/skills/egbe-os-google-ads/references/delivery.md +128 -0
- package/skills/egbe-os-google-ads/references/keyword-ideas.md +40 -0
- package/skills/egbe-os-google-ads/references/reporting.md +105 -0
- package/skills/egbe-os-google-ads/references/search-assets.md +219 -0
- package/skills/egbe-os-google-ads/references/server-conversions.md +119 -0
- package/skills/egbe-os-google-auth/SKILL.md +285 -0
- package/skills/egbe-os-google-auth/agents/openai.yaml +4 -0
- package/skills/egbe-os-gtm-knowledge/SKILL.md +151 -0
- package/skills/egbe-os-images/SKILL.md +163 -0
- package/skills/egbe-os-images/references/stock-images.md +21 -0
- package/skills/egbe-os-instantly-campaign-launcher/SKILL.md +127 -0
- package/skills/egbe-os-instantly-campaign-launcher/references/instantly-ops.md +260 -0
- package/skills/egbe-os-instantly-campaign-launcher/references/observation-and-scheduling.md +188 -0
- package/skills/egbe-os-instantly-campaign-launcher/references/reply-handling.md +116 -0
- package/skills/egbe-os-instantly-campaign-launcher/references/run-spec-template.json +65 -0
- package/skills/egbe-os-instantly-campaign-launcher/references/run-state.md +145 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/conclude-campaign.js +158 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/install-crons.js +956 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/launch-campaign.js +2008 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/lib/campaign-metrics.js +124 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/lib/confirmed-opt-outs.js +208 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/lib/connection-identity.js +17 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/lib/create-once.js +23 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/lib/gtm-identity.js +125 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/lib/helpers.js +545 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/lib/html-body.js +266 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/lib/instantly-client.js +328 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/lib/outreach-db.js +370 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/lib/recipient-exclusion/index.js +86 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/lib/replenish-test-harness.js +53 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/lib/reply-queue.js +67 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/lib/run-config.js +103 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/lib/sender-selection.js +105 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/monitor-campaign.js +607 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/outreach-report.js +147 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/replenish-leads.js +619 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/reply-worker.js +258 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/run-cron-job.js +32 -0
- package/skills/egbe-os-instantly-campaign-launcher/scripts/send-reply.js +260 -0
- package/skills/egbe-os-linkedin-ads/SKILL.md +114 -0
- package/skills/egbe-os-linkedin-ads/references/destination-requirements.md +30 -0
- package/skills/egbe-os-linkedin-ads/references/runtime/api-reference.md +154 -0
- package/skills/egbe-os-linkedin-ads/references/runtime/artifacts.md +63 -0
- package/skills/egbe-os-linkedin-ads/references/workflows/build-paused.md +44 -0
- package/skills/egbe-os-linkedin-ads/references/workflows/conversions.md +88 -0
- package/skills/egbe-os-linkedin-ads/references/workflows/launch-and-pause.md +49 -0
- package/skills/egbe-os-linkedin-ads/references/workflows/monitoring.md +35 -0
- package/skills/egbe-os-linkedin-ads/references/workflows/readiness.md +63 -0
- package/skills/egbe-os-linkedin-ads/references/workflows/targeting-and-creative.md +52 -0
- package/skills/egbe-os-llm/SKILL.md +160 -0
- package/skills/egbe-os-mail/SKILL.md +180 -0
- package/skills/egbe-os-me/SKILL.md +119 -0
- package/skills/egbe-os-meta-ads/SKILL.md +114 -0
- package/skills/egbe-os-meta-ads/references/creative/creative-specs.md +15 -0
- package/skills/egbe-os-meta-ads/references/creative/talking-head.md +35 -0
- package/skills/egbe-os-meta-ads/references/destination-requirements.md +30 -0
- package/skills/egbe-os-meta-ads/references/runtime/api-reference.md +436 -0
- package/skills/egbe-os-meta-ads/references/runtime/artifacts.md +51 -0
- package/skills/egbe-os-meta-ads/references/runtime/insights-reference.md +187 -0
- package/skills/egbe-os-meta-ads/references/runtime/pixel-install.md +196 -0
- package/skills/egbe-os-meta-ads/references/runtime/shared-analytics-attribution.md +16 -0
- package/skills/egbe-os-meta-ads/references/workflows/build-paused.md +36 -0
- package/skills/egbe-os-meta-ads/references/workflows/launch-ready.md +16 -0
- package/skills/egbe-os-meta-ads/references/workflows/launch.md +23 -0
- package/skills/egbe-os-meta-ads/references/workflows/monitoring.md +72 -0
- package/skills/egbe-os-meta-ads/references/workflows/pause.md +17 -0
- package/skills/egbe-os-meta-ads/references/workflows/recovery.md +23 -0
- package/skills/egbe-os-meta-ads/scripts/check-pixel.py +229 -0
- package/skills/egbe-os-meta-ads/scripts/validate-meta-artifacts.py +187 -0
- package/skills/egbe-os-notifications/SKILL.md +78 -0
- package/skills/egbe-os-openai-ads/SKILL.md +149 -0
- package/skills/egbe-os-openai-ads/references/creative/chat-card.md +51 -0
- package/skills/egbe-os-openai-ads/references/destination-requirements.md +29 -0
- package/skills/egbe-os-openai-ads/references/runtime/api-reference.md +219 -0
- package/skills/egbe-os-openai-ads/references/runtime/artifacts.md +169 -0
- package/skills/egbe-os-openai-ads/references/workflows/build-paused.md +40 -0
- package/skills/egbe-os-openai-ads/references/workflows/conversions.md +40 -0
- package/skills/egbe-os-openai-ads/references/workflows/creative-assembly.md +24 -0
- package/skills/egbe-os-openai-ads/references/workflows/launch.md +27 -0
- package/skills/egbe-os-openai-ads/references/workflows/monitoring.md +54 -0
- package/skills/egbe-os-openai-ads/references/workflows/pause.md +22 -0
- package/skills/egbe-os-openai-ads/references/workflows/readiness.md +37 -0
- package/skills/egbe-os-openai-ads/references/workflows/tracking.md +32 -0
- package/skills/egbe-os-openai-ads/scripts/validate-openai-artifacts.py +271 -0
- package/skills/egbe-os-organic-trend-watch/SKILL.md +139 -0
- package/skills/egbe-os-organic-trend-watch/agents/openai.yaml +4 -0
- package/skills/egbe-os-organic-trend-watch/references/analysis-and-adaptation.md +54 -0
- package/skills/egbe-os-organic-trend-watch/references/collection-and-analysis.md +117 -0
- package/skills/egbe-os-organic-trend-watch/references/output-contract.md +133 -0
- package/skills/egbe-os-organic-trend-watch/references/provider-contract.md +169 -0
- package/skills/egbe-os-organic-trend-watch/references/runtime-contract.md +204 -0
- package/skills/egbe-os-organic-trend-watch/references/visual-analysis-prompt.md +17 -0
- package/skills/egbe-os-organic-trend-watch/scripts/_analysis.py +612 -0
- package/skills/egbe-os-organic-trend-watch/scripts/_contract.py +1133 -0
- package/skills/egbe-os-organic-trend-watch/scripts/_provider_inputs.py +165 -0
- package/skills/egbe-os-organic-trend-watch/scripts/analyze-visual-evidence.py +315 -0
- package/skills/egbe-os-organic-trend-watch/scripts/build-provider-inputs.py +88 -0
- package/skills/egbe-os-organic-trend-watch/scripts/connection_identity.py +22 -0
- package/skills/egbe-os-organic-trend-watch/scripts/egbe_artifacts.py +24 -0
- package/skills/egbe-os-organic-trend-watch/scripts/finalize-receipt.py +106 -0
- package/skills/egbe-os-organic-trend-watch/scripts/normalize-videos.py +647 -0
- package/skills/egbe-os-organic-trend-watch/scripts/prepare-visual-evidence.py +324 -0
- package/skills/egbe-os-organic-trend-watch/scripts/render-result.py +30 -0
- package/skills/egbe-os-organic-trend-watch/scripts/run-apify.py +723 -0
- package/skills/egbe-os-organic-trend-watch/scripts/run-state.py +192 -0
- package/skills/egbe-os-organic-trend-watch/scripts/validate-context.py +27 -0
- package/skills/egbe-os-organic-trend-watch/scripts/validate-runtime.py +137 -0
- package/skills/egbe-os-payments/SKILL.md +215 -0
- package/skills/egbe-os-payments/agents/openai.yaml +4 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/.egbe/scaffolds/billing-nextjs-subscription.v1.json +5 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/AGENTS.append.md +13 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/db/migrations/1000_egbe_billing.sql +66 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/package.fragment.json +12 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/scripts/billing-sync.mjs +162 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/app/account/billing/error.tsx +11 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/app/account/billing/loading.tsx +8 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/app/account/billing/page.tsx +121 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/app/api/billing/checkout/route.ts +102 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/app/api/billing/portal/route.ts +54 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/app/api/billing/status/route.ts +22 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/app/api/payments/webhook/route.ts +65 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/components/egbe-billing/plan-badge.tsx +16 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/lib/egbe-billing/billing-sync.test.mjs +58 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/lib/egbe-billing/catalog.ts +82 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/lib/egbe-billing/checkout-payload.ts +47 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/lib/egbe-billing/foundation-contract.test.mjs +59 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/lib/egbe-billing/lifecycle.d.ts +16 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/lib/egbe-billing/lifecycle.mjs +82 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/lib/egbe-billing/lifecycle.test.mjs +94 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/lib/egbe-billing/os-client.ts +96 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/lib/egbe-billing/plans.json +17 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/lib/egbe-billing/repository.ts +325 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/lib/egbe-billing/signature.d.ts +6 -0
- package/skills/egbe-os-payments/assets/scaffolds/billing-nextjs-subscription/src/lib/egbe-billing/signature.mjs +22 -0
- package/skills/egbe-os-payments/references/contracts/plan-catalog.md +46 -0
- package/skills/egbe-os-payments/references/security/durable-verification.md +64 -0
- package/skills/egbe-os-payments/references/security/server-integration.md +26 -0
- package/skills/egbe-os-payments/references/security/webhook-and-entitlements.md +152 -0
- package/skills/egbe-os-payments/references/ux/billing-experience.md +47 -0
- package/skills/egbe-os-payments/references/workflows/account-billing.md +64 -0
- package/skills/egbe-os-payments/references/workflows/discounts-and-promotion-codes.md +265 -0
- package/skills/egbe-os-payments/references/workflows/one-time-purchase.md +75 -0
- package/skills/egbe-os-payments/references/workflows/product-checkout.md +355 -0
- package/skills/egbe-os-payments/references/workflows/subscription-lifecycle.md +55 -0
- package/skills/egbe-os-playbook/SKILL.md +79 -0
- package/skills/egbe-os-playbook/playbooks/market-and-acquisition/channels/email-outreach.md +91 -0
- package/skills/egbe-os-playbook/playbooks/market-and-acquisition/channels/google-search.md +40 -0
- package/skills/egbe-os-playbook/playbooks/market-and-acquisition/channels/linkedin.md +24 -0
- package/skills/egbe-os-playbook/playbooks/market-and-acquisition/channels/meta.md +23 -0
- package/skills/egbe-os-playbook/playbooks/market-and-acquisition/channels/openai.md +15 -0
- package/skills/egbe-os-playbook/playbooks/market-and-acquisition/channels/reddit.md +56 -0
- package/skills/egbe-os-playbook/playbooks/market-and-acquisition/choose-test.md +73 -0
- package/skills/egbe-os-playbook/playbooks/market-and-acquisition/evaluate.md +91 -0
- package/skills/egbe-os-playbook/playbooks/market-and-acquisition/market.md +96 -0
- package/skills/egbe-os-playbook/playbooks/market-and-acquisition/run-test.md +111 -0
- package/skills/egbe-os-playbook/playbooks/market-and-acquisition.md +56 -0
- package/skills/egbe-os-playbook/playbooks/product/business-loop.md +141 -0
- package/skills/egbe-os-playbook/playbooks/product/collaboration.md +26 -0
- package/skills/egbe-os-playbook/playbooks/product/deliver.md +75 -0
- package/skills/egbe-os-playbook/playbooks/product/diagnose.md +80 -0
- package/skills/egbe-os-playbook/playbooks/product/evaluate.md +67 -0
- package/skills/egbe-os-playbook/playbooks/product/experience.md +132 -0
- package/skills/egbe-os-playbook/playbooks/product/loop-examples.md +67 -0
- package/skills/egbe-os-playbook/playbooks/product/offer.md +65 -0
- package/skills/egbe-os-playbook/playbooks/product/value.md +91 -0
- package/skills/egbe-os-playbook/playbooks/product.md +67 -0
- package/skills/egbe-os-playbook/references/catalog.md +127 -0
- package/skills/egbe-os-playbook/references/changes.md +167 -0
- package/skills/egbe-os-playbook/scripts/playbook-changes.py +6 -0
- package/skills/egbe-os-playbook/scripts/playbook_changes/__init__.py +1 -0
- package/skills/egbe-os-playbook/scripts/playbook_changes/cli.py +57 -0
- package/skills/egbe-os-playbook/scripts/playbook_changes/operations.py +137 -0
- package/skills/egbe-os-playbook/scripts/playbook_changes/protocol.py +132 -0
- package/skills/egbe-os-playbook/scripts/playbook_changes/storage.py +180 -0
- package/skills/egbe-os-playbook/scripts/playbook_changes/transport.py +113 -0
- package/skills/egbe-os-product-auth/SKILL.md +151 -0
- package/skills/egbe-os-product-auth/agents/openai.yaml +4 -0
- package/skills/egbe-os-product-auth/assets/db/README.md +102 -0
- package/skills/egbe-os-product-auth/assets/db/create-validation-session.mjs +223 -0
- package/skills/egbe-os-product-auth/assets/db/migrate.mjs +64 -0
- package/skills/egbe-os-product-auth/assets/db/migrations/0001_auth.sql +33 -0
- package/skills/egbe-os-product-auth/assets/db/migrations/0002_auth_identities.sql +16 -0
- package/skills/egbe-os-product-auth/assets/scaffolds/product-auth-database/AGENTS.append.md +17 -0
- package/skills/egbe-os-product-auth/assets/scaffolds/product-auth-database/package.fragment.json +10 -0
- package/skills/egbe-os-product-auth/assets/scaffolds/product-nextjs-postgres/AGENTS.append.md +9 -0
- package/skills/egbe-os-product-auth/assets/scaffolds/product-nextjs-postgres/package.fragment.json +13 -0
- package/skills/egbe-os-product-auth/assets/scaffolds/product-nextjs-postgres/src/lib/egbe-product/db.ts +31 -0
- package/skills/egbe-os-product-auth/assets/scaffolds/product-nextjs-postgres/src/lib/egbe-product/identity.ts +94 -0
- package/skills/egbe-os-product-auth/assets/scaffolds/product-nextjs-postgres/src/lib/egbe-product/index.ts +3 -0
- package/skills/egbe-os-product-auth/assets/scaffolds/product-nextjs-postgres/src/lib/egbe-product/session.ts +91 -0
- package/skills/egbe-os-product-auth/references/contracts/live-auth-interface.md +108 -0
- package/skills/egbe-os-product-auth/references/frameworks/nextjs.md +34 -0
- package/skills/egbe-os-product-auth/references/security/session-and-credentials.md +73 -0
- package/skills/egbe-os-product-auth/references/ux/auth-experience.md +58 -0
- package/skills/egbe-os-product-auth/references/workflows/account-recovery.md +22 -0
- package/skills/egbe-os-product-auth/references/workflows/build-auth.md +212 -0
- package/skills/egbe-os-product-auth/references/workflows/google.md +34 -0
- package/skills/egbe-os-product-auth/references/workflows/passwordless-email.md +65 -0
- package/skills/egbe-os-product-build/SKILL.md +111 -0
- package/skills/egbe-os-product-build/agents/openai.yaml +4 -0
- package/skills/egbe-os-product-build/references/capabilities.md +25 -0
- package/skills/egbe-os-product-build/references/engineering.md +72 -0
- package/skills/egbe-os-product-build/references/execution.md +55 -0
- package/skills/egbe-os-product-build/references/foundations.md +93 -0
- package/skills/egbe-os-product-build/references/interface-quality.md +32 -0
- package/skills/egbe-os-product-build/references/workflows/private-review-handoff.md +86 -0
- package/skills/egbe-os-product-build/scripts/scaffold.py +296 -0
- package/skills/egbe-os-product-demo-video/SKILL.md +118 -0
- package/skills/egbe-os-product-demo-video/references/recording.md +32 -0
- package/skills/egbe-os-product-market-research/SKILL.md +159 -0
- package/skills/egbe-os-product-market-research/agents/openai.yaml +4 -0
- package/skills/egbe-os-product-market-research/references/catalog.v1.json +177 -0
- package/skills/egbe-os-product-market-research/references/config/channel-footprint-sources.v1.json +99 -0
- package/skills/egbe-os-product-market-research/references/config/creative-taxonomy.v1.json +367 -0
- package/skills/egbe-os-product-market-research/references/contracts/creative-video.md +75 -0
- package/skills/egbe-os-product-market-research/references/contracts/funnel-teardown.md +235 -0
- package/skills/egbe-os-product-market-research/references/contracts/geography-comparison.md +71 -0
- package/skills/egbe-os-product-market-research/references/contracts/lifecycle-capture.md +119 -0
- package/skills/egbe-os-product-market-research/references/contracts/research-artifacts.md +520 -0
- package/skills/egbe-os-product-market-research/references/contracts/walk-mechanics.v2.json +18 -0
- package/skills/egbe-os-product-market-research/references/prompts/acquisition-channels.md +137 -0
- package/skills/egbe-os-product-market-research/references/prompts/acquisition-channels.user.md +4 -0
- package/skills/egbe-os-product-market-research/references/prompts/competitive-landscape.md +118 -0
- package/skills/egbe-os-product-market-research/references/prompts/competitive-landscape.user.md +4 -0
- package/skills/egbe-os-product-market-research/references/prompts/demand-validation.md +154 -0
- package/skills/egbe-os-product-market-research/references/prompts/demand-validation.user.md +4 -0
- package/skills/egbe-os-product-market-research/references/prompts/market-size-and-dynamics.md +100 -0
- package/skills/egbe-os-product-market-research/references/prompts/market-size-and-dynamics.user.md +4 -0
- package/skills/egbe-os-product-market-research/references/prompts/pricing-and-monetization.md +126 -0
- package/skills/egbe-os-product-market-research/references/prompts/pricing-and-monetization.user.md +4 -0
- package/skills/egbe-os-product-market-research/references/prompts/target-audience.md +98 -0
- package/skills/egbe-os-product-market-research/references/prompts/target-audience.user.md +4 -0
- package/skills/egbe-os-product-market-research/references/prompts/unit-economics.md +217 -0
- package/skills/egbe-os-product-market-research/references/prompts/unit-economics.user.md +4 -0
- package/skills/egbe-os-product-market-research/references/prompts/value-proposition.md +113 -0
- package/skills/egbe-os-product-market-research/references/prompts/value-proposition.user.md +4 -0
- package/skills/egbe-os-product-market-research/references/workflows/acquisition-channels.md +27 -0
- package/skills/egbe-os-product-market-research/references/workflows/channel-footprint.md +163 -0
- package/skills/egbe-os-product-market-research/references/workflows/community-demand.md +100 -0
- package/skills/egbe-os-product-market-research/references/workflows/competitive-landscape.md +27 -0
- package/skills/egbe-os-product-market-research/references/workflows/competitor-ads.md +82 -0
- package/skills/egbe-os-product-market-research/references/workflows/competitor-set.md +300 -0
- package/skills/egbe-os-product-market-research/references/workflows/creative-patterns.md +228 -0
- package/skills/egbe-os-product-market-research/references/workflows/demand-validation.md +27 -0
- package/skills/egbe-os-product-market-research/references/workflows/fleet-prior.md +80 -0
- package/skills/egbe-os-product-market-research/references/workflows/funnel-teardown.md +184 -0
- package/skills/egbe-os-product-market-research/references/workflows/geography-comparison.md +84 -0
- package/skills/egbe-os-product-market-research/references/workflows/keyword-economics.md +122 -0
- package/skills/egbe-os-product-market-research/references/workflows/lifecycle-capture.md +218 -0
- package/skills/egbe-os-product-market-research/references/workflows/local-research.md +55 -0
- package/skills/egbe-os-product-market-research/references/workflows/market-size-and-dynamics.md +27 -0
- package/skills/egbe-os-product-market-research/references/workflows/preview.md +175 -0
- package/skills/egbe-os-product-market-research/references/workflows/pricing-and-monetization.md +27 -0
- package/skills/egbe-os-product-market-research/references/workflows/recommendations.md +35 -0
- package/skills/egbe-os-product-market-research/references/workflows/review-mining.md +76 -0
- package/skills/egbe-os-product-market-research/references/workflows/target-audience.md +27 -0
- package/skills/egbe-os-product-market-research/references/workflows/tiktok-reels-market-trends.md +46 -0
- package/skills/egbe-os-product-market-research/references/workflows/unit-economics.md +27 -0
- package/skills/egbe-os-product-market-research/references/workflows/value-proposition.md +27 -0
- package/skills/egbe-os-product-market-research/scripts/build-organic-trend-context.py +167 -0
- package/skills/egbe-os-product-market-research/scripts/build-preview-context.py +91 -0
- package/skills/egbe-os-product-market-research/scripts/build-research-query.py +225 -0
- package/skills/egbe-os-product-market-research/scripts/channel-footprint-model.py +294 -0
- package/skills/egbe-os-product-market-research/scripts/connection_identity.py +22 -0
- package/skills/egbe-os-product-market-research/scripts/creative-model.py +364 -0
- package/skills/egbe-os-product-market-research/scripts/creative-selection.py +113 -0
- package/skills/egbe-os-product-market-research/scripts/creative-semantics.py +365 -0
- package/skills/egbe-os-product-market-research/scripts/creative-video.py +542 -0
- package/skills/egbe-os-product-market-research/scripts/egbe_artifacts.py +24 -0
- package/skills/egbe-os-product-market-research/scripts/finalize-organic-trend-watch.py +304 -0
- package/skills/egbe-os-product-market-research/scripts/funnel-email-review.py +97 -0
- package/skills/egbe-os-product-market-research/scripts/funnel-model.py +966 -0
- package/skills/egbe-os-product-market-research/scripts/funnel_features.py +50 -0
- package/skills/egbe-os-product-market-research/scripts/geography-comparison-contract.py +172 -0
- package/skills/egbe-os-product-market-research/scripts/geography-comparison.py +169 -0
- package/skills/egbe-os-product-market-research/scripts/keyword-forecast.py +61 -0
- package/skills/egbe-os-product-market-research/scripts/keyword-locale-publication.py +136 -0
- package/skills/egbe-os-product-market-research/scripts/lifecycle-start.py +190 -0
- package/skills/egbe-os-product-market-research/scripts/persist-research-report.py +63 -0
- package/skills/egbe-os-product-market-research/scripts/research-artifact-io.py +281 -0
- package/skills/egbe-os-product-market-research/scripts/research-evidence.py +496 -0
- package/skills/egbe-os-product-market-research/scripts/research-policy.py +33 -0
- package/skills/egbe-os-product-market-research/scripts/research-section-runtime.py +343 -0
- package/skills/egbe-os-product-market-research/scripts/research-section-workflow.py +288 -0
- package/skills/egbe-os-product-market-research/scripts/research_integrity.py +122 -0
- package/skills/egbe-os-product-market-research/scripts/review-research-completion.py +306 -0
- package/skills/egbe-os-product-market-research/scripts/run-acquisition-channels.py +72 -0
- package/skills/egbe-os-product-market-research/scripts/run-channel-footprint.py +2258 -0
- package/skills/egbe-os-product-market-research/scripts/run-community-demand.py +1603 -0
- package/skills/egbe-os-product-market-research/scripts/run-competitive-landscape.py +66 -0
- package/skills/egbe-os-product-market-research/scripts/run-competitor-ads.py +1156 -0
- package/skills/egbe-os-product-market-research/scripts/run-competitor-set.py +2514 -0
- package/skills/egbe-os-product-market-research/scripts/run-creative-patterns.py +2042 -0
- package/skills/egbe-os-product-market-research/scripts/run-demand-validation.py +72 -0
- package/skills/egbe-os-product-market-research/scripts/run-fleet-prior.py +652 -0
- package/skills/egbe-os-product-market-research/scripts/run-funnel-teardown.py +493 -0
- package/skills/egbe-os-product-market-research/scripts/run-keyword-economics.py +1443 -0
- package/skills/egbe-os-product-market-research/scripts/run-lifecycle-capture.py +1543 -0
- package/skills/egbe-os-product-market-research/scripts/run-market-size-and-dynamics.py +66 -0
- package/skills/egbe-os-product-market-research/scripts/run-os-research.py +311 -0
- package/skills/egbe-os-product-market-research/scripts/run-pricing-and-monetization.py +71 -0
- package/skills/egbe-os-product-market-research/scripts/run-review-mining.py +1051 -0
- package/skills/egbe-os-product-market-research/scripts/run-target-audience.py +66 -0
- package/skills/egbe-os-product-market-research/scripts/run-unit-economics.py +71 -0
- package/skills/egbe-os-product-market-research/scripts/run-value-proposition.py +67 -0
- package/skills/egbe-os-product-market-research/scripts/upsert-markdown-section.py +156 -0
- package/skills/egbe-os-product-market-research/scripts/walk-funnels.py +249 -0
- package/skills/egbe-os-product-market-research/scripts/write-preview.py +710 -0
- package/skills/egbe-os-product-market-research/scripts/write-recommendations.py +272 -0
- package/skills/egbe-os-product-report/SKILL.md +150 -0
- package/skills/egbe-os-product-report/references/artifacts.md +84 -0
- package/skills/egbe-os-product-report/references/brief.md +34 -0
- package/skills/egbe-os-product-report/references/daily.md +76 -0
- package/skills/egbe-os-product-report/references/sources.md +68 -0
- package/skills/egbe-os-product-routines/SKILL.md +166 -0
- package/skills/egbe-os-product-routines/references/catalog.md +22 -0
- package/skills/egbe-os-product-routines/references/continuation-check.md +41 -0
- package/skills/egbe-os-product-routines/references/product-reporting.md +163 -0
- package/skills/egbe-os-product-routines/references/run-preset.md +32 -0
- package/skills/egbe-os-quickstart/scripts/egbe-curl.py +357 -0
- package/skills/egbe-os-quiz-funnel/SKILL.md +152 -0
- package/skills/egbe-os-quiz-funnel/agents/openai.yaml +4 -0
- package/skills/egbe-os-quiz-funnel/assets/engine/quiz-engine.d.mts +224 -0
- package/skills/egbe-os-quiz-funnel/assets/engine/quiz-engine.mjs +652 -0
- package/skills/egbe-os-quiz-funnel/assets/engine/quiz-engine.test.mjs +764 -0
- package/skills/egbe-os-quiz-funnel/assets/engine/quiz-history.d.mts +31 -0
- package/skills/egbe-os-quiz-funnel/assets/engine/quiz-history.mjs +87 -0
- package/skills/egbe-os-quiz-funnel/assets/engine/quiz-history.test.mjs +265 -0
- package/skills/egbe-os-quiz-funnel/assets/engine/quiz-reference.test.mjs +254 -0
- package/skills/egbe-os-quiz-funnel/assets/examples/egbe-docs/product/quizzes/books-checkup/QUIZ.md +195 -0
- package/skills/egbe-os-quiz-funnel/assets/examples/egbe-docs/product/quizzes/books-checkup/quiz.json +421 -0
- package/skills/egbe-os-quiz-funnel/assets/examples/egbe-docs/product/quizzes/books-checkup/quiz.public.json +369 -0
- package/skills/egbe-os-quiz-funnel/assets/examples/egbe-docs/product/quizzes/books-checkup/validation.json +21 -0
- package/skills/egbe-os-quiz-funnel/assets/reference/index.html +26 -0
- package/skills/egbe-os-quiz-funnel/assets/reference/quiz-bootstrap.js +31 -0
- package/skills/egbe-os-quiz-funnel/assets/reference/quiz-early-actions.mjs +11 -0
- package/skills/egbe-os-quiz-funnel/assets/reference/quiz-first-screen.mjs +32 -0
- package/skills/egbe-os-quiz-funnel/assets/reference/quiz-page.mjs +480 -0
- package/skills/egbe-os-quiz-funnel/assets/reference/quiz.css +264 -0
- package/skills/egbe-os-quiz-funnel/references/competitor-teardown.md +159 -0
- package/skills/egbe-os-quiz-funnel/references/conversion-handoff.md +156 -0
- package/skills/egbe-os-quiz-funnel/references/implementation.md +207 -0
- package/skills/egbe-os-quiz-funnel/references/inputs.md +37 -0
- package/skills/egbe-os-quiz-funnel/references/measurement.md +122 -0
- package/skills/egbe-os-quiz-funnel/references/spec-contract.md +335 -0
- package/skills/egbe-os-quiz-funnel/references/verification.md +101 -0
- package/skills/egbe-os-quiz-funnel/references/walk-mechanics.v2.json +18 -0
- package/skills/egbe-os-quiz-funnel/scripts/compile-quiz-spec.py +1869 -0
- package/skills/egbe-os-quiz-funnel/scripts/prepare-research-identity.py +66 -0
- package/skills/egbe-os-reddit-ads/SKILL.md +121 -0
- package/skills/egbe-os-reddit-ads/assets/static-banners/bold-statement/schema.json +41 -0
- package/skills/egbe-os-reddit-ads/assets/static-banners/bold-statement/template.html +106 -0
- package/skills/egbe-os-reddit-ads/assets/static-banners/data-proof/schema.json +61 -0
- package/skills/egbe-os-reddit-ads/assets/static-banners/data-proof/template.html +151 -0
- package/skills/egbe-os-reddit-ads/assets/static-banners/honest-breakdown/schema.json +91 -0
- package/skills/egbe-os-reddit-ads/assets/static-banners/honest-breakdown/template.html +185 -0
- package/skills/egbe-os-reddit-ads/assets/static-banners/question-hook/schema.json +51 -0
- package/skills/egbe-os-reddit-ads/assets/static-banners/question-hook/template.html +121 -0
- package/skills/egbe-os-reddit-ads/assets/static-banners/reddit-post-style/schema.json +87 -0
- package/skills/egbe-os-reddit-ads/assets/static-banners/reddit-post-style/template.html +212 -0
- package/skills/egbe-os-reddit-ads/references/creative/html-to-png-pipeline.md +123 -0
- package/skills/egbe-os-reddit-ads/references/creative/static-banner-qa.md +12 -0
- package/skills/egbe-os-reddit-ads/references/creative/static-banner-system.md +16 -0
- package/skills/egbe-os-reddit-ads/references/destination-requirements.md +36 -0
- package/skills/egbe-os-reddit-ads/references/runtime/api-reference.md +435 -0
- package/skills/egbe-os-reddit-ads/references/runtime/artifacts.md +57 -0
- package/skills/egbe-os-reddit-ads/references/runtime/monitoring.md +64 -0
- package/skills/egbe-os-reddit-ads/references/runtime/pixel-and-tracking.md +49 -0
- package/skills/egbe-os-reddit-ads/references/runtime/policies.md +19 -0
- package/skills/egbe-os-reddit-ads/references/runtime/shared-analytics-attribution.md +14 -0
- package/skills/egbe-os-reddit-ads/references/workflows/build-paused.md +35 -0
- package/skills/egbe-os-reddit-ads/references/workflows/launch-ready.md +19 -0
- package/skills/egbe-os-reddit-ads/references/workflows/launch.md +32 -0
- package/skills/egbe-os-reddit-ads/references/workflows/readiness.md +9 -0
- package/skills/egbe-os-reddit-ads/scripts/capture-ad.sh +178 -0
- package/skills/egbe-os-reddit-ads/scripts/validate-reddit-artifacts.py +187 -0
- package/skills/egbe-os-report-ui/SKILL.md +133 -0
- package/skills/egbe-os-report-ui/assets/egbe-wordmark.svg +9 -0
- package/skills/egbe-os-report-ui/assets/examples/components.html +417 -0
- package/skills/egbe-os-report-ui/assets/examples/editorial.html +209 -0
- package/skills/egbe-os-report-ui/assets/scaffold.html +179 -0
- package/skills/egbe-os-report-ui/references/components.md +209 -0
- package/skills/egbe-os-research/SKILL.md +125 -0
- package/skills/egbe-os-saas-unit-economics/SKILL.md +188 -0
- package/skills/egbe-os-scrape/SKILL.md +160 -0
- package/skills/egbe-os-search/SKILL.md +182 -0
- package/skills/egbe-os-search/references/google-places.md +81 -0
- package/skills/egbe-os-support/SKILL.md +149 -0
- package/skills/egbe-os-telemetry/SKILL.md +344 -0
- package/skills/egbe-os-telemetry/references/harnesses/claude-code.md +97 -0
- package/skills/egbe-os-telemetry/references/harnesses/codex.md +22 -0
- package/skills/egbe-os-telemetry/references/harnesses/hermes.md +39 -0
- package/skills/egbe-os-telemetry/references/harnesses/openclaw.md +139 -0
- package/skills/egbe-os-telemetry/references/harnesses/opencode.md +28 -0
- package/skills/egbe-os-tools/SKILL.md +180 -0
- package/skills/egbe-os-tools/references/theona.md +26 -0
- package/skills/egbe-os-wallet/SKILL.md +181 -0
- package/skills/egbe-setup/EGBE.md +484 -0
- package/skills/egbe-setup/SKILL.md +116 -0
- package/skills/egbe-setup/references/project.md +80 -0
- package/state.js +37 -0
- package/update.js +361 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Billing Experience
|
|
2
|
+
|
|
3
|
+
Use the product's established account layout and design system.
|
|
4
|
+
|
|
5
|
+
The account billing surface should show:
|
|
6
|
+
|
|
7
|
+
- current plan and normalized status;
|
|
8
|
+
- amount, currency, and billing interval;
|
|
9
|
+
- renewal date or effective cancellation/end date;
|
|
10
|
+
- a clear warning for `past_due`, `canceling`, or `paused`;
|
|
11
|
+
- upgrade/start action for a free account;
|
|
12
|
+
- manage billing or reactivate action for an existing customer;
|
|
13
|
+
- access to plan changes, cancellation, payment methods, and invoice history
|
|
14
|
+
through Customer Portal.
|
|
15
|
+
|
|
16
|
+
The shared authenticated user menu should show a compact plan label. Add a
|
|
17
|
+
warning treatment only when the user needs to act; do not turn the navigation
|
|
18
|
+
into a full billing card.
|
|
19
|
+
|
|
20
|
+
Expose stable semantic markers on the live interface so account behavior can be
|
|
21
|
+
verified without depending on visual copy:
|
|
22
|
+
|
|
23
|
+
- `data-billing-page` on the protected billing surface;
|
|
24
|
+
- `data-billing-plan` and `data-billing-status` on current state;
|
|
25
|
+
- `data-billing-action="upgrade|manage|reactivate"` on the applicable enabled
|
|
26
|
+
action;
|
|
27
|
+
- `data-billing-plan-badge` in the authenticated user menu;
|
|
28
|
+
- `data-billing-error` on a visible portal/provider error.
|
|
29
|
+
|
|
30
|
+
These markers supplement accessible labels; they do not replace them.
|
|
31
|
+
|
|
32
|
+
Create Customer Portal sessions on demand from a protected server route using
|
|
33
|
+
the stored owned customer id, deployed `app_slug`, and a fixed relative
|
|
34
|
+
`return_path`. Never expose a reusable portal URL, accept a customer id from the
|
|
35
|
+
browser, or accept a browser-selected absolute return URL. Use the non-mutating
|
|
36
|
+
portal validation endpoint before readiness.
|
|
37
|
+
|
|
38
|
+
Rendering the billing page is a read. It must not create a Stripe Customer,
|
|
39
|
+
Checkout Session, or Customer Portal Session. A free account without a stored
|
|
40
|
+
customer shows the upgrade flow. Customer creation may occur only inside an
|
|
41
|
+
explicit idempotent checkout mutation, and portal creation may occur only after
|
|
42
|
+
an explicit manage action for an existing owned customer.
|
|
43
|
+
|
|
44
|
+
If portal creation fails because of provider configuration, ownership,
|
|
45
|
+
permission, or availability, keep the current billing state intact. Show a
|
|
46
|
+
plain-language error near the action, preserve navigation, and offer retry. Do
|
|
47
|
+
not claim that a plan changed or cancellation succeeded.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Account Billing Workflow
|
|
2
|
+
|
|
3
|
+
Use this workflow after checkout and lifecycle state are present.
|
|
4
|
+
|
|
5
|
+
## References
|
|
6
|
+
|
|
7
|
+
Read [../ux/billing-experience.md](../ux/billing-experience.md) before changing
|
|
8
|
+
the account UI.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Add `/account/billing` stable protected route.
|
|
13
|
+
2. Render the current plan, amount/interval, normalized status, renewal or end
|
|
14
|
+
date, and relevant warning from local provider-synchronized state. Page
|
|
15
|
+
rendering and account-state reads must not create or repair Stripe objects.
|
|
16
|
+
3. Give free users without a stored customer a plan-aware upgrade action that
|
|
17
|
+
enters the existing checkout flow. Do not create a customer merely to make a
|
|
18
|
+
manage action available. Existing customers use an explicit protected server
|
|
19
|
+
action that creates a fresh Customer Portal session from their stored owned
|
|
20
|
+
customer id. Send the deployed `app_slug` and a fixed relative
|
|
21
|
+
`return_path`; never accept a customer id or absolute portal return URL from
|
|
22
|
+
the browser.
|
|
23
|
+
4. Use Customer Portal for plan changes, cancellation, payment methods, and
|
|
24
|
+
invoice history. Assume those capabilities are enabled for this iteration.
|
|
25
|
+
5. Add a compact plan label to the authenticated user menu and link it to the
|
|
26
|
+
billing route. Show actionable warning state for past-due, canceling, or
|
|
27
|
+
paused subscriptions.
|
|
28
|
+
6. Handle portal/configuration/provider failures locally with a useful error and
|
|
29
|
+
retry. Keep the previous billing state until a signed lifecycle event changes
|
|
30
|
+
it.
|
|
31
|
+
7. Verify signed-out denial, cross-account denial, account-page rendering,
|
|
32
|
+
user-menu state, upgrade handoff, and Customer Portal redirect on the live
|
|
33
|
+
product.
|
|
34
|
+
|
|
35
|
+
Treat existing working authentication as product infrastructure and preserve it
|
|
36
|
+
while adding billing. Change auth only when the billing workflow exposes a
|
|
37
|
+
concrete protected-route integration defect.
|
|
38
|
+
|
|
39
|
+
Use the private validation identity prepared by Auth to enter protected account
|
|
40
|
+
Billing through the normal session lookup. Reuse that identity across retries;
|
|
41
|
+
do not create a new login, email delivery, or Billing-only auth path.
|
|
42
|
+
|
|
43
|
+
When an owned customer already exists, call
|
|
44
|
+
`POST /payments/portal-sessions/validate` with the same server-owned customer,
|
|
45
|
+
`app_slug`, and `return_path` before readiness. This verifies ownership and
|
|
46
|
+
same-origin navigation without creating a Stripe Customer Portal Session. When
|
|
47
|
+
no customer exists, verify the protected source/configuration path and the free
|
|
48
|
+
upgrade branch without manufacturing provider state. The real protected user
|
|
49
|
+
action then uses `POST /payments/portal-sessions`.
|
|
50
|
+
|
|
51
|
+
The portal server action follows the same validate-only request contract as
|
|
52
|
+
checkout. If both `X-Egbe-Payment-Probe: validate-only` and a valid
|
|
53
|
+
`X-Egbe-Payment-Probe-ID` are present, forward them to
|
|
54
|
+
`POST /payments/portal-sessions/validate`, return its opaque
|
|
55
|
+
`validation_receipt` in bounded JSON, and do not create or redirect to a real
|
|
56
|
+
Customer Portal Session. Normal user requests still create a fresh portal
|
|
57
|
+
session. Never persist the receipt.
|
|
58
|
+
|
|
59
|
+
## Completion
|
|
60
|
+
|
|
61
|
+
An authenticated user can understand the current plan and safely reach the
|
|
62
|
+
right next billing action. No user can read another account's billing state or
|
|
63
|
+
choose another account's customer id. Provider errors never become false plan
|
|
64
|
+
changes in the UI.
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
# Discounts And Promotion Codes Workflow
|
|
2
|
+
|
|
3
|
+
Use this workflow to add or operate customer-entered promotion codes and
|
|
4
|
+
automatic Checkout discounts. It is complete for any product repository; a
|
|
5
|
+
materialized Billing foundation is optional.
|
|
6
|
+
|
|
7
|
+
## Product boundary
|
|
8
|
+
|
|
9
|
+
Continue the product's existing auth, account, billing configuration, database,
|
|
10
|
+
Checkout, and deployment conventions. Use only the server-side `OS_URL` and
|
|
11
|
+
`OS_API_KEY`. Never request Stripe credentials, call Stripe directly, or expose
|
|
12
|
+
provider ids to browser code.
|
|
13
|
+
|
|
14
|
+
A coupon defines the discount and must be restricted to one or more Stripe
|
|
15
|
+
Products already owned by this product. A promotion code is the text a customer
|
|
16
|
+
enters and always points to one owned coupon. Coupon records are historical
|
|
17
|
+
provider state: do not delete them. To stop customer use, deactivate the
|
|
18
|
+
promotion code.
|
|
19
|
+
|
|
20
|
+
### Production database access from a local agent
|
|
21
|
+
|
|
22
|
+
The managed `DATABASE_URL` is for the deployed runtime and may use a private
|
|
23
|
+
network address. Do not connect to it from a local machine and do not build a
|
|
24
|
+
temporary product endpoint for database maintenance. Fetch the existing
|
|
25
|
+
database access bundle through Egbe OS:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
OS_AGENT_NAME="<your agent name>" python3 "<skills-directory>/egbe-os-quickstart/scripts/egbe-curl.py" --egbe-request "/deploy/<slug>/db" -fsS
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The standard response envelope's `data` contains `apiUrl`, `schema`, `anonKey`,
|
|
32
|
+
and a temporary product-scoped `token`. Determine the real table, filter, and
|
|
33
|
+
column names from the product's migrations and data-access code. Read through
|
|
34
|
+
PostgREST with the returned schema:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
curl -fsS \
|
|
38
|
+
"$DB_API_URL/rest/v1/<table>?<filter-column>=eq.<encoded-value>&select=<columns>" \
|
|
39
|
+
-H "apikey: $DB_ANON_KEY" \
|
|
40
|
+
-H "Authorization: Bearer $DB_TOKEN" \
|
|
41
|
+
-H "Accept-Profile: $DB_SCHEMA"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
For writes, use `Content-Profile` and the same scoped credentials:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
curl -fsS -X PATCH \
|
|
48
|
+
"$DB_API_URL/rest/v1/<table>?<filter-column>=eq.<encoded-value>" \
|
|
49
|
+
-H "apikey: $DB_ANON_KEY" \
|
|
50
|
+
-H "Authorization: Bearer $DB_TOKEN" \
|
|
51
|
+
-H "Content-Profile: $DB_SCHEMA" \
|
|
52
|
+
-H "Accept-Profile: $DB_SCHEMA" \
|
|
53
|
+
-H "Content-Type: application/json" \
|
|
54
|
+
-H "Prefer: return=representation" \
|
|
55
|
+
-d '{"<column>":"<value>"}'
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Keep these values in process memory only. Never commit them, place them in a
|
|
59
|
+
product `.env`, expose them to browser code, or reuse an expired token; fetch a
|
|
60
|
+
fresh bundle instead. If the scoped REST fields are unavailable, stop rather
|
|
61
|
+
than falling back to the private `DATABASE_URL`.
|
|
62
|
+
|
|
63
|
+
## Create and read back provider resources
|
|
64
|
+
|
|
65
|
+
Discover the current route contract first:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
OS_AGENT_NAME="<your agent name>" python3 "<skills-directory>/egbe-os-quickstart/scripts/egbe-curl.py" --egbe-request "/payments/skill" -s
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Create a percent coupon for an owned Stripe Product:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
OS_AGENT_NAME="<your agent name>" python3 "<skills-directory>/egbe-os-quickstart/scripts/egbe-curl.py" --egbe-request "/payments/coupons" -s -X POST \
|
|
75
|
+
-H "Content-Type: application/json" \
|
|
76
|
+
-H "Idempotency-Key: coupon:<stable-logical-name>" \
|
|
77
|
+
-d '{
|
|
78
|
+
"percent_off": 20,
|
|
79
|
+
"duration": "once",
|
|
80
|
+
"applies_to": {"products": ["prod_..."]},
|
|
81
|
+
"name": "Launch offer"
|
|
82
|
+
}'
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
For a fixed discount, use `amount_off` in the smallest currency unit together
|
|
86
|
+
with `currency`. Optional bounds are `max_redemptions`, `redeem_by`, and, for
|
|
87
|
+
`duration: "repeating"`, `duration_in_months`. Never omit
|
|
88
|
+
`applies_to.products`; product credentials cannot create an account-wide
|
|
89
|
+
coupon.
|
|
90
|
+
|
|
91
|
+
Read back only the current product's resources:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
OS_AGENT_NAME="<your agent name>" python3 "<skills-directory>/egbe-os-quickstart/scripts/egbe-curl.py" --egbe-request "/payments/coupons" -s
|
|
95
|
+
OS_AGENT_NAME="<your agent name>" python3 "<skills-directory>/egbe-os-quickstart/scripts/egbe-curl.py" --egbe-request "/payments/coupons/coupon_..." -s
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Create a customer-facing code over the owned coupon, then read it back:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
OS_AGENT_NAME="<your agent name>" python3 "<skills-directory>/egbe-os-quickstart/scripts/egbe-curl.py" --egbe-request "/payments/promotion-codes" -s -X POST \
|
|
102
|
+
-H "Content-Type: application/json" \
|
|
103
|
+
-H "Idempotency-Key: promotion-code:<stable-logical-name>" \
|
|
104
|
+
-d '{"coupon":"coupon_...","code":"WELCOME20"}'
|
|
105
|
+
|
|
106
|
+
OS_AGENT_NAME="<your agent name>" python3 "<skills-directory>/egbe-os-quickstart/scripts/egbe-curl.py" --egbe-request "/payments/promotion-codes?active=true" -s
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
An active code collision returns `409`. Choose the intended product-facing code
|
|
110
|
+
explicitly; do not retry with generated suffixes. To stop one code without
|
|
111
|
+
changing its coupon or sibling codes:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
OS_AGENT_NAME="<your agent name>" python3 "<skills-directory>/egbe-os-quickstart/scripts/egbe-curl.py" --egbe-request "/payments/promotion-codes/promo_.../deactivate" -s -X POST
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Customer-specific codes
|
|
118
|
+
|
|
119
|
+
Customer eligibility begins in the product database, not in Stripe. Before any
|
|
120
|
+
provider request, load every requested email from the product's authoritative
|
|
121
|
+
account table. Reject the whole operation when an email has no account or maps
|
|
122
|
+
to more than one account. An explicit founder-provided email list is input to
|
|
123
|
+
that lookup; it is not proof that the accounts exist.
|
|
124
|
+
|
|
125
|
+
Each eligible account must have exactly one server-only Stripe Customer binding
|
|
126
|
+
persisted on its account or billing record. When a real account has no binding,
|
|
127
|
+
create the Customer explicitly and idempotently, then persist the returned id
|
|
128
|
+
before creating any Promotion Code:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
OS_AGENT_NAME="<your agent name>" python3 "<skills-directory>/egbe-os-quickstart/scripts/egbe-curl.py" --egbe-request "/payments/customers" -s -X POST \
|
|
132
|
+
-H "Content-Type: application/json" \
|
|
133
|
+
-H "Idempotency-Key: customer:<stable-product-account-id>" \
|
|
134
|
+
-d '{"email":"verified-account@example.com"}'
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Do not create another Customer when the account already has a binding or when
|
|
138
|
+
a prior trusted OS operation returned the exact owned Customer for that
|
|
139
|
+
account; validate and persist the existing id instead. If the correct existing
|
|
140
|
+
Customer cannot be identified unambiguously, stop and reconcile the binding.
|
|
141
|
+
Never guess from matching email alone inside product code.
|
|
142
|
+
|
|
143
|
+
After the binding transaction commits, create the restricted Promotion Code
|
|
144
|
+
with the exact Customer id:
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"coupon": "coupon_...",
|
|
149
|
+
"code": "PRIVATE20",
|
|
150
|
+
"customer": "cus_..."
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
The gateway retrieves that Customer and returns `404` unless it belongs to the
|
|
155
|
+
current product. Stripe enforces the resulting code against that exact Customer,
|
|
156
|
+
not against an email string. Both Checkout validation and real Checkout must
|
|
157
|
+
therefore send the same server-loaded `customer`; `customer_email` is not an
|
|
158
|
+
equivalent binding.
|
|
159
|
+
|
|
160
|
+
For a founder-selected list of existing product-account emails, use the bounded
|
|
161
|
+
batch operation with one stable operation id:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
OS_AGENT_NAME="<your agent name>" python3 "<skills-directory>/egbe-os-quickstart/scripts/egbe-curl.py" --egbe-request "/payments/promotion-codes/batch" -s -X POST \
|
|
165
|
+
-H "Content-Type: application/json" \
|
|
166
|
+
-H "Idempotency-Key: promotion-code:<stable-recipient-list-operation>" \
|
|
167
|
+
-d '{
|
|
168
|
+
"coupon":"coupon_...",
|
|
169
|
+
"code":"FOUNDERS20",
|
|
170
|
+
"customer_emails":["first@example.com","second@example.com"]
|
|
171
|
+
}'
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Use the batch only after every email passed the account lookup and every account
|
|
175
|
+
already stores its Stripe Customer binding. The gateway resolves existing owned
|
|
176
|
+
Customers but never creates them in this operation. A missing binding returns
|
|
177
|
+
`409 customer_binding_required`; multiple owned Customers with the same email
|
|
178
|
+
return `409 ambiguous_customer_email`. Either error occurs during full-list
|
|
179
|
+
preflight, before any Promotion Code is created. Fix the account bindings, then
|
|
180
|
+
retry the same logical request and `Idempotency-Key`.
|
|
181
|
+
|
|
182
|
+
The same visible code may be used for different restricted Customers. Confirm
|
|
183
|
+
that every returned `email` → `customer` mapping exactly matches the binding
|
|
184
|
+
already stored on the corresponding account. A mismatch is a failed operation;
|
|
185
|
+
do not offer Checkout until it is reconciled.
|
|
186
|
+
|
|
187
|
+
Store the selected coupon or promotion-code provider reference in the
|
|
188
|
+
product's existing server-only billing configuration or database. Keep the
|
|
189
|
+
customer-visible code and commercial meaning in the product-owned catalog.
|
|
190
|
+
Never put provider ids in `NEXT_PUBLIC_*`, page markup, browser storage, or a
|
|
191
|
+
client-supplied Checkout payload.
|
|
192
|
+
|
|
193
|
+
## Customer-entered codes
|
|
194
|
+
|
|
195
|
+
New Checkout implementations enable the hosted Checkout entry field by
|
|
196
|
+
default. Build this value on the server:
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
{
|
|
200
|
+
"allow_promotion_codes": true
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Pass it in both `POST /payments/checkout-sessions/validate` and
|
|
205
|
+
`POST /payments/checkout-sessions`, preserving every other field and the same
|
|
206
|
+
logical-attempt identity from the product checkout workflow. Existing Checkout
|
|
207
|
+
calls that intentionally omit the field keep their existing behavior.
|
|
208
|
+
|
|
209
|
+
Payment Links support the same `allow_promotion_codes` boolean. They do not
|
|
210
|
+
accept automatic `discounts`.
|
|
211
|
+
|
|
212
|
+
When the product issues customer-restricted codes, load the persisted Customer
|
|
213
|
+
id with the authenticated account and include `customer: "cus_..."` in both
|
|
214
|
+
Checkout validation and creation. Sending only `customer_email` makes the
|
|
215
|
+
restricted code invalid on Stripe-hosted Checkout even when the typed email is
|
|
216
|
+
identical.
|
|
217
|
+
|
|
218
|
+
## Automatic Checkout discount
|
|
219
|
+
|
|
220
|
+
Choose exactly one server-owned reference; sending `discounts` by itself
|
|
221
|
+
already disables customer code entry:
|
|
222
|
+
|
|
223
|
+
```json
|
|
224
|
+
{
|
|
225
|
+
"discounts": [{"coupon": "coupon_..."}]
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
or:
|
|
230
|
+
|
|
231
|
+
```json
|
|
232
|
+
{
|
|
233
|
+
"discounts": [{"promotion_code": "promo_..."}]
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Do not combine `allow_promotion_codes` with `discounts`. Stripe rejects the
|
|
238
|
+
pair even when the value is `false`; the gateway accepts an explicit
|
|
239
|
+
`allow_promotion_codes: false` alongside `discounts` and strips it before
|
|
240
|
+
calling Stripe, while `allow_promotion_codes: true` with `discounts` is
|
|
241
|
+
rejected as ambiguous.
|
|
242
|
+
|
|
243
|
+
The browser may choose a product-owned offer key, but it must never supply the
|
|
244
|
+
provider reference. Resolve that key to the stored server-side reference after
|
|
245
|
+
authentication and plan validation. The gateway rejects multiple discounts,
|
|
246
|
+
foreign resources, discounts that do not apply to the purchased Stripe
|
|
247
|
+
Product, a customer-restricted code without its exact owned Checkout Customer,
|
|
248
|
+
and a payload that combines automatic discounting with customer code entry.
|
|
249
|
+
|
|
250
|
+
## Verification
|
|
251
|
+
|
|
252
|
+
1. Read back the coupon and promotion code through the scoped list and detail
|
|
253
|
+
routes.
|
|
254
|
+
2. Run the normal Checkout `validate-only` path with the final discount mode.
|
|
255
|
+
Confirm `data.discount_mode`, `data.discount_reference`, and
|
|
256
|
+
`data.allow_promotion_codes`; no Checkout Session may be created.
|
|
257
|
+
3. Create a real Checkout Session only from an explicit user mutation and
|
|
258
|
+
verify the hosted page exposes the intended customer-code field or applied
|
|
259
|
+
automatic discount.
|
|
260
|
+
4. Exercise the signed lifecycle workflow. Discounted completion must update
|
|
261
|
+
the same subscription and entitlement state as a full-price purchase; it
|
|
262
|
+
must not enter wallet top-up finalization.
|
|
263
|
+
5. On product archive or disable-sales, confirm every owned active promotion
|
|
264
|
+
code becomes inactive while coupons remain available as historical
|
|
265
|
+
readback.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# One-time purchase and fulfillment
|
|
2
|
+
|
|
3
|
+
Use the accepted offer's price, deliverable, access and refund rules. A one-time
|
|
4
|
+
purchase is not a subscription with an artificial period. The subscription
|
|
5
|
+
scaffold and its lifecycle simulation do not implement this flow.
|
|
6
|
+
|
|
7
|
+
## Bind the purchase
|
|
8
|
+
|
|
9
|
+
Follow [product checkout](product-checkout.md) for the shared catalog, protected
|
|
10
|
+
server endpoint, durable attempt, validation receipt and provider idempotency.
|
|
11
|
+
Use a non-recurring price and `mode: "payment"`.
|
|
12
|
+
|
|
13
|
+
Bind the attempt to a durable local order and its owner before checkout. Set
|
|
14
|
+
`client_reference_id` to a stable server-owned reference that resolves that
|
|
15
|
+
binding; persist the returned Checkout Session id. Resolve price, currency,
|
|
16
|
+
quantity and any existing provider customer on the server. Browser parameters
|
|
17
|
+
or an email address alone cannot establish ownership.
|
|
18
|
+
|
|
19
|
+
If guest purchase is part of the accepted flow, authorize the order through a
|
|
20
|
+
private server-managed session or equivalent unguessable, bounded access
|
|
21
|
+
mechanism. Keep the secret out of shared artifacts and URLs used for analytics.
|
|
22
|
+
An optional collected email is a contact address, not proof of an existing
|
|
23
|
+
account. Later account attachment requires verified ownership; do not merge
|
|
24
|
+
orders merely because emails match. For an account purchase, reuse normal Auth.
|
|
25
|
+
|
|
26
|
+
## Apply payment separately from delivery
|
|
27
|
+
|
|
28
|
+
Follow [webhook security](../security/webhook-and-entitlements.md) for raw-body
|
|
29
|
+
signature verification and the gateway's non-mutating test/preflight branch.
|
|
30
|
+
For a live event, correlate its session/payment-intent ids with the stored attempt
|
|
31
|
+
and expected order. Confirm
|
|
32
|
+
the accepted price/amount and currency, including a valid configured discount;
|
|
33
|
+
an unexplained mismatch must not unlock the product.
|
|
34
|
+
|
|
35
|
+
- `checkout.session.completed` alone is not payment proof: check paid status.
|
|
36
|
+
Delayed methods may complete checkout before payment succeeds.
|
|
37
|
+
- A later `checkout.session.async_payment_succeeded` can confirm that same
|
|
38
|
+
order; `async_payment_failed`, abandonment or expiry cannot grant it.
|
|
39
|
+
- If handling payment-intent events too, correlate them with the same purchase.
|
|
40
|
+
Different event ids may describe one payment; grant once per business order,
|
|
41
|
+
not once per webhook event type.
|
|
42
|
+
- Store the event, payment transition and local right/delivery obligation
|
|
43
|
+
atomically. A valid event that cannot be committed gets a retryable error,
|
|
44
|
+
not success. Handle out-of-order events without regressing confirmed state.
|
|
45
|
+
- Keep paid, fulfilled, failed delivery, refunded and partially refunded facts
|
|
46
|
+
distinct. Apply the accepted refund/access policy; a refund is never a new
|
|
47
|
+
grant. Do not infer revocation rules or create refunds during verification.
|
|
48
|
+
The product records a refund; it does not issue one. Who does is covered by
|
|
49
|
+
[Seller of record, payouts and refunds](../../SKILL.md#seller-of-record-payouts-and-refunds).
|
|
50
|
+
|
|
51
|
+
For an external delivery operation, durably record the pending work with the
|
|
52
|
+
payment transaction, then retry using a stable operation identity. Record the
|
|
53
|
+
actual result so recovery does not send, charge or deliver twice. Do not hold a
|
|
54
|
+
database transaction open across an external side effect or call a successful
|
|
55
|
+
payment a delivered result.
|
|
56
|
+
|
|
57
|
+
The real product consumer authorizes from this durable order/right. Protect
|
|
58
|
+
downloads, background jobs and direct API paths as well as the visible page.
|
|
59
|
+
The success URL is navigation only; show pending confirmation when necessary.
|
|
60
|
+
|
|
61
|
+
## Verify without a real charge
|
|
62
|
+
|
|
63
|
+
Use checkout validate-only for deployed configuration and binding. Prove the
|
|
64
|
+
one-time lifecycle through the application's isolated database and actual
|
|
65
|
+
receiver/consumer, following [durable verification](../security/durable-verification.md):
|
|
66
|
+
valid paid, unpaid, delayed success/failure, duplicates across event types,
|
|
67
|
+
wrong owner/amount, out-of-order refund, rollback and failed delivery recovery.
|
|
68
|
+
Verify that retries of one order reuse its pending attempt, while two orders
|
|
69
|
+
for the same buyer and price remain distinct, including across guest-to-account entry.
|
|
70
|
+
Test markers must remain non-mutating in production; never strip them to force
|
|
71
|
+
a live grant. An isolated signed fixture is not evidence of live payment.
|
|
72
|
+
|
|
73
|
+
Report configuration, durable integration, deployed access and actual payment
|
|
74
|
+
observations separately. A real paid purchase or customer delivery is not
|
|
75
|
+
required merely to prove implementation readiness.
|