availsync 0.1.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/.adal/skills/stripe-best-practices/SKILL.md +42 -0
- package/.adal/skills/stripe-best-practices/references/billing.md +36 -0
- package/.adal/skills/stripe-best-practices/references/connect.md +48 -0
- package/.adal/skills/stripe-best-practices/references/payments.md +79 -0
- package/.adal/skills/stripe-best-practices/references/security.md +109 -0
- package/.adal/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.adal/skills/stripe-projects/SKILL.md +139 -0
- package/.adal/skills/upgrade-stripe/SKILL.md +185 -0
- package/.agents/skills/stripe-best-practices/SKILL.md +42 -0
- package/.agents/skills/stripe-best-practices/references/billing.md +36 -0
- package/.agents/skills/stripe-best-practices/references/connect.md +48 -0
- package/.agents/skills/stripe-best-practices/references/payments.md +79 -0
- package/.agents/skills/stripe-best-practices/references/security.md +109 -0
- package/.agents/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.agents/skills/stripe-projects/SKILL.md +139 -0
- package/.agents/skills/upgrade-stripe/SKILL.md +185 -0
- package/.augment/skills/stripe-best-practices/SKILL.md +42 -0
- package/.augment/skills/stripe-best-practices/references/billing.md +36 -0
- package/.augment/skills/stripe-best-practices/references/connect.md +48 -0
- package/.augment/skills/stripe-best-practices/references/payments.md +79 -0
- package/.augment/skills/stripe-best-practices/references/security.md +109 -0
- package/.augment/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.augment/skills/stripe-projects/SKILL.md +139 -0
- package/.augment/skills/upgrade-stripe/SKILL.md +185 -0
- package/.bob/skills/stripe-best-practices/SKILL.md +42 -0
- package/.bob/skills/stripe-best-practices/references/billing.md +36 -0
- package/.bob/skills/stripe-best-practices/references/connect.md +48 -0
- package/.bob/skills/stripe-best-practices/references/payments.md +79 -0
- package/.bob/skills/stripe-best-practices/references/security.md +109 -0
- package/.bob/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.bob/skills/stripe-projects/SKILL.md +139 -0
- package/.bob/skills/upgrade-stripe/SKILL.md +185 -0
- package/.claude/settings.local.json +7 -0
- package/.claude/skills/stripe-best-practices/SKILL.md +42 -0
- package/.claude/skills/stripe-best-practices/references/billing.md +36 -0
- package/.claude/skills/stripe-best-practices/references/connect.md +48 -0
- package/.claude/skills/stripe-best-practices/references/payments.md +79 -0
- package/.claude/skills/stripe-best-practices/references/security.md +109 -0
- package/.claude/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.claude/skills/stripe-projects/SKILL.md +139 -0
- package/.claude/skills/upgrade-stripe/SKILL.md +185 -0
- package/.codebuddy/skills/stripe-best-practices/SKILL.md +42 -0
- package/.codebuddy/skills/stripe-best-practices/references/billing.md +36 -0
- package/.codebuddy/skills/stripe-best-practices/references/connect.md +48 -0
- package/.codebuddy/skills/stripe-best-practices/references/payments.md +79 -0
- package/.codebuddy/skills/stripe-best-practices/references/security.md +109 -0
- package/.codebuddy/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.codebuddy/skills/stripe-projects/SKILL.md +139 -0
- package/.codebuddy/skills/upgrade-stripe/SKILL.md +185 -0
- package/.commandcode/skills/stripe-best-practices/SKILL.md +42 -0
- package/.commandcode/skills/stripe-best-practices/references/billing.md +36 -0
- package/.commandcode/skills/stripe-best-practices/references/connect.md +48 -0
- package/.commandcode/skills/stripe-best-practices/references/payments.md +79 -0
- package/.commandcode/skills/stripe-best-practices/references/security.md +109 -0
- package/.commandcode/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.commandcode/skills/stripe-projects/SKILL.md +139 -0
- package/.commandcode/skills/upgrade-stripe/SKILL.md +185 -0
- package/.continue/skills/stripe-best-practices/SKILL.md +42 -0
- package/.continue/skills/stripe-best-practices/references/billing.md +36 -0
- package/.continue/skills/stripe-best-practices/references/connect.md +48 -0
- package/.continue/skills/stripe-best-practices/references/payments.md +79 -0
- package/.continue/skills/stripe-best-practices/references/security.md +109 -0
- package/.continue/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.continue/skills/stripe-projects/SKILL.md +139 -0
- package/.continue/skills/upgrade-stripe/SKILL.md +185 -0
- package/.cortex/skills/stripe-best-practices/SKILL.md +42 -0
- package/.cortex/skills/stripe-best-practices/references/billing.md +36 -0
- package/.cortex/skills/stripe-best-practices/references/connect.md +48 -0
- package/.cortex/skills/stripe-best-practices/references/payments.md +79 -0
- package/.cortex/skills/stripe-best-practices/references/security.md +109 -0
- package/.cortex/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.cortex/skills/stripe-projects/SKILL.md +139 -0
- package/.cortex/skills/upgrade-stripe/SKILL.md +185 -0
- package/.crush/skills/stripe-best-practices/SKILL.md +42 -0
- package/.crush/skills/stripe-best-practices/references/billing.md +36 -0
- package/.crush/skills/stripe-best-practices/references/connect.md +48 -0
- package/.crush/skills/stripe-best-practices/references/payments.md +79 -0
- package/.crush/skills/stripe-best-practices/references/security.md +109 -0
- package/.crush/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.crush/skills/stripe-projects/SKILL.md +139 -0
- package/.crush/skills/upgrade-stripe/SKILL.md +185 -0
- package/.env.example +20 -0
- package/.factory/skills/stripe-best-practices/SKILL.md +42 -0
- package/.factory/skills/stripe-best-practices/references/billing.md +36 -0
- package/.factory/skills/stripe-best-practices/references/connect.md +48 -0
- package/.factory/skills/stripe-best-practices/references/payments.md +79 -0
- package/.factory/skills/stripe-best-practices/references/security.md +109 -0
- package/.factory/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.factory/skills/stripe-projects/SKILL.md +139 -0
- package/.factory/skills/upgrade-stripe/SKILL.md +185 -0
- package/.goose/skills/stripe-best-practices/SKILL.md +42 -0
- package/.goose/skills/stripe-best-practices/references/billing.md +36 -0
- package/.goose/skills/stripe-best-practices/references/connect.md +48 -0
- package/.goose/skills/stripe-best-practices/references/payments.md +79 -0
- package/.goose/skills/stripe-best-practices/references/security.md +109 -0
- package/.goose/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.goose/skills/stripe-projects/SKILL.md +139 -0
- package/.goose/skills/upgrade-stripe/SKILL.md +185 -0
- package/.iflow/skills/stripe-best-practices/SKILL.md +42 -0
- package/.iflow/skills/stripe-best-practices/references/billing.md +36 -0
- package/.iflow/skills/stripe-best-practices/references/connect.md +48 -0
- package/.iflow/skills/stripe-best-practices/references/payments.md +79 -0
- package/.iflow/skills/stripe-best-practices/references/security.md +109 -0
- package/.iflow/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.iflow/skills/stripe-projects/SKILL.md +139 -0
- package/.iflow/skills/upgrade-stripe/SKILL.md +185 -0
- package/.junie/skills/stripe-best-practices/SKILL.md +42 -0
- package/.junie/skills/stripe-best-practices/references/billing.md +36 -0
- package/.junie/skills/stripe-best-practices/references/connect.md +48 -0
- package/.junie/skills/stripe-best-practices/references/payments.md +79 -0
- package/.junie/skills/stripe-best-practices/references/security.md +109 -0
- package/.junie/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.junie/skills/stripe-projects/SKILL.md +139 -0
- package/.junie/skills/upgrade-stripe/SKILL.md +185 -0
- package/.kilocode/skills/stripe-best-practices/SKILL.md +42 -0
- package/.kilocode/skills/stripe-best-practices/references/billing.md +36 -0
- package/.kilocode/skills/stripe-best-practices/references/connect.md +48 -0
- package/.kilocode/skills/stripe-best-practices/references/payments.md +79 -0
- package/.kilocode/skills/stripe-best-practices/references/security.md +109 -0
- package/.kilocode/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.kilocode/skills/stripe-projects/SKILL.md +139 -0
- package/.kilocode/skills/upgrade-stripe/SKILL.md +185 -0
- package/.kiro/skills/stripe-best-practices/SKILL.md +42 -0
- package/.kiro/skills/stripe-best-practices/references/billing.md +36 -0
- package/.kiro/skills/stripe-best-practices/references/connect.md +48 -0
- package/.kiro/skills/stripe-best-practices/references/payments.md +79 -0
- package/.kiro/skills/stripe-best-practices/references/security.md +109 -0
- package/.kiro/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.kiro/skills/stripe-projects/SKILL.md +139 -0
- package/.kiro/skills/upgrade-stripe/SKILL.md +185 -0
- package/.kode/skills/stripe-best-practices/SKILL.md +42 -0
- package/.kode/skills/stripe-best-practices/references/billing.md +36 -0
- package/.kode/skills/stripe-best-practices/references/connect.md +48 -0
- package/.kode/skills/stripe-best-practices/references/payments.md +79 -0
- package/.kode/skills/stripe-best-practices/references/security.md +109 -0
- package/.kode/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.kode/skills/stripe-projects/SKILL.md +139 -0
- package/.kode/skills/upgrade-stripe/SKILL.md +185 -0
- package/.mcpjam/skills/stripe-best-practices/SKILL.md +42 -0
- package/.mcpjam/skills/stripe-best-practices/references/billing.md +36 -0
- package/.mcpjam/skills/stripe-best-practices/references/connect.md +48 -0
- package/.mcpjam/skills/stripe-best-practices/references/payments.md +79 -0
- package/.mcpjam/skills/stripe-best-practices/references/security.md +109 -0
- package/.mcpjam/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.mcpjam/skills/stripe-projects/SKILL.md +139 -0
- package/.mcpjam/skills/upgrade-stripe/SKILL.md +185 -0
- package/.mux/skills/stripe-best-practices/SKILL.md +42 -0
- package/.mux/skills/stripe-best-practices/references/billing.md +36 -0
- package/.mux/skills/stripe-best-practices/references/connect.md +48 -0
- package/.mux/skills/stripe-best-practices/references/payments.md +79 -0
- package/.mux/skills/stripe-best-practices/references/security.md +109 -0
- package/.mux/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.mux/skills/stripe-projects/SKILL.md +139 -0
- package/.mux/skills/upgrade-stripe/SKILL.md +185 -0
- package/.neovate/skills/stripe-best-practices/SKILL.md +42 -0
- package/.neovate/skills/stripe-best-practices/references/billing.md +36 -0
- package/.neovate/skills/stripe-best-practices/references/connect.md +48 -0
- package/.neovate/skills/stripe-best-practices/references/payments.md +79 -0
- package/.neovate/skills/stripe-best-practices/references/security.md +109 -0
- package/.neovate/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.neovate/skills/stripe-projects/SKILL.md +139 -0
- package/.neovate/skills/upgrade-stripe/SKILL.md +185 -0
- package/.nixpacksignore +14 -0
- package/.openhands/skills/stripe-best-practices/SKILL.md +42 -0
- package/.openhands/skills/stripe-best-practices/references/billing.md +36 -0
- package/.openhands/skills/stripe-best-practices/references/connect.md +48 -0
- package/.openhands/skills/stripe-best-practices/references/payments.md +79 -0
- package/.openhands/skills/stripe-best-practices/references/security.md +109 -0
- package/.openhands/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.openhands/skills/stripe-projects/SKILL.md +139 -0
- package/.openhands/skills/upgrade-stripe/SKILL.md +185 -0
- package/.pi/skills/stripe-best-practices/SKILL.md +42 -0
- package/.pi/skills/stripe-best-practices/references/billing.md +36 -0
- package/.pi/skills/stripe-best-practices/references/connect.md +48 -0
- package/.pi/skills/stripe-best-practices/references/payments.md +79 -0
- package/.pi/skills/stripe-best-practices/references/security.md +109 -0
- package/.pi/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.pi/skills/stripe-projects/SKILL.md +139 -0
- package/.pi/skills/upgrade-stripe/SKILL.md +185 -0
- package/.pochi/skills/stripe-best-practices/SKILL.md +42 -0
- package/.pochi/skills/stripe-best-practices/references/billing.md +36 -0
- package/.pochi/skills/stripe-best-practices/references/connect.md +48 -0
- package/.pochi/skills/stripe-best-practices/references/payments.md +79 -0
- package/.pochi/skills/stripe-best-practices/references/security.md +109 -0
- package/.pochi/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.pochi/skills/stripe-projects/SKILL.md +139 -0
- package/.pochi/skills/upgrade-stripe/SKILL.md +185 -0
- package/.qoder/skills/stripe-best-practices/SKILL.md +42 -0
- package/.qoder/skills/stripe-best-practices/references/billing.md +36 -0
- package/.qoder/skills/stripe-best-practices/references/connect.md +48 -0
- package/.qoder/skills/stripe-best-practices/references/payments.md +79 -0
- package/.qoder/skills/stripe-best-practices/references/security.md +109 -0
- package/.qoder/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.qoder/skills/stripe-projects/SKILL.md +139 -0
- package/.qoder/skills/upgrade-stripe/SKILL.md +185 -0
- package/.qwen/skills/stripe-best-practices/SKILL.md +42 -0
- package/.qwen/skills/stripe-best-practices/references/billing.md +36 -0
- package/.qwen/skills/stripe-best-practices/references/connect.md +48 -0
- package/.qwen/skills/stripe-best-practices/references/payments.md +79 -0
- package/.qwen/skills/stripe-best-practices/references/security.md +109 -0
- package/.qwen/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.qwen/skills/stripe-projects/SKILL.md +139 -0
- package/.qwen/skills/upgrade-stripe/SKILL.md +185 -0
- package/.roo/skills/stripe-best-practices/SKILL.md +42 -0
- package/.roo/skills/stripe-best-practices/references/billing.md +36 -0
- package/.roo/skills/stripe-best-practices/references/connect.md +48 -0
- package/.roo/skills/stripe-best-practices/references/payments.md +79 -0
- package/.roo/skills/stripe-best-practices/references/security.md +109 -0
- package/.roo/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.roo/skills/stripe-projects/SKILL.md +139 -0
- package/.roo/skills/upgrade-stripe/SKILL.md +185 -0
- package/.trae/skills/stripe-best-practices/SKILL.md +42 -0
- package/.trae/skills/stripe-best-practices/references/billing.md +36 -0
- package/.trae/skills/stripe-best-practices/references/connect.md +48 -0
- package/.trae/skills/stripe-best-practices/references/payments.md +79 -0
- package/.trae/skills/stripe-best-practices/references/security.md +109 -0
- package/.trae/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.trae/skills/stripe-projects/SKILL.md +139 -0
- package/.trae/skills/upgrade-stripe/SKILL.md +185 -0
- package/.vibe/skills/stripe-best-practices/SKILL.md +42 -0
- package/.vibe/skills/stripe-best-practices/references/billing.md +36 -0
- package/.vibe/skills/stripe-best-practices/references/connect.md +48 -0
- package/.vibe/skills/stripe-best-practices/references/payments.md +79 -0
- package/.vibe/skills/stripe-best-practices/references/security.md +109 -0
- package/.vibe/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.vibe/skills/stripe-projects/SKILL.md +139 -0
- package/.vibe/skills/upgrade-stripe/SKILL.md +185 -0
- package/.windsurf/skills/stripe-best-practices/SKILL.md +42 -0
- package/.windsurf/skills/stripe-best-practices/references/billing.md +36 -0
- package/.windsurf/skills/stripe-best-practices/references/connect.md +48 -0
- package/.windsurf/skills/stripe-best-practices/references/payments.md +79 -0
- package/.windsurf/skills/stripe-best-practices/references/security.md +109 -0
- package/.windsurf/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.windsurf/skills/stripe-projects/SKILL.md +139 -0
- package/.windsurf/skills/upgrade-stripe/SKILL.md +185 -0
- package/.zencoder/skills/stripe-best-practices/SKILL.md +42 -0
- package/.zencoder/skills/stripe-best-practices/references/billing.md +36 -0
- package/.zencoder/skills/stripe-best-practices/references/connect.md +48 -0
- package/.zencoder/skills/stripe-best-practices/references/payments.md +79 -0
- package/.zencoder/skills/stripe-best-practices/references/security.md +109 -0
- package/.zencoder/skills/stripe-best-practices/references/treasury.md +16 -0
- package/.zencoder/skills/stripe-projects/SKILL.md +139 -0
- package/.zencoder/skills/upgrade-stripe/SKILL.md +185 -0
- package/AUDIT.md +95 -0
- package/BLOCKERS.md +0 -0
- package/COOLIFY.md +51 -0
- package/MCP_SETUP.md +23 -0
- package/PRODUCTION_CHECKLIST.md +246 -0
- package/README.md +47 -0
- package/ROADMAP.md +91 -0
- package/docs/superpowers/plans/2026-05-11-availsync-frontend-sales-flow.md +2445 -0
- package/frontend/.env.example +2 -0
- package/frontend/app/admin/layout.tsx +13 -0
- package/frontend/app/admin/page.tsx +747 -0
- package/frontend/app/app/activity/page.tsx +257 -0
- package/frontend/app/app/agents/[agentId]/page.tsx +21 -0
- package/frontend/app/app/agents/page.tsx +1155 -0
- package/frontend/app/app/audit/page.tsx +225 -0
- package/frontend/app/app/availability/page.tsx +840 -0
- package/frontend/app/app/holds/page.tsx +262 -0
- package/frontend/app/app/layout.tsx +19 -0
- package/frontend/app/app/onboarding/page.tsx +10 -0
- package/frontend/app/app/onboarding/verify/page.tsx +309 -0
- package/frontend/app/app/page.tsx +508 -0
- package/frontend/app/app/settings/page.tsx +399 -0
- package/frontend/app/app/work/page.tsx +426 -0
- package/frontend/app/changelog/page.tsx +93 -0
- package/frontend/app/checkout/page.tsx +25 -0
- package/frontend/app/docs/api/page.tsx +157 -0
- package/frontend/app/docs/page.tsx +296 -0
- package/frontend/app/docs/pilot/page.tsx +127 -0
- package/frontend/app/docs/quickstart/page.tsx +318 -0
- package/frontend/app/docs/reliability/page.tsx +78 -0
- package/frontend/app/docs/sdk/node/page.tsx +166 -0
- package/frontend/app/globals.css +57 -0
- package/frontend/app/icon.png +0 -0
- package/frontend/app/layout.tsx +87 -0
- package/frontend/app/login/page.tsx +14 -0
- package/frontend/app/page.tsx +47 -0
- package/frontend/app/pricing/page.tsx +66 -0
- package/frontend/app/privacy/page.tsx +52 -0
- package/frontend/app/robots.ts +26 -0
- package/frontend/app/security/page.tsx +74 -0
- package/frontend/app/signup/page.tsx +14 -0
- package/frontend/app/sitemap.ts +14 -0
- package/frontend/app/terms/page.tsx +51 -0
- package/frontend/components/brand/AvailsyncLogo.tsx +56 -0
- package/frontend/components/checkout/CheckoutClient.tsx +100 -0
- package/frontend/components/dashboard/AgentForm.tsx +59 -0
- package/frontend/components/dashboard/AppShell.tsx +291 -0
- package/frontend/components/dashboard/AvailabilityChecker.tsx +117 -0
- package/frontend/components/dashboard/AvailabilityWindowForm.tsx +40 -0
- package/frontend/components/dashboard/HoldForm.tsx +133 -0
- package/frontend/components/dashboard/MetricCard.tsx +10 -0
- package/frontend/components/login/LoginForm.tsx +95 -0
- package/frontend/components/marketing/AgentCoordinationStory.tsx +1530 -0
- package/frontend/components/marketing/Faq.tsx +41 -0
- package/frontend/components/marketing/Hero.tsx +73 -0
- package/frontend/components/marketing/HowItWorks.tsx +28 -0
- package/frontend/components/marketing/ObserveModeTeaser.tsx +41 -0
- package/frontend/components/marketing/PricingTeaser.tsx +23 -0
- package/frontend/components/marketing/ProblemSolution.tsx +36 -0
- package/frontend/components/marketing/SiteFooter.tsx +59 -0
- package/frontend/components/marketing/SiteHeader.tsx +45 -0
- package/frontend/components/marketing/UseCases.tsx +27 -0
- package/frontend/components/onboarding/OnboardingClient.tsx +278 -0
- package/frontend/components/pricing/PricingCards.tsx +65 -0
- package/frontend/components/privacy/CookieConsent.tsx +230 -0
- package/frontend/components/privacy/CookieSettingsButton.tsx +15 -0
- package/frontend/components/seo/JsonLd.tsx +10 -0
- package/frontend/components/signup/SignupForm.tsx +55 -0
- package/frontend/components/ui/Badge.tsx +23 -0
- package/frontend/components/ui/Button.tsx +37 -0
- package/frontend/components/ui/Card.tsx +11 -0
- package/frontend/components/ui/ConfirmDialog.tsx +77 -0
- package/frontend/components/ui/EmptyState.tsx +24 -0
- package/frontend/components/ui/Input.tsx +14 -0
- package/frontend/components/ui/KeyDisplay.tsx +49 -0
- package/frontend/components/ui/Select.tsx +14 -0
- package/frontend/components/ui/Skeleton.tsx +24 -0
- package/frontend/components/ui/Tabs.tsx +19 -0
- package/frontend/components/ui/Textarea.tsx +14 -0
- package/frontend/components/ui/Toast.tsx +78 -0
- package/frontend/components/waitlist/WaitlistDialog.tsx +128 -0
- package/frontend/lib/api.ts +1282 -0
- package/frontend/lib/billing.ts +6 -0
- package/frontend/lib/cookieConsent.ts +113 -0
- package/frontend/lib/format.ts +16 -0
- package/frontend/lib/plans.ts +62 -0
- package/frontend/lib/schemas.ts +108 -0
- package/frontend/lib/seo.ts +376 -0
- package/frontend/lib/setupGuides.ts +630 -0
- package/frontend/lib/storage.ts +30 -0
- package/frontend/next-env.d.ts +6 -0
- package/frontend/next.config.mjs +13 -0
- package/frontend/package-lock.json +14409 -0
- package/frontend/package.json +41 -0
- package/frontend/playwright.config.ts +20 -0
- package/frontend/postcss.config.mjs +8 -0
- package/frontend/public/.gitkeep +0 -0
- package/frontend/public/brand/availsync-logo-board.png +0 -0
- package/frontend/public/brand/availsync-logo-dark.png +0 -0
- package/frontend/public/brand/availsync-mark-dark.png +0 -0
- package/frontend/public/brand/availsync-wordmark-dark.png +0 -0
- package/frontend/public/marketing/hero-agent-coordination.png +0 -0
- package/frontend/tailwind.config.ts +53 -0
- package/frontend/tests/smoke.spec.ts +89 -0
- package/frontend/tsconfig.json +23 -0
- package/jest.config.js +7 -0
- package/nixpacks.toml +11 -0
- package/package.json +53 -0
- package/packages/mcp/LICENSE +21 -0
- package/packages/mcp/README.md +60 -0
- package/packages/mcp/jest.config.cjs +8 -0
- package/packages/mcp/package.json +54 -0
- package/packages/mcp/src/helpers.ts +38 -0
- package/packages/mcp/src/index.test.ts +60 -0
- package/packages/mcp/src/index.ts +387 -0
- package/packages/mcp/tsconfig.json +20 -0
- package/packages/mcp/tsconfig.test.json +12 -0
- package/packages/node/LICENSE +21 -0
- package/packages/node/README.md +120 -0
- package/packages/node/jest.config.cjs +8 -0
- package/packages/node/package.json +46 -0
- package/packages/node/src/index.test.ts +360 -0
- package/packages/node/src/index.ts +402 -0
- package/packages/node/tsconfig.json +20 -0
- package/packages/node/tsconfig.test.json +12 -0
- package/plan.md +923 -0
- package/skills/stripe-best-practices/SKILL.md +42 -0
- package/skills/stripe-best-practices/references/billing.md +36 -0
- package/skills/stripe-best-practices/references/connect.md +48 -0
- package/skills/stripe-best-practices/references/payments.md +79 -0
- package/skills/stripe-best-practices/references/security.md +109 -0
- package/skills/stripe-best-practices/references/treasury.md +16 -0
- package/skills/stripe-projects/SKILL.md +139 -0
- package/skills/upgrade-stripe/SKILL.md +185 -0
- package/skills-lock.json +20 -0
- package/src/core/availability.ts +178 -0
- package/src/core/conflict.ts +209 -0
- package/src/core/work.ts +490 -0
- package/src/db/client.ts +17 -0
- package/src/db/migrations/001_init.sql +88 -0
- package/src/db/migrations/002_stripe.sql +2 -0
- package/src/db/migrations/003_workspace_auth.sql +19 -0
- package/src/db/migrations/004_agent_mcp_status.sql +2 -0
- package/src/db/migrations/005_hold_event_actor.sql +4 -0
- package/src/db/migrations/006_agent_activity.sql +35 -0
- package/src/db/migrations/007_work_coordination.sql +60 -0
- package/src/db/migrations/008_work_claim_leases.sql +20 -0
- package/src/db/migrations/009_billing_subscription_state.sql +23 -0
- package/src/db/migrations/010_agent_api_key_prefix.sql +10 -0
- package/src/db/migrations/011_org_verified_and_work_event_retention.sql +11 -0
- package/src/db/migrations/012_agent_enforcement_mode.sql +12 -0
- package/src/db/migrations/013_support_tickets.sql +21 -0
- package/src/db/migrations/014_paid_plan_waitlist.sql +23 -0
- package/src/db/migrations/015_agent_last_seen.sql +2 -0
- package/src/db/migrations.ts +164 -0
- package/src/db/run-migrations.ts +13 -0
- package/src/index.ts +183 -0
- package/src/lib/activity.ts +137 -0
- package/src/lib/apiKeys.ts +32 -0
- package/src/lib/appInfo.ts +26 -0
- package/src/lib/billingConfig.ts +3 -0
- package/src/lib/env.ts +75 -0
- package/src/lib/logger.ts +8 -0
- package/src/lib/plans.ts +204 -0
- package/src/mcp/server.js +5 -0
- package/src/mcp/server.ts +350 -0
- package/src/middleware/auth.ts +342 -0
- package/src/middleware/requestId.ts +16 -0
- package/src/routes/account.ts +168 -0
- package/src/routes/activity.ts +126 -0
- package/src/routes/admin.ts +514 -0
- package/src/routes/audit.ts +68 -0
- package/src/routes/auth.ts +203 -0
- package/src/routes/availability.ts +325 -0
- package/src/routes/billing.ts +406 -0
- package/src/routes/conflicts.ts +131 -0
- package/src/routes/holds.ts +437 -0
- package/src/routes/mcp.ts +57 -0
- package/src/routes/metrics.ts +39 -0
- package/src/routes/onboarding.ts +273 -0
- package/src/routes/orgs.ts +981 -0
- package/src/routes/preferences.ts +132 -0
- package/src/routes/session.ts +16 -0
- package/src/routes/support.ts +77 -0
- package/src/routes/value.ts +186 -0
- package/src/routes/waitlist.ts +63 -0
- package/src/routes/work.ts +1578 -0
- package/src/server.ts +36 -0
- package/src/types/index.ts +109 -0
- package/tests/integration/activity.route.test.ts +103 -0
- package/tests/integration/admin.route.test.ts +143 -0
- package/tests/integration/agent-keys.route.test.ts +237 -0
- package/tests/integration/availability.route.test.ts +125 -0
- package/tests/integration/billing.route.test.ts +393 -0
- package/tests/integration/conflicts.route.test.ts +131 -0
- package/tests/integration/flows.test.ts +154 -0
- package/tests/integration/helpers.ts +134 -0
- package/tests/integration/holds.route.test.ts +185 -0
- package/tests/integration/metrics.route.test.ts +100 -0
- package/tests/integration/onboarding.verify.route.test.ts +163 -0
- package/tests/integration/preferences.route.test.ts +53 -0
- package/tests/integration/session.route.test.ts +97 -0
- package/tests/integration/system.route.test.ts +92 -0
- package/tests/integration/value.route.test.ts +235 -0
- package/tests/integration/work.route.test.ts +745 -0
- package/tests/setup.ts +4 -0
- package/tests/smoke.sh +62 -0
- package/tests/unit/auth.test.ts +114 -0
- package/tests/unit/availability.test.ts +149 -0
- package/tests/unit/conflict.test.ts +118 -0
- package/tests/unit/env.test.ts +69 -0
- package/tests/unit/migrations.test.ts +135 -0
- package/tests/unit/request-id.test.ts +37 -0
- package/tmp-mobile-agents.png +0 -0
- package/tmp-next-mobile.err.log +10 -0
- package/tmp-next-mobile.log +5 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import Stripe from 'stripe';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import pool from '../db/client';
|
|
5
|
+
import {
|
|
6
|
+
clearWorkspaceSessionCookie,
|
|
7
|
+
requireWorkspaceSession,
|
|
8
|
+
type WorkspaceAuthenticatedRequest,
|
|
9
|
+
} from '../middleware/auth';
|
|
10
|
+
import { requestIdFrom } from '../middleware/requestId';
|
|
11
|
+
import { log } from '../lib/logger';
|
|
12
|
+
|
|
13
|
+
const router = express.Router();
|
|
14
|
+
|
|
15
|
+
const DeleteWorkspaceSchema = z.object({
|
|
16
|
+
confirmation: z.literal('DELETE'),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const terminalSubscriptionStatuses = new Set(['canceled', 'incomplete_expired']);
|
|
20
|
+
|
|
21
|
+
function getStripe(secret: string) {
|
|
22
|
+
return new Stripe(secret);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async function cancelStripeSubscription(subscriptionId: string) {
|
|
26
|
+
const secret = process.env.STRIPE_SECRET_KEY;
|
|
27
|
+
if (!secret) {
|
|
28
|
+
return {
|
|
29
|
+
ok: false as const,
|
|
30
|
+
status: 501,
|
|
31
|
+
body: {
|
|
32
|
+
error: 'billing_not_configured',
|
|
33
|
+
message: 'Stripe must be configured before deleting a workspace with an active subscription.',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
try {
|
|
39
|
+
const stripe = getStripe(secret);
|
|
40
|
+
await stripe.subscriptions.cancel(subscriptionId);
|
|
41
|
+
return { ok: true as const };
|
|
42
|
+
} catch (err) {
|
|
43
|
+
const stripeError = err as { code?: string; message?: string };
|
|
44
|
+
if (stripeError.code === 'resource_missing') {
|
|
45
|
+
log.warn('[account] Stripe subscription missing during workspace delete', {
|
|
46
|
+
subscription_id: subscriptionId,
|
|
47
|
+
});
|
|
48
|
+
return { ok: true as const };
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
log.error('[account] Stripe subscription cancellation failed', {
|
|
52
|
+
subscription_id: subscriptionId,
|
|
53
|
+
error: stripeError.message,
|
|
54
|
+
});
|
|
55
|
+
return {
|
|
56
|
+
ok: false as const,
|
|
57
|
+
status: 502,
|
|
58
|
+
body: {
|
|
59
|
+
error: 'stripe_cancellation_failed',
|
|
60
|
+
message: 'Could not cancel the active Stripe subscription. Try again or contact support.',
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
router.delete('/account/workspace', requireWorkspaceSession, async (req, res) => {
|
|
67
|
+
const parsed = DeleteWorkspaceSchema.safeParse(req.body);
|
|
68
|
+
if (!parsed.success) {
|
|
69
|
+
return res.status(422).json({
|
|
70
|
+
error: 'validation_error',
|
|
71
|
+
message: 'Type DELETE to confirm permanent workspace deletion.',
|
|
72
|
+
details: parsed.error.flatten(),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const authReq = req as WorkspaceAuthenticatedRequest;
|
|
77
|
+
const orgId = authReq.org.id;
|
|
78
|
+
|
|
79
|
+
try {
|
|
80
|
+
const orgResult = await pool.query<{
|
|
81
|
+
id: string;
|
|
82
|
+
stripe_subscription_id: string | null;
|
|
83
|
+
subscription_status: string | null;
|
|
84
|
+
}>(
|
|
85
|
+
`SELECT id, stripe_subscription_id, subscription_status
|
|
86
|
+
FROM orgs
|
|
87
|
+
WHERE id = $1`,
|
|
88
|
+
[orgId],
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
const org = orgResult.rows[0];
|
|
92
|
+
if (!org) {
|
|
93
|
+
clearWorkspaceSessionCookie(res);
|
|
94
|
+
return res.status(404).json({ error: 'org_not_found', message: 'Workspace not found' });
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (org.stripe_subscription_id && !terminalSubscriptionStatuses.has(org.subscription_status ?? '')) {
|
|
98
|
+
const cancellation = await cancelStripeSubscription(org.stripe_subscription_id);
|
|
99
|
+
if (!cancellation.ok) {
|
|
100
|
+
return res.status(cancellation.status).json({
|
|
101
|
+
...cancellation.body,
|
|
102
|
+
request_id: requestIdFrom(res),
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const client = await pool.connect();
|
|
108
|
+
try {
|
|
109
|
+
await client.query('BEGIN');
|
|
110
|
+
|
|
111
|
+
await client.query(
|
|
112
|
+
`DELETE FROM workspace_sessions
|
|
113
|
+
USING workspace_users
|
|
114
|
+
WHERE workspace_sessions.user_id = workspace_users.id
|
|
115
|
+
AND workspace_users.org_id = $1`,
|
|
116
|
+
[orgId],
|
|
117
|
+
);
|
|
118
|
+
await client.query('DELETE FROM hold_events WHERE org_id = $1', [orgId]);
|
|
119
|
+
await client.query('DELETE FROM work_claim_events WHERE org_id = $1', [orgId]);
|
|
120
|
+
await client.query('DELETE FROM holds WHERE org_id = $1', [orgId]);
|
|
121
|
+
await client.query('DELETE FROM work_claims WHERE org_id = $1', [orgId]);
|
|
122
|
+
await client.query('DELETE FROM work_resources WHERE org_id = $1', [orgId]);
|
|
123
|
+
await client.query('DELETE FROM agent_activity_events WHERE org_id = $1', [orgId]);
|
|
124
|
+
await client.query('DELETE FROM conflict_rules WHERE org_id = $1', [orgId]);
|
|
125
|
+
await client.query('DELETE FROM support_tickets WHERE org_id = $1', [orgId]);
|
|
126
|
+
await client.query(
|
|
127
|
+
`DELETE FROM paid_plan_waitlist
|
|
128
|
+
WHERE org_id = $1
|
|
129
|
+
OR user_id = $2
|
|
130
|
+
OR lower(email) = lower($3)`,
|
|
131
|
+
[orgId, authReq.user.id, authReq.user.email],
|
|
132
|
+
);
|
|
133
|
+
await client.query('DELETE FROM agents WHERE org_id = $1', [orgId]);
|
|
134
|
+
await client.query('DELETE FROM workspace_users WHERE org_id = $1', [orgId]);
|
|
135
|
+
await client.query('DELETE FROM orgs WHERE id = $1', [orgId]);
|
|
136
|
+
|
|
137
|
+
await client.query('COMMIT');
|
|
138
|
+
} catch (err) {
|
|
139
|
+
await client.query('ROLLBACK').catch(() => {});
|
|
140
|
+
throw err;
|
|
141
|
+
} finally {
|
|
142
|
+
client.release();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
clearWorkspaceSessionCookie(res);
|
|
146
|
+
log.info('[account] workspace deleted', {
|
|
147
|
+
request_id: requestIdFrom(res),
|
|
148
|
+
org_id: orgId,
|
|
149
|
+
user_id: authReq.user.id,
|
|
150
|
+
canceled_subscription: Boolean(org.stripe_subscription_id),
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
return res.json({ ok: true });
|
|
154
|
+
} catch (err) {
|
|
155
|
+
log.error('[account] workspace delete error', {
|
|
156
|
+
request_id: requestIdFrom(res),
|
|
157
|
+
org_id: orgId,
|
|
158
|
+
error: (err as Error).message,
|
|
159
|
+
});
|
|
160
|
+
return res.status(500).json({
|
|
161
|
+
error: 'internal_error',
|
|
162
|
+
message: 'Could not delete the workspace. Try again or contact support.',
|
|
163
|
+
request_id: requestIdFrom(res),
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
export default router;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import pool from '../db/client';
|
|
4
|
+
import { log } from '../lib/logger';
|
|
5
|
+
import { agentActor, logActivity } from '../lib/activity';
|
|
6
|
+
import { enforcePlanLimit } from '../lib/plans';
|
|
7
|
+
import {
|
|
8
|
+
requireAgentKey,
|
|
9
|
+
requireWorkspaceSession,
|
|
10
|
+
type AgentAuthenticatedRequest,
|
|
11
|
+
type WorkspaceAuthenticatedRequest,
|
|
12
|
+
} from '../middleware/auth';
|
|
13
|
+
|
|
14
|
+
const router = express.Router();
|
|
15
|
+
|
|
16
|
+
const ActivityQuerySchema = z.object({
|
|
17
|
+
limit: z.coerce.number().int().min(1).max(200).optional().default(50),
|
|
18
|
+
offset: z.coerce.number().int().min(0).optional().default(0),
|
|
19
|
+
agent_id: z.string().uuid().optional(),
|
|
20
|
+
activity_type: z.string().max(80).optional(),
|
|
21
|
+
status: z.enum(['success', 'error']).optional(),
|
|
22
|
+
from: z.string().datetime({ offset: true }).optional(),
|
|
23
|
+
to: z.string().datetime({ offset: true }).optional(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const UsageSchema = z.object({
|
|
27
|
+
activity_type: z.string().min(1).max(80).optional().default('agent_run'),
|
|
28
|
+
provider: z.string().max(80).optional(),
|
|
29
|
+
model: z.string().max(120).optional(),
|
|
30
|
+
input_tokens: z.number().int().min(0).optional(),
|
|
31
|
+
output_tokens: z.number().int().min(0).optional(),
|
|
32
|
+
total_tokens: z.number().int().min(0).optional(),
|
|
33
|
+
estimated_cost_usd: z.number().min(0).optional(),
|
|
34
|
+
client_name: z.string().max(100).optional(),
|
|
35
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
router.get('/activity', requireWorkspaceSession, async (req, res) => {
|
|
39
|
+
const parsed = ActivityQuerySchema.safeParse(req.query);
|
|
40
|
+
if (!parsed.success) {
|
|
41
|
+
return res.status(400).json({ error: 'validation_error', details: parsed.error.flatten() });
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const authReq = req as WorkspaceAuthenticatedRequest;
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
const result = await pool.query(
|
|
48
|
+
`SELECT
|
|
49
|
+
agent_activity_events.*,
|
|
50
|
+
agents.name AS agent_name
|
|
51
|
+
FROM agent_activity_events
|
|
52
|
+
LEFT JOIN agents ON agents.id = agent_activity_events.agent_id
|
|
53
|
+
WHERE agent_activity_events.org_id = $1
|
|
54
|
+
AND ($4::uuid IS NULL OR agent_activity_events.agent_id = $4)
|
|
55
|
+
AND ($5::text IS NULL OR agent_activity_events.activity_type = $5)
|
|
56
|
+
AND ($6::text IS NULL OR agent_activity_events.status = $6)
|
|
57
|
+
AND ($7::timestamptz IS NULL OR agent_activity_events.created_at >= $7)
|
|
58
|
+
AND ($8::timestamptz IS NULL OR agent_activity_events.created_at < $8)
|
|
59
|
+
ORDER BY agent_activity_events.created_at DESC
|
|
60
|
+
LIMIT $2 OFFSET $3`,
|
|
61
|
+
[
|
|
62
|
+
authReq.org.id,
|
|
63
|
+
parsed.data.limit,
|
|
64
|
+
parsed.data.offset,
|
|
65
|
+
parsed.data.agent_id ?? null,
|
|
66
|
+
parsed.data.activity_type ?? null,
|
|
67
|
+
parsed.data.status ?? null,
|
|
68
|
+
parsed.data.from ? new Date(parsed.data.from) : null,
|
|
69
|
+
parsed.data.to ? new Date(parsed.data.to) : null,
|
|
70
|
+
],
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
return res.json({
|
|
74
|
+
events: result.rows,
|
|
75
|
+
limit: parsed.data.limit,
|
|
76
|
+
offset: parsed.data.offset,
|
|
77
|
+
count: result.rows.length,
|
|
78
|
+
});
|
|
79
|
+
} catch (err) {
|
|
80
|
+
log.error('[activity] unexpected error', { error: (err as Error).message });
|
|
81
|
+
return res.status(500).json({ error: 'internal_error', message: 'An unexpected error occurred' });
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
router.post('/activity/usage', requireAgentKey, async (req, res) => {
|
|
86
|
+
const parsed = UsageSchema.safeParse(req.body);
|
|
87
|
+
if (!parsed.success) {
|
|
88
|
+
return res.status(422).json({ error: 'validation_error', details: parsed.error.flatten() });
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const authReq = req as AgentAuthenticatedRequest;
|
|
92
|
+
if (!(await enforcePlanLimit({
|
|
93
|
+
org_id: authReq.org.id,
|
|
94
|
+
limit_type: 'api_calls_month',
|
|
95
|
+
res,
|
|
96
|
+
}))) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const totalTokens =
|
|
101
|
+
parsed.data.total_tokens ??
|
|
102
|
+
((parsed.data.input_tokens ?? 0) + (parsed.data.output_tokens ?? 0) || undefined);
|
|
103
|
+
|
|
104
|
+
await logActivity({
|
|
105
|
+
org_id: authReq.org.id,
|
|
106
|
+
agent_id: authReq.agent.id,
|
|
107
|
+
activity_type: parsed.data.activity_type,
|
|
108
|
+
endpoint: '/v1/activity/usage',
|
|
109
|
+
method: 'POST',
|
|
110
|
+
status_code: 201,
|
|
111
|
+
status: 'success',
|
|
112
|
+
...agentActor(authReq),
|
|
113
|
+
client_name: parsed.data.client_name ?? null,
|
|
114
|
+
provider: parsed.data.provider ?? null,
|
|
115
|
+
model: parsed.data.model ?? null,
|
|
116
|
+
input_tokens: parsed.data.input_tokens ?? null,
|
|
117
|
+
output_tokens: parsed.data.output_tokens ?? null,
|
|
118
|
+
total_tokens: totalTokens ?? null,
|
|
119
|
+
estimated_cost_usd: parsed.data.estimated_cost_usd ?? null,
|
|
120
|
+
metadata: parsed.data.metadata ?? {},
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
return res.status(201).json({ ok: true });
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
export default router;
|