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.
Files changed (460) hide show
  1. package/.adal/skills/stripe-best-practices/SKILL.md +42 -0
  2. package/.adal/skills/stripe-best-practices/references/billing.md +36 -0
  3. package/.adal/skills/stripe-best-practices/references/connect.md +48 -0
  4. package/.adal/skills/stripe-best-practices/references/payments.md +79 -0
  5. package/.adal/skills/stripe-best-practices/references/security.md +109 -0
  6. package/.adal/skills/stripe-best-practices/references/treasury.md +16 -0
  7. package/.adal/skills/stripe-projects/SKILL.md +139 -0
  8. package/.adal/skills/upgrade-stripe/SKILL.md +185 -0
  9. package/.agents/skills/stripe-best-practices/SKILL.md +42 -0
  10. package/.agents/skills/stripe-best-practices/references/billing.md +36 -0
  11. package/.agents/skills/stripe-best-practices/references/connect.md +48 -0
  12. package/.agents/skills/stripe-best-practices/references/payments.md +79 -0
  13. package/.agents/skills/stripe-best-practices/references/security.md +109 -0
  14. package/.agents/skills/stripe-best-practices/references/treasury.md +16 -0
  15. package/.agents/skills/stripe-projects/SKILL.md +139 -0
  16. package/.agents/skills/upgrade-stripe/SKILL.md +185 -0
  17. package/.augment/skills/stripe-best-practices/SKILL.md +42 -0
  18. package/.augment/skills/stripe-best-practices/references/billing.md +36 -0
  19. package/.augment/skills/stripe-best-practices/references/connect.md +48 -0
  20. package/.augment/skills/stripe-best-practices/references/payments.md +79 -0
  21. package/.augment/skills/stripe-best-practices/references/security.md +109 -0
  22. package/.augment/skills/stripe-best-practices/references/treasury.md +16 -0
  23. package/.augment/skills/stripe-projects/SKILL.md +139 -0
  24. package/.augment/skills/upgrade-stripe/SKILL.md +185 -0
  25. package/.bob/skills/stripe-best-practices/SKILL.md +42 -0
  26. package/.bob/skills/stripe-best-practices/references/billing.md +36 -0
  27. package/.bob/skills/stripe-best-practices/references/connect.md +48 -0
  28. package/.bob/skills/stripe-best-practices/references/payments.md +79 -0
  29. package/.bob/skills/stripe-best-practices/references/security.md +109 -0
  30. package/.bob/skills/stripe-best-practices/references/treasury.md +16 -0
  31. package/.bob/skills/stripe-projects/SKILL.md +139 -0
  32. package/.bob/skills/upgrade-stripe/SKILL.md +185 -0
  33. package/.claude/settings.local.json +7 -0
  34. package/.claude/skills/stripe-best-practices/SKILL.md +42 -0
  35. package/.claude/skills/stripe-best-practices/references/billing.md +36 -0
  36. package/.claude/skills/stripe-best-practices/references/connect.md +48 -0
  37. package/.claude/skills/stripe-best-practices/references/payments.md +79 -0
  38. package/.claude/skills/stripe-best-practices/references/security.md +109 -0
  39. package/.claude/skills/stripe-best-practices/references/treasury.md +16 -0
  40. package/.claude/skills/stripe-projects/SKILL.md +139 -0
  41. package/.claude/skills/upgrade-stripe/SKILL.md +185 -0
  42. package/.codebuddy/skills/stripe-best-practices/SKILL.md +42 -0
  43. package/.codebuddy/skills/stripe-best-practices/references/billing.md +36 -0
  44. package/.codebuddy/skills/stripe-best-practices/references/connect.md +48 -0
  45. package/.codebuddy/skills/stripe-best-practices/references/payments.md +79 -0
  46. package/.codebuddy/skills/stripe-best-practices/references/security.md +109 -0
  47. package/.codebuddy/skills/stripe-best-practices/references/treasury.md +16 -0
  48. package/.codebuddy/skills/stripe-projects/SKILL.md +139 -0
  49. package/.codebuddy/skills/upgrade-stripe/SKILL.md +185 -0
  50. package/.commandcode/skills/stripe-best-practices/SKILL.md +42 -0
  51. package/.commandcode/skills/stripe-best-practices/references/billing.md +36 -0
  52. package/.commandcode/skills/stripe-best-practices/references/connect.md +48 -0
  53. package/.commandcode/skills/stripe-best-practices/references/payments.md +79 -0
  54. package/.commandcode/skills/stripe-best-practices/references/security.md +109 -0
  55. package/.commandcode/skills/stripe-best-practices/references/treasury.md +16 -0
  56. package/.commandcode/skills/stripe-projects/SKILL.md +139 -0
  57. package/.commandcode/skills/upgrade-stripe/SKILL.md +185 -0
  58. package/.continue/skills/stripe-best-practices/SKILL.md +42 -0
  59. package/.continue/skills/stripe-best-practices/references/billing.md +36 -0
  60. package/.continue/skills/stripe-best-practices/references/connect.md +48 -0
  61. package/.continue/skills/stripe-best-practices/references/payments.md +79 -0
  62. package/.continue/skills/stripe-best-practices/references/security.md +109 -0
  63. package/.continue/skills/stripe-best-practices/references/treasury.md +16 -0
  64. package/.continue/skills/stripe-projects/SKILL.md +139 -0
  65. package/.continue/skills/upgrade-stripe/SKILL.md +185 -0
  66. package/.cortex/skills/stripe-best-practices/SKILL.md +42 -0
  67. package/.cortex/skills/stripe-best-practices/references/billing.md +36 -0
  68. package/.cortex/skills/stripe-best-practices/references/connect.md +48 -0
  69. package/.cortex/skills/stripe-best-practices/references/payments.md +79 -0
  70. package/.cortex/skills/stripe-best-practices/references/security.md +109 -0
  71. package/.cortex/skills/stripe-best-practices/references/treasury.md +16 -0
  72. package/.cortex/skills/stripe-projects/SKILL.md +139 -0
  73. package/.cortex/skills/upgrade-stripe/SKILL.md +185 -0
  74. package/.crush/skills/stripe-best-practices/SKILL.md +42 -0
  75. package/.crush/skills/stripe-best-practices/references/billing.md +36 -0
  76. package/.crush/skills/stripe-best-practices/references/connect.md +48 -0
  77. package/.crush/skills/stripe-best-practices/references/payments.md +79 -0
  78. package/.crush/skills/stripe-best-practices/references/security.md +109 -0
  79. package/.crush/skills/stripe-best-practices/references/treasury.md +16 -0
  80. package/.crush/skills/stripe-projects/SKILL.md +139 -0
  81. package/.crush/skills/upgrade-stripe/SKILL.md +185 -0
  82. package/.env.example +20 -0
  83. package/.factory/skills/stripe-best-practices/SKILL.md +42 -0
  84. package/.factory/skills/stripe-best-practices/references/billing.md +36 -0
  85. package/.factory/skills/stripe-best-practices/references/connect.md +48 -0
  86. package/.factory/skills/stripe-best-practices/references/payments.md +79 -0
  87. package/.factory/skills/stripe-best-practices/references/security.md +109 -0
  88. package/.factory/skills/stripe-best-practices/references/treasury.md +16 -0
  89. package/.factory/skills/stripe-projects/SKILL.md +139 -0
  90. package/.factory/skills/upgrade-stripe/SKILL.md +185 -0
  91. package/.goose/skills/stripe-best-practices/SKILL.md +42 -0
  92. package/.goose/skills/stripe-best-practices/references/billing.md +36 -0
  93. package/.goose/skills/stripe-best-practices/references/connect.md +48 -0
  94. package/.goose/skills/stripe-best-practices/references/payments.md +79 -0
  95. package/.goose/skills/stripe-best-practices/references/security.md +109 -0
  96. package/.goose/skills/stripe-best-practices/references/treasury.md +16 -0
  97. package/.goose/skills/stripe-projects/SKILL.md +139 -0
  98. package/.goose/skills/upgrade-stripe/SKILL.md +185 -0
  99. package/.iflow/skills/stripe-best-practices/SKILL.md +42 -0
  100. package/.iflow/skills/stripe-best-practices/references/billing.md +36 -0
  101. package/.iflow/skills/stripe-best-practices/references/connect.md +48 -0
  102. package/.iflow/skills/stripe-best-practices/references/payments.md +79 -0
  103. package/.iflow/skills/stripe-best-practices/references/security.md +109 -0
  104. package/.iflow/skills/stripe-best-practices/references/treasury.md +16 -0
  105. package/.iflow/skills/stripe-projects/SKILL.md +139 -0
  106. package/.iflow/skills/upgrade-stripe/SKILL.md +185 -0
  107. package/.junie/skills/stripe-best-practices/SKILL.md +42 -0
  108. package/.junie/skills/stripe-best-practices/references/billing.md +36 -0
  109. package/.junie/skills/stripe-best-practices/references/connect.md +48 -0
  110. package/.junie/skills/stripe-best-practices/references/payments.md +79 -0
  111. package/.junie/skills/stripe-best-practices/references/security.md +109 -0
  112. package/.junie/skills/stripe-best-practices/references/treasury.md +16 -0
  113. package/.junie/skills/stripe-projects/SKILL.md +139 -0
  114. package/.junie/skills/upgrade-stripe/SKILL.md +185 -0
  115. package/.kilocode/skills/stripe-best-practices/SKILL.md +42 -0
  116. package/.kilocode/skills/stripe-best-practices/references/billing.md +36 -0
  117. package/.kilocode/skills/stripe-best-practices/references/connect.md +48 -0
  118. package/.kilocode/skills/stripe-best-practices/references/payments.md +79 -0
  119. package/.kilocode/skills/stripe-best-practices/references/security.md +109 -0
  120. package/.kilocode/skills/stripe-best-practices/references/treasury.md +16 -0
  121. package/.kilocode/skills/stripe-projects/SKILL.md +139 -0
  122. package/.kilocode/skills/upgrade-stripe/SKILL.md +185 -0
  123. package/.kiro/skills/stripe-best-practices/SKILL.md +42 -0
  124. package/.kiro/skills/stripe-best-practices/references/billing.md +36 -0
  125. package/.kiro/skills/stripe-best-practices/references/connect.md +48 -0
  126. package/.kiro/skills/stripe-best-practices/references/payments.md +79 -0
  127. package/.kiro/skills/stripe-best-practices/references/security.md +109 -0
  128. package/.kiro/skills/stripe-best-practices/references/treasury.md +16 -0
  129. package/.kiro/skills/stripe-projects/SKILL.md +139 -0
  130. package/.kiro/skills/upgrade-stripe/SKILL.md +185 -0
  131. package/.kode/skills/stripe-best-practices/SKILL.md +42 -0
  132. package/.kode/skills/stripe-best-practices/references/billing.md +36 -0
  133. package/.kode/skills/stripe-best-practices/references/connect.md +48 -0
  134. package/.kode/skills/stripe-best-practices/references/payments.md +79 -0
  135. package/.kode/skills/stripe-best-practices/references/security.md +109 -0
  136. package/.kode/skills/stripe-best-practices/references/treasury.md +16 -0
  137. package/.kode/skills/stripe-projects/SKILL.md +139 -0
  138. package/.kode/skills/upgrade-stripe/SKILL.md +185 -0
  139. package/.mcpjam/skills/stripe-best-practices/SKILL.md +42 -0
  140. package/.mcpjam/skills/stripe-best-practices/references/billing.md +36 -0
  141. package/.mcpjam/skills/stripe-best-practices/references/connect.md +48 -0
  142. package/.mcpjam/skills/stripe-best-practices/references/payments.md +79 -0
  143. package/.mcpjam/skills/stripe-best-practices/references/security.md +109 -0
  144. package/.mcpjam/skills/stripe-best-practices/references/treasury.md +16 -0
  145. package/.mcpjam/skills/stripe-projects/SKILL.md +139 -0
  146. package/.mcpjam/skills/upgrade-stripe/SKILL.md +185 -0
  147. package/.mux/skills/stripe-best-practices/SKILL.md +42 -0
  148. package/.mux/skills/stripe-best-practices/references/billing.md +36 -0
  149. package/.mux/skills/stripe-best-practices/references/connect.md +48 -0
  150. package/.mux/skills/stripe-best-practices/references/payments.md +79 -0
  151. package/.mux/skills/stripe-best-practices/references/security.md +109 -0
  152. package/.mux/skills/stripe-best-practices/references/treasury.md +16 -0
  153. package/.mux/skills/stripe-projects/SKILL.md +139 -0
  154. package/.mux/skills/upgrade-stripe/SKILL.md +185 -0
  155. package/.neovate/skills/stripe-best-practices/SKILL.md +42 -0
  156. package/.neovate/skills/stripe-best-practices/references/billing.md +36 -0
  157. package/.neovate/skills/stripe-best-practices/references/connect.md +48 -0
  158. package/.neovate/skills/stripe-best-practices/references/payments.md +79 -0
  159. package/.neovate/skills/stripe-best-practices/references/security.md +109 -0
  160. package/.neovate/skills/stripe-best-practices/references/treasury.md +16 -0
  161. package/.neovate/skills/stripe-projects/SKILL.md +139 -0
  162. package/.neovate/skills/upgrade-stripe/SKILL.md +185 -0
  163. package/.nixpacksignore +14 -0
  164. package/.openhands/skills/stripe-best-practices/SKILL.md +42 -0
  165. package/.openhands/skills/stripe-best-practices/references/billing.md +36 -0
  166. package/.openhands/skills/stripe-best-practices/references/connect.md +48 -0
  167. package/.openhands/skills/stripe-best-practices/references/payments.md +79 -0
  168. package/.openhands/skills/stripe-best-practices/references/security.md +109 -0
  169. package/.openhands/skills/stripe-best-practices/references/treasury.md +16 -0
  170. package/.openhands/skills/stripe-projects/SKILL.md +139 -0
  171. package/.openhands/skills/upgrade-stripe/SKILL.md +185 -0
  172. package/.pi/skills/stripe-best-practices/SKILL.md +42 -0
  173. package/.pi/skills/stripe-best-practices/references/billing.md +36 -0
  174. package/.pi/skills/stripe-best-practices/references/connect.md +48 -0
  175. package/.pi/skills/stripe-best-practices/references/payments.md +79 -0
  176. package/.pi/skills/stripe-best-practices/references/security.md +109 -0
  177. package/.pi/skills/stripe-best-practices/references/treasury.md +16 -0
  178. package/.pi/skills/stripe-projects/SKILL.md +139 -0
  179. package/.pi/skills/upgrade-stripe/SKILL.md +185 -0
  180. package/.pochi/skills/stripe-best-practices/SKILL.md +42 -0
  181. package/.pochi/skills/stripe-best-practices/references/billing.md +36 -0
  182. package/.pochi/skills/stripe-best-practices/references/connect.md +48 -0
  183. package/.pochi/skills/stripe-best-practices/references/payments.md +79 -0
  184. package/.pochi/skills/stripe-best-practices/references/security.md +109 -0
  185. package/.pochi/skills/stripe-best-practices/references/treasury.md +16 -0
  186. package/.pochi/skills/stripe-projects/SKILL.md +139 -0
  187. package/.pochi/skills/upgrade-stripe/SKILL.md +185 -0
  188. package/.qoder/skills/stripe-best-practices/SKILL.md +42 -0
  189. package/.qoder/skills/stripe-best-practices/references/billing.md +36 -0
  190. package/.qoder/skills/stripe-best-practices/references/connect.md +48 -0
  191. package/.qoder/skills/stripe-best-practices/references/payments.md +79 -0
  192. package/.qoder/skills/stripe-best-practices/references/security.md +109 -0
  193. package/.qoder/skills/stripe-best-practices/references/treasury.md +16 -0
  194. package/.qoder/skills/stripe-projects/SKILL.md +139 -0
  195. package/.qoder/skills/upgrade-stripe/SKILL.md +185 -0
  196. package/.qwen/skills/stripe-best-practices/SKILL.md +42 -0
  197. package/.qwen/skills/stripe-best-practices/references/billing.md +36 -0
  198. package/.qwen/skills/stripe-best-practices/references/connect.md +48 -0
  199. package/.qwen/skills/stripe-best-practices/references/payments.md +79 -0
  200. package/.qwen/skills/stripe-best-practices/references/security.md +109 -0
  201. package/.qwen/skills/stripe-best-practices/references/treasury.md +16 -0
  202. package/.qwen/skills/stripe-projects/SKILL.md +139 -0
  203. package/.qwen/skills/upgrade-stripe/SKILL.md +185 -0
  204. package/.roo/skills/stripe-best-practices/SKILL.md +42 -0
  205. package/.roo/skills/stripe-best-practices/references/billing.md +36 -0
  206. package/.roo/skills/stripe-best-practices/references/connect.md +48 -0
  207. package/.roo/skills/stripe-best-practices/references/payments.md +79 -0
  208. package/.roo/skills/stripe-best-practices/references/security.md +109 -0
  209. package/.roo/skills/stripe-best-practices/references/treasury.md +16 -0
  210. package/.roo/skills/stripe-projects/SKILL.md +139 -0
  211. package/.roo/skills/upgrade-stripe/SKILL.md +185 -0
  212. package/.trae/skills/stripe-best-practices/SKILL.md +42 -0
  213. package/.trae/skills/stripe-best-practices/references/billing.md +36 -0
  214. package/.trae/skills/stripe-best-practices/references/connect.md +48 -0
  215. package/.trae/skills/stripe-best-practices/references/payments.md +79 -0
  216. package/.trae/skills/stripe-best-practices/references/security.md +109 -0
  217. package/.trae/skills/stripe-best-practices/references/treasury.md +16 -0
  218. package/.trae/skills/stripe-projects/SKILL.md +139 -0
  219. package/.trae/skills/upgrade-stripe/SKILL.md +185 -0
  220. package/.vibe/skills/stripe-best-practices/SKILL.md +42 -0
  221. package/.vibe/skills/stripe-best-practices/references/billing.md +36 -0
  222. package/.vibe/skills/stripe-best-practices/references/connect.md +48 -0
  223. package/.vibe/skills/stripe-best-practices/references/payments.md +79 -0
  224. package/.vibe/skills/stripe-best-practices/references/security.md +109 -0
  225. package/.vibe/skills/stripe-best-practices/references/treasury.md +16 -0
  226. package/.vibe/skills/stripe-projects/SKILL.md +139 -0
  227. package/.vibe/skills/upgrade-stripe/SKILL.md +185 -0
  228. package/.windsurf/skills/stripe-best-practices/SKILL.md +42 -0
  229. package/.windsurf/skills/stripe-best-practices/references/billing.md +36 -0
  230. package/.windsurf/skills/stripe-best-practices/references/connect.md +48 -0
  231. package/.windsurf/skills/stripe-best-practices/references/payments.md +79 -0
  232. package/.windsurf/skills/stripe-best-practices/references/security.md +109 -0
  233. package/.windsurf/skills/stripe-best-practices/references/treasury.md +16 -0
  234. package/.windsurf/skills/stripe-projects/SKILL.md +139 -0
  235. package/.windsurf/skills/upgrade-stripe/SKILL.md +185 -0
  236. package/.zencoder/skills/stripe-best-practices/SKILL.md +42 -0
  237. package/.zencoder/skills/stripe-best-practices/references/billing.md +36 -0
  238. package/.zencoder/skills/stripe-best-practices/references/connect.md +48 -0
  239. package/.zencoder/skills/stripe-best-practices/references/payments.md +79 -0
  240. package/.zencoder/skills/stripe-best-practices/references/security.md +109 -0
  241. package/.zencoder/skills/stripe-best-practices/references/treasury.md +16 -0
  242. package/.zencoder/skills/stripe-projects/SKILL.md +139 -0
  243. package/.zencoder/skills/upgrade-stripe/SKILL.md +185 -0
  244. package/AUDIT.md +95 -0
  245. package/BLOCKERS.md +0 -0
  246. package/COOLIFY.md +51 -0
  247. package/MCP_SETUP.md +23 -0
  248. package/PRODUCTION_CHECKLIST.md +246 -0
  249. package/README.md +47 -0
  250. package/ROADMAP.md +91 -0
  251. package/docs/superpowers/plans/2026-05-11-availsync-frontend-sales-flow.md +2445 -0
  252. package/frontend/.env.example +2 -0
  253. package/frontend/app/admin/layout.tsx +13 -0
  254. package/frontend/app/admin/page.tsx +747 -0
  255. package/frontend/app/app/activity/page.tsx +257 -0
  256. package/frontend/app/app/agents/[agentId]/page.tsx +21 -0
  257. package/frontend/app/app/agents/page.tsx +1155 -0
  258. package/frontend/app/app/audit/page.tsx +225 -0
  259. package/frontend/app/app/availability/page.tsx +840 -0
  260. package/frontend/app/app/holds/page.tsx +262 -0
  261. package/frontend/app/app/layout.tsx +19 -0
  262. package/frontend/app/app/onboarding/page.tsx +10 -0
  263. package/frontend/app/app/onboarding/verify/page.tsx +309 -0
  264. package/frontend/app/app/page.tsx +508 -0
  265. package/frontend/app/app/settings/page.tsx +399 -0
  266. package/frontend/app/app/work/page.tsx +426 -0
  267. package/frontend/app/changelog/page.tsx +93 -0
  268. package/frontend/app/checkout/page.tsx +25 -0
  269. package/frontend/app/docs/api/page.tsx +157 -0
  270. package/frontend/app/docs/page.tsx +296 -0
  271. package/frontend/app/docs/pilot/page.tsx +127 -0
  272. package/frontend/app/docs/quickstart/page.tsx +318 -0
  273. package/frontend/app/docs/reliability/page.tsx +78 -0
  274. package/frontend/app/docs/sdk/node/page.tsx +166 -0
  275. package/frontend/app/globals.css +57 -0
  276. package/frontend/app/icon.png +0 -0
  277. package/frontend/app/layout.tsx +87 -0
  278. package/frontend/app/login/page.tsx +14 -0
  279. package/frontend/app/page.tsx +47 -0
  280. package/frontend/app/pricing/page.tsx +66 -0
  281. package/frontend/app/privacy/page.tsx +52 -0
  282. package/frontend/app/robots.ts +26 -0
  283. package/frontend/app/security/page.tsx +74 -0
  284. package/frontend/app/signup/page.tsx +14 -0
  285. package/frontend/app/sitemap.ts +14 -0
  286. package/frontend/app/terms/page.tsx +51 -0
  287. package/frontend/components/brand/AvailsyncLogo.tsx +56 -0
  288. package/frontend/components/checkout/CheckoutClient.tsx +100 -0
  289. package/frontend/components/dashboard/AgentForm.tsx +59 -0
  290. package/frontend/components/dashboard/AppShell.tsx +291 -0
  291. package/frontend/components/dashboard/AvailabilityChecker.tsx +117 -0
  292. package/frontend/components/dashboard/AvailabilityWindowForm.tsx +40 -0
  293. package/frontend/components/dashboard/HoldForm.tsx +133 -0
  294. package/frontend/components/dashboard/MetricCard.tsx +10 -0
  295. package/frontend/components/login/LoginForm.tsx +95 -0
  296. package/frontend/components/marketing/AgentCoordinationStory.tsx +1530 -0
  297. package/frontend/components/marketing/Faq.tsx +41 -0
  298. package/frontend/components/marketing/Hero.tsx +73 -0
  299. package/frontend/components/marketing/HowItWorks.tsx +28 -0
  300. package/frontend/components/marketing/ObserveModeTeaser.tsx +41 -0
  301. package/frontend/components/marketing/PricingTeaser.tsx +23 -0
  302. package/frontend/components/marketing/ProblemSolution.tsx +36 -0
  303. package/frontend/components/marketing/SiteFooter.tsx +59 -0
  304. package/frontend/components/marketing/SiteHeader.tsx +45 -0
  305. package/frontend/components/marketing/UseCases.tsx +27 -0
  306. package/frontend/components/onboarding/OnboardingClient.tsx +278 -0
  307. package/frontend/components/pricing/PricingCards.tsx +65 -0
  308. package/frontend/components/privacy/CookieConsent.tsx +230 -0
  309. package/frontend/components/privacy/CookieSettingsButton.tsx +15 -0
  310. package/frontend/components/seo/JsonLd.tsx +10 -0
  311. package/frontend/components/signup/SignupForm.tsx +55 -0
  312. package/frontend/components/ui/Badge.tsx +23 -0
  313. package/frontend/components/ui/Button.tsx +37 -0
  314. package/frontend/components/ui/Card.tsx +11 -0
  315. package/frontend/components/ui/ConfirmDialog.tsx +77 -0
  316. package/frontend/components/ui/EmptyState.tsx +24 -0
  317. package/frontend/components/ui/Input.tsx +14 -0
  318. package/frontend/components/ui/KeyDisplay.tsx +49 -0
  319. package/frontend/components/ui/Select.tsx +14 -0
  320. package/frontend/components/ui/Skeleton.tsx +24 -0
  321. package/frontend/components/ui/Tabs.tsx +19 -0
  322. package/frontend/components/ui/Textarea.tsx +14 -0
  323. package/frontend/components/ui/Toast.tsx +78 -0
  324. package/frontend/components/waitlist/WaitlistDialog.tsx +128 -0
  325. package/frontend/lib/api.ts +1282 -0
  326. package/frontend/lib/billing.ts +6 -0
  327. package/frontend/lib/cookieConsent.ts +113 -0
  328. package/frontend/lib/format.ts +16 -0
  329. package/frontend/lib/plans.ts +62 -0
  330. package/frontend/lib/schemas.ts +108 -0
  331. package/frontend/lib/seo.ts +376 -0
  332. package/frontend/lib/setupGuides.ts +630 -0
  333. package/frontend/lib/storage.ts +30 -0
  334. package/frontend/next-env.d.ts +6 -0
  335. package/frontend/next.config.mjs +13 -0
  336. package/frontend/package-lock.json +14409 -0
  337. package/frontend/package.json +41 -0
  338. package/frontend/playwright.config.ts +20 -0
  339. package/frontend/postcss.config.mjs +8 -0
  340. package/frontend/public/.gitkeep +0 -0
  341. package/frontend/public/brand/availsync-logo-board.png +0 -0
  342. package/frontend/public/brand/availsync-logo-dark.png +0 -0
  343. package/frontend/public/brand/availsync-mark-dark.png +0 -0
  344. package/frontend/public/brand/availsync-wordmark-dark.png +0 -0
  345. package/frontend/public/marketing/hero-agent-coordination.png +0 -0
  346. package/frontend/tailwind.config.ts +53 -0
  347. package/frontend/tests/smoke.spec.ts +89 -0
  348. package/frontend/tsconfig.json +23 -0
  349. package/jest.config.js +7 -0
  350. package/nixpacks.toml +11 -0
  351. package/package.json +53 -0
  352. package/packages/mcp/LICENSE +21 -0
  353. package/packages/mcp/README.md +60 -0
  354. package/packages/mcp/jest.config.cjs +8 -0
  355. package/packages/mcp/package.json +54 -0
  356. package/packages/mcp/src/helpers.ts +38 -0
  357. package/packages/mcp/src/index.test.ts +60 -0
  358. package/packages/mcp/src/index.ts +387 -0
  359. package/packages/mcp/tsconfig.json +20 -0
  360. package/packages/mcp/tsconfig.test.json +12 -0
  361. package/packages/node/LICENSE +21 -0
  362. package/packages/node/README.md +120 -0
  363. package/packages/node/jest.config.cjs +8 -0
  364. package/packages/node/package.json +46 -0
  365. package/packages/node/src/index.test.ts +360 -0
  366. package/packages/node/src/index.ts +402 -0
  367. package/packages/node/tsconfig.json +20 -0
  368. package/packages/node/tsconfig.test.json +12 -0
  369. package/plan.md +923 -0
  370. package/skills/stripe-best-practices/SKILL.md +42 -0
  371. package/skills/stripe-best-practices/references/billing.md +36 -0
  372. package/skills/stripe-best-practices/references/connect.md +48 -0
  373. package/skills/stripe-best-practices/references/payments.md +79 -0
  374. package/skills/stripe-best-practices/references/security.md +109 -0
  375. package/skills/stripe-best-practices/references/treasury.md +16 -0
  376. package/skills/stripe-projects/SKILL.md +139 -0
  377. package/skills/upgrade-stripe/SKILL.md +185 -0
  378. package/skills-lock.json +20 -0
  379. package/src/core/availability.ts +178 -0
  380. package/src/core/conflict.ts +209 -0
  381. package/src/core/work.ts +490 -0
  382. package/src/db/client.ts +17 -0
  383. package/src/db/migrations/001_init.sql +88 -0
  384. package/src/db/migrations/002_stripe.sql +2 -0
  385. package/src/db/migrations/003_workspace_auth.sql +19 -0
  386. package/src/db/migrations/004_agent_mcp_status.sql +2 -0
  387. package/src/db/migrations/005_hold_event_actor.sql +4 -0
  388. package/src/db/migrations/006_agent_activity.sql +35 -0
  389. package/src/db/migrations/007_work_coordination.sql +60 -0
  390. package/src/db/migrations/008_work_claim_leases.sql +20 -0
  391. package/src/db/migrations/009_billing_subscription_state.sql +23 -0
  392. package/src/db/migrations/010_agent_api_key_prefix.sql +10 -0
  393. package/src/db/migrations/011_org_verified_and_work_event_retention.sql +11 -0
  394. package/src/db/migrations/012_agent_enforcement_mode.sql +12 -0
  395. package/src/db/migrations/013_support_tickets.sql +21 -0
  396. package/src/db/migrations/014_paid_plan_waitlist.sql +23 -0
  397. package/src/db/migrations/015_agent_last_seen.sql +2 -0
  398. package/src/db/migrations.ts +164 -0
  399. package/src/db/run-migrations.ts +13 -0
  400. package/src/index.ts +183 -0
  401. package/src/lib/activity.ts +137 -0
  402. package/src/lib/apiKeys.ts +32 -0
  403. package/src/lib/appInfo.ts +26 -0
  404. package/src/lib/billingConfig.ts +3 -0
  405. package/src/lib/env.ts +75 -0
  406. package/src/lib/logger.ts +8 -0
  407. package/src/lib/plans.ts +204 -0
  408. package/src/mcp/server.js +5 -0
  409. package/src/mcp/server.ts +350 -0
  410. package/src/middleware/auth.ts +342 -0
  411. package/src/middleware/requestId.ts +16 -0
  412. package/src/routes/account.ts +168 -0
  413. package/src/routes/activity.ts +126 -0
  414. package/src/routes/admin.ts +514 -0
  415. package/src/routes/audit.ts +68 -0
  416. package/src/routes/auth.ts +203 -0
  417. package/src/routes/availability.ts +325 -0
  418. package/src/routes/billing.ts +406 -0
  419. package/src/routes/conflicts.ts +131 -0
  420. package/src/routes/holds.ts +437 -0
  421. package/src/routes/mcp.ts +57 -0
  422. package/src/routes/metrics.ts +39 -0
  423. package/src/routes/onboarding.ts +273 -0
  424. package/src/routes/orgs.ts +981 -0
  425. package/src/routes/preferences.ts +132 -0
  426. package/src/routes/session.ts +16 -0
  427. package/src/routes/support.ts +77 -0
  428. package/src/routes/value.ts +186 -0
  429. package/src/routes/waitlist.ts +63 -0
  430. package/src/routes/work.ts +1578 -0
  431. package/src/server.ts +36 -0
  432. package/src/types/index.ts +109 -0
  433. package/tests/integration/activity.route.test.ts +103 -0
  434. package/tests/integration/admin.route.test.ts +143 -0
  435. package/tests/integration/agent-keys.route.test.ts +237 -0
  436. package/tests/integration/availability.route.test.ts +125 -0
  437. package/tests/integration/billing.route.test.ts +393 -0
  438. package/tests/integration/conflicts.route.test.ts +131 -0
  439. package/tests/integration/flows.test.ts +154 -0
  440. package/tests/integration/helpers.ts +134 -0
  441. package/tests/integration/holds.route.test.ts +185 -0
  442. package/tests/integration/metrics.route.test.ts +100 -0
  443. package/tests/integration/onboarding.verify.route.test.ts +163 -0
  444. package/tests/integration/preferences.route.test.ts +53 -0
  445. package/tests/integration/session.route.test.ts +97 -0
  446. package/tests/integration/system.route.test.ts +92 -0
  447. package/tests/integration/value.route.test.ts +235 -0
  448. package/tests/integration/work.route.test.ts +745 -0
  449. package/tests/setup.ts +4 -0
  450. package/tests/smoke.sh +62 -0
  451. package/tests/unit/auth.test.ts +114 -0
  452. package/tests/unit/availability.test.ts +149 -0
  453. package/tests/unit/conflict.test.ts +118 -0
  454. package/tests/unit/env.test.ts +69 -0
  455. package/tests/unit/migrations.test.ts +135 -0
  456. package/tests/unit/request-id.test.ts +37 -0
  457. package/tmp-mobile-agents.png +0 -0
  458. package/tmp-next-mobile.err.log +10 -0
  459. package/tmp-next-mobile.log +5 -0
  460. package/tsconfig.json +16 -0
@@ -0,0 +1,318 @@
1
+ import type { Metadata } from 'next';
2
+ import { SiteHeader } from '@/components/marketing/SiteHeader';
3
+ import { SiteFooter } from '@/components/marketing/SiteFooter';
4
+ import { JsonLd } from '@/components/seo/JsonLd';
5
+ import {
6
+ automationGuardrailSnippets,
7
+ claudeCursorSnippet,
8
+ codexMultiAgentMcpSnippet,
9
+ codexMcpSetupSnippet,
10
+ codexPromptSnippet,
11
+ mcpEnvSnippet,
12
+ nodeSdkSnippets,
13
+ openClawSetupSnippet,
14
+ openClawSkillSnippet,
15
+ quickstartUseCases,
16
+ schedulingSnippets,
17
+ serverCronSnippet,
18
+ workGuardrailSnippets,
19
+ } from '@/lib/setupGuides';
20
+ import { quickstartPageSchema } from '@/lib/seo';
21
+
22
+ export const metadata: Metadata = {
23
+ title: 'Quickstart',
24
+ description:
25
+ 'Connect Codex, Claude, Cursor, MCP, cron jobs, or server automations to Availsync with repo work-claim guardrails.',
26
+ alternates: {
27
+ canonical: '/docs/quickstart',
28
+ },
29
+ };
30
+
31
+ const guideInput = {
32
+ appUrl: 'https://availsync.dev',
33
+ agentId: 'AGENT_ID',
34
+ resourceKey: 'owner/repo',
35
+ };
36
+
37
+ const productionFlow = [
38
+ 'Run the dashboard setup test from Agent Connect.',
39
+ 'For a no-risk pilot, switch the agent to Observe before connecting real automations.',
40
+ 'Use repo-level scope by default: resource_type=repo and resource_key=owner/repo.',
41
+ 'Copy MCP or REST config for the selected agent.',
42
+ 'Connect the real MCP client or server-side agent.',
43
+ 'Verify real heartbeat and runtime calls in Activity.',
44
+ 'Use run/start, run/extend, and run/finish for scheduled automations, or MCP tools for interactive agent clients.',
45
+ ];
46
+
47
+ const snippets = [
48
+ mcpEnvSnippet(guideInput),
49
+ codexMcpSetupSnippet(guideInput),
50
+ codexMultiAgentMcpSnippet(guideInput),
51
+ ...automationGuardrailSnippets(guideInput),
52
+ openClawSkillSnippet(guideInput),
53
+ openClawSetupSnippet(guideInput),
54
+ ...workGuardrailSnippets(guideInput),
55
+ ...schedulingSnippets(guideInput),
56
+ claudeCursorSnippet(guideInput),
57
+ codexPromptSnippet(guideInput),
58
+ serverCronSnippet(guideInput),
59
+ ];
60
+
61
+ const sdkSnippets = nodeSdkSnippets(guideInput);
62
+ const pythonSnippet = `import os
63
+ import requests
64
+
65
+ api_url = "https://availsync.dev"
66
+ api_key = os.environ["AVAILSYNC_API_KEY"]
67
+ agent_id = os.environ["AVAILSYNC_AGENT_ID"]
68
+
69
+ response = requests.post(
70
+ f"{api_url}/v1/work/run/start",
71
+ headers={
72
+ "Authorization": f"Bearer {api_key}",
73
+ "Idempotency-Key": "python-owner-repo-run-001",
74
+ },
75
+ json={
76
+ "agent_id": agent_id,
77
+ "resource_type": "repo",
78
+ "resource_key": "owner/repo",
79
+ "duration_minutes": 45,
80
+ "reason": "Python guarded automation",
81
+ },
82
+ timeout=10,
83
+ )
84
+ response.raise_for_status()
85
+ started = response.json()
86
+
87
+ if started["action"] == "skip_run":
88
+ print(started["reason"])
89
+ raise SystemExit(0)
90
+
91
+ claim = started.get("claim")
92
+ try:
93
+ # Run the Python automation here.
94
+ pass
95
+ finally:
96
+ if claim:
97
+ requests.post(
98
+ f"{api_url}/v1/work/run/finish",
99
+ headers={"Authorization": f"Bearer {api_key}"},
100
+ json={"claim_id": claim["id"], "outcome": "finished"},
101
+ timeout=10,
102
+ ).raise_for_status()`;
103
+
104
+ export default function QuickstartPage() {
105
+ return (
106
+ <>
107
+ <JsonLd data={quickstartPageSchema()} />
108
+ <SiteHeader />
109
+ <main className="min-h-screen bg-bg">
110
+ <section className="mx-auto max-w-5xl px-4 pb-20 pt-12">
111
+ <p className="text-label uppercase text-text-tertiary">Agent integration</p>
112
+ <h1 className="mt-3 text-5xl font-semibold text-text-primary">Quickstart</h1>
113
+ <p className="mt-5 max-w-3xl text-heading leading-7 text-text-secondary">
114
+ Use email and password for the dashboard. Use generated agent API keys only from
115
+ agents, coding tools, MCP servers, or server-side integrations. Availsync does not run
116
+ your agents; it is the coordination check they call before they claim repos, edit
117
+ projects, run automations, or book downstream systems.
118
+ </p>
119
+ <p className="mt-4 max-w-3xl text-body leading-6 text-text-primary">
120
+ Every integrated agent checks in before it acts.
121
+ </p>
122
+ <div className="mt-8 flex flex-wrap gap-3">
123
+ <a className="rounded bg-accent px-4 py-2 text-body font-medium text-white hover:bg-accent-hover" href="/signup">
124
+ Start free
125
+ </a>
126
+ <a className="rounded border border-border bg-surface-raised px-4 py-2 text-body font-medium text-text-primary hover:border-border-focus" href="/docs/sdk/node">
127
+ Read SDK docs
128
+ </a>
129
+ <a className="rounded border border-border bg-surface-raised px-4 py-2 text-body font-medium text-text-primary hover:border-border-focus" href="/docs/pilot">
130
+ Pilot in 10 minutes
131
+ </a>
132
+ </div>
133
+
134
+ <div className="mt-10 grid gap-4 lg:grid-cols-3">
135
+ {quickstartUseCases().map((useCase) => (
136
+ <div className="rounded border border-border bg-surface p-5" key={useCase.title}>
137
+ <h2 className="text-title font-semibold text-text-primary">{useCase.title}</h2>
138
+ <p className="mt-2 text-body leading-6 text-text-secondary">{useCase.body}</p>
139
+ </div>
140
+ ))}
141
+ </div>
142
+
143
+ <section className="mt-14 scroll-mt-24 rounded border border-border bg-surface p-5">
144
+ <p className="text-label uppercase text-text-tertiary">Production flow</p>
145
+ <h2 className="mt-2 text-3xl font-semibold text-text-primary">
146
+ Long-running coding agents
147
+ </h2>
148
+ <div className="mt-5 grid gap-3">
149
+ {productionFlow.map((item, index) => (
150
+ <div className="flex gap-3" key={item}>
151
+ <div className="flex h-6 w-6 shrink-0 items-center justify-center rounded border border-border bg-bg text-label text-text-tertiary">
152
+ {index + 1}
153
+ </div>
154
+ <p className="text-body leading-6 text-text-secondary">{item}</p>
155
+ </div>
156
+ ))}
157
+ </div>
158
+ </section>
159
+
160
+ <section className="mt-14 scroll-mt-24 rounded border border-border bg-surface p-5">
161
+ <p className="text-label uppercase text-text-tertiary">Resource scope</p>
162
+ <h2 className="mt-2 text-3xl font-semibold text-text-primary">
163
+ Start safe, then split only independent work
164
+ </h2>
165
+ <div className="mt-5 grid gap-4 md:grid-cols-2">
166
+ <div className="rounded border border-border bg-bg p-4">
167
+ <h3 className="text-heading font-semibold text-text-primary">Safe mode</h3>
168
+ <p className="mt-2 text-body leading-6 text-text-secondary">
169
+ Use repo-level claims when agents may touch shared files or shared context.
170
+ </p>
171
+ <pre className="mt-3 overflow-auto rounded border border-border bg-surface p-3 text-sm text-text-secondary">
172
+ <code>{`"resource_type": "repo",
173
+ "resource_key": "owner/repo"`}</code>
174
+ </pre>
175
+ </div>
176
+ <div className="rounded border border-border bg-bg p-4">
177
+ <h3 className="text-heading font-semibold text-text-primary">Advanced mode</h3>
178
+ <p className="mt-2 text-body leading-6 text-text-secondary">
179
+ Use project-level claims only when work streams are independent during the same run.
180
+ </p>
181
+ <pre className="mt-3 overflow-auto rounded border border-border bg-surface p-3 text-sm text-text-secondary">
182
+ <code>{`"resource_type": "project",
183
+ "resource_key": "homepage"`}</code>
184
+ </pre>
185
+ </div>
186
+ </div>
187
+ <p className="mt-4 text-body leading-6 text-text-tertiary">
188
+ Availsync blocks conflicts on the same resource. It does not yet infer that
189
+ project:homepage depends on project:product-catalog, so use repo-level scope when
190
+ stale context or shared files would be risky.
191
+ </p>
192
+ </section>
193
+
194
+ <section className="mt-14 scroll-mt-24">
195
+ <p className="text-label uppercase text-text-tertiary">Node SDK</p>
196
+ <h2 className="mt-2 text-3xl font-semibold text-text-primary">Use the SDK for pilot and production-like automations</h2>
197
+ <p className="mt-3 max-w-3xl text-body leading-6 text-text-secondary">
198
+ Install the public alpha with <code>npm install @availsync/node@alpha</code>. The SDK wraps run/start, run/extend, and run/finish so your coding agent can skip
199
+ cleanly when another agent owns the repo and always release the claim when work ends.
200
+ </p>
201
+ <div className="mt-6 grid gap-5">
202
+ {sdkSnippets.map((snippet) => (
203
+ <SnippetCard
204
+ key={snippet.id}
205
+ title={snippet.title}
206
+ description={snippet.description}
207
+ code={snippet.code}
208
+ />
209
+ ))}
210
+ </div>
211
+ </section>
212
+
213
+ <section className="mt-14 scroll-mt-24">
214
+ <p className="text-label uppercase text-text-tertiary">Python</p>
215
+ <h2 className="mt-2 text-3xl font-semibold text-text-primary">Use REST directly from Python</h2>
216
+ <p className="mt-3 max-w-3xl text-body leading-6 text-text-secondary">
217
+ A Python SDK is not published yet. For Airflow, Prefect, Dagster, FastAPI workers, or
218
+ cron scripts, call the run API directly and fail closed if Availsync is unavailable in
219
+ enforce mode.
220
+ </p>
221
+ <div className="mt-6">
222
+ <SnippetCard
223
+ title="Python guarded run"
224
+ description="Start a repo claim, skip cleanly when blocked, and finish the claim in finally."
225
+ code={pythonSnippet}
226
+ />
227
+ </div>
228
+ </section>
229
+
230
+ <section className="mt-14 scroll-mt-24 rounded border border-border bg-surface p-5">
231
+ <p className="text-label uppercase text-text-tertiary">Observe-only pilot</p>
232
+ <h2 className="mt-2 text-3xl font-semibold text-text-primary">
233
+ See what Availsync would block before enforcing it
234
+ </h2>
235
+ <div className="mt-5 grid gap-4 md:grid-cols-2">
236
+ <div className="rounded border border-border bg-bg p-4">
237
+ <h3 className="text-heading font-semibold text-text-primary">Enforce</h3>
238
+ <p className="mt-2 text-body leading-6 text-text-secondary">
239
+ Availsync creates a lease and returns skip_run when another active claim owns the same repo or project.
240
+ </p>
241
+ </div>
242
+ <div className="rounded border border-border bg-bg p-4">
243
+ <h3 className="text-heading font-semibold text-text-primary">Observe</h3>
244
+ <p className="mt-2 text-body leading-6 text-text-secondary">
245
+ Availsync lets the automation proceed, creates no lease, and records whether it would have blocked the run.
246
+ </p>
247
+ </div>
248
+ </div>
249
+ <p className="mt-4 text-body leading-6 text-text-tertiary">
250
+ Observe mode currently applies to the Node SDK, MCP work tools, and direct calls to <code>/v1/work/run/start</code>.
251
+ Use Observe for the first pilot week, then switch high-value agents to Enforce once the dashboard shows useful would-have-blocked signals.
252
+ </p>
253
+ </section>
254
+
255
+ <section className="mt-14 scroll-mt-24">
256
+ <p className="text-label uppercase text-text-tertiary">Copy-paste examples</p>
257
+ <h2 className="mt-2 text-3xl font-semibold text-text-primary">MCP and REST setup</h2>
258
+ <p className="mt-3 max-w-3xl text-body leading-6 text-text-secondary">
259
+ MCP clients should use the public package with <code>npx -y @availsync/mcp@alpha</code>.
260
+ You do not need to clone the Availsync repo or run the monorepo locally.
261
+ </p>
262
+ <div className="mt-6 grid gap-5">
263
+ {snippets.map((snippet) => (
264
+ <SnippetCard
265
+ key={snippet.id}
266
+ title={snippet.title}
267
+ description={snippet.description}
268
+ code={snippet.code}
269
+ />
270
+ ))}
271
+ </div>
272
+ </section>
273
+
274
+ <section className="mt-14 scroll-mt-24 border-l border-border pl-5">
275
+ <p className="text-label uppercase text-text-tertiary">Roadmap</p>
276
+ <h2 className="mt-2 text-heading font-medium text-text-primary">What comes next</h2>
277
+ <div className="mt-3 grid gap-3 text-body leading-6 text-text-secondary">
278
+ <p>
279
+ The current pilot path is the Node SDK, public MCP package, REST, or the OpenClaw SKILL.md workflow. These
280
+ work with Codex, Claude, Cursor, MCP clients, server jobs, scheduled automations, and scheduling agents.
281
+ </p>
282
+ <p>
283
+ Next priorities are the first shadow-mode pilot, plan-based data
284
+ retention, and a documented API version policy. Webhooks, Python SDK, team roles,
285
+ and a dedicated Codex plugin come after the core integration path is proven.
286
+ </p>
287
+ </div>
288
+ </section>
289
+ </section>
290
+ </main>
291
+ <SiteFooter />
292
+ </>
293
+ );
294
+ }
295
+
296
+ function SnippetCard({
297
+ title,
298
+ description,
299
+ code,
300
+ }: {
301
+ title: string;
302
+ description: string;
303
+ code: string;
304
+ }) {
305
+ return (
306
+ <div className="min-w-0 rounded border border-border bg-surface p-5">
307
+ <div className="max-w-3xl">
308
+ <h3 className="text-title font-semibold text-text-primary">{title}</h3>
309
+ <p className="mt-1 text-body leading-6 text-text-secondary">{description}</p>
310
+ </div>
311
+ <div className="mt-4 min-w-0 max-w-full overflow-hidden rounded border border-border bg-bg">
312
+ <pre className="max-h-[360px] max-w-full overflow-auto p-4 text-sm leading-6 text-text-secondary">
313
+ <code className="block min-w-0 whitespace-pre">{code}</code>
314
+ </pre>
315
+ </div>
316
+ </div>
317
+ );
318
+ }
@@ -0,0 +1,78 @@
1
+ import type { Metadata } from 'next';
2
+ import { SiteHeader } from '@/components/marketing/SiteHeader';
3
+ import { SiteFooter } from '@/components/marketing/SiteFooter';
4
+ import { JsonLd } from '@/components/seo/JsonLd';
5
+ import { webPageSchema } from '@/lib/seo';
6
+
7
+ export const metadata: Metadata = {
8
+ title: 'Reliability',
9
+ description:
10
+ 'How Availsync handles unavailable guardrails, fail-open vs fail-closed behavior, work claim leases, and long-running agent runs.',
11
+ alternates: {
12
+ canonical: '/docs/reliability',
13
+ },
14
+ };
15
+
16
+ const sections = [
17
+ {
18
+ title: 'If Availsync is unavailable',
19
+ body:
20
+ 'The SDK and MCP server surface the failure instead of pretending the resource is safe. In enforce mode, the recommended production policy is fail-closed: stop the agent run without editing files. In observe mode, teams may choose fail-open because observe-only runs do not create protective leases.',
21
+ },
22
+ {
23
+ title: 'If a run is blocked',
24
+ body:
25
+ 'Blocked work runs return skip_run with a reason, retry_after, and the blocking claim summary. Scheduled jobs should exit successfully with the skip reason, not retry in a tight loop.',
26
+ },
27
+ {
28
+ title: 'If a lease expires',
29
+ body:
30
+ 'Availsync treats expired claims as inactive after expires_at. Other agents can then claim the same resource. The original agent will not be stopped by Availsync automatically, so long-running jobs must watch expires_at, extend before expiry, or stop work before the lease elapses.',
31
+ },
32
+ {
33
+ title: 'If finish fails',
34
+ body:
35
+ 'The Node SDK calls finish in finally when a real claim exists. If finish fails, the claim still expires at expires_at. Repeated finish calls are safe through the run API.',
36
+ },
37
+ ];
38
+
39
+ export default function ReliabilityPage() {
40
+ return (
41
+ <>
42
+ <JsonLd data={webPageSchema('/docs/reliability', 'Availsync reliability', metadata.description as string)} />
43
+ <SiteHeader />
44
+ <main className="min-h-screen bg-bg">
45
+ <section className="mx-auto max-w-4xl px-4 py-16">
46
+ <p className="text-label uppercase text-text-tertiary">Reliability</p>
47
+ <h1 className="mt-3 text-5xl font-semibold text-text-primary">
48
+ Decide how agents behave when coordination is unavailable.
49
+ </h1>
50
+ <p className="mt-5 text-heading leading-7 text-text-secondary">
51
+ Availsync is a pre-flight coordination layer. It protects runs that call it before
52
+ acting, but it is not a proxy that can stop an unintegrated agent or a process that
53
+ ignores its lease.
54
+ </p>
55
+
56
+ <div className="mt-10 grid gap-4">
57
+ {sections.map((section) => (
58
+ <div className="rounded border border-border bg-surface p-5" key={section.title}>
59
+ <h2 className="text-heading font-semibold text-text-primary">{section.title}</h2>
60
+ <p className="mt-2 text-body leading-6 text-text-secondary">{section.body}</p>
61
+ </div>
62
+ ))}
63
+ </div>
64
+
65
+ <div className="mt-8 rounded border border-warning/40 bg-warning/10 p-5">
66
+ <h2 className="text-heading font-semibold text-text-primary">Recommended production default</h2>
67
+ <p className="mt-2 text-body leading-6 text-text-secondary">
68
+ Start pilots in Observe to measure risk. When you switch important repo/deploy agents
69
+ to Enforce, treat Availsync errors as fail-closed and stop the run before touching
70
+ files, deploying, or booking downstream systems.
71
+ </p>
72
+ </div>
73
+ </section>
74
+ </main>
75
+ <SiteFooter />
76
+ </>
77
+ );
78
+ }
@@ -0,0 +1,166 @@
1
+ import type { Metadata } from 'next';
2
+ import { SiteHeader } from '@/components/marketing/SiteHeader';
3
+ import { SiteFooter } from '@/components/marketing/SiteFooter';
4
+ import { JsonLd } from '@/components/seo/JsonLd';
5
+ import { Button } from '@/components/ui/Button';
6
+ import { nodeSdkSnippets } from '@/lib/setupGuides';
7
+ import { sdkNodePageSchema } from '@/lib/seo';
8
+
9
+ export const metadata: Metadata = {
10
+ title: 'Node SDK',
11
+ description:
12
+ 'Use @availsync/node to guard coding-agent automations with repo claims, observe mode, skip_run, extend, and finish.',
13
+ alternates: {
14
+ canonical: '/docs/sdk/node',
15
+ },
16
+ };
17
+
18
+ const install = `npm install @availsync/node@alpha`;
19
+
20
+ const env = `AVAILSYNC_API_KEY=avs_live_...
21
+ AVAILSYNC_AGENT_ID=agent_uuid
22
+ AVAILSYNC_API_URL=https://availsync.dev`;
23
+
24
+ const apiReference = [
25
+ {
26
+ name: 'createAvailsyncClient({ apiKey, agentId, baseUrl? })',
27
+ body: 'Creates a Node 18+ client. The API key belongs to one agent and should only live in server, CI, MCP, or automation env vars.',
28
+ },
29
+ {
30
+ name: 'work.withClaim(resource, options, fn)',
31
+ body: 'Recommended helper. Starts a guarded run, runs your callback only when action is proceed, and finishes the claim in finally.',
32
+ },
33
+ {
34
+ name: 'work.start({ resource, durationMinutes?, reason?, idempotencyKey?, metadata? })',
35
+ body: 'Low-level start call for custom wrappers. Returns proceed, skip_run, or observe-mode proceed with shadow metadata.',
36
+ },
37
+ {
38
+ name: 'work.extend(claimId, { durationMinutes? })',
39
+ body: 'Extends an active lease when a long-running agent needs more time. Skip this when observe mode returns claim: null.',
40
+ },
41
+ {
42
+ name: 'work.finish(claimId, { outcome?, reason?, metadata? })',
43
+ body: 'Releases the claim after success, failure, or no-op. Repeated finish calls are safe through the run API.',
44
+ },
45
+ ];
46
+
47
+ const responseNotes = [
48
+ ['proceed', 'The agent may run. In enforce mode this usually includes a claim that should be extended or finished.'],
49
+ ['skip_run', 'Another active claim owns the same resource. Exit cleanly and report the reason.'],
50
+ ['observe mode', 'The agent proceeds with claim: null. Availsync records whether it would have blocked the run.'],
51
+ ['AvailsyncError', 'Auth, validation, plan-limit, network, and unexpected API failures throw a typed error without exposing secrets.'],
52
+ ];
53
+
54
+ export default function NodeSdkPage() {
55
+ const snippets = nodeSdkSnippets({
56
+ appUrl: 'https://availsync.dev',
57
+ agentId: 'AGENT_ID',
58
+ resourceKey: 'owner/repo',
59
+ durationMinutes: 45,
60
+ });
61
+
62
+ return (
63
+ <>
64
+ <JsonLd data={sdkNodePageSchema()} />
65
+ <SiteHeader />
66
+ <main className="min-h-screen bg-bg">
67
+ <section className="mx-auto max-w-5xl px-4 py-16">
68
+ <p className="text-label uppercase text-text-tertiary">Node SDK</p>
69
+ <h1 className="mt-3 max-w-4xl text-5xl font-semibold text-text-primary">
70
+ Guard coding-agent runs with one SDK call.
71
+ </h1>
72
+ <p className="mt-5 max-w-3xl text-heading leading-7 text-text-secondary">
73
+ Use <code>@availsync/node</code> before Codex, Claude, Cursor, MCP clients, cron jobs,
74
+ deploy scripts, or server automations touch a protected repo.
75
+ </p>
76
+ <div className="mt-8 flex flex-wrap gap-3">
77
+ <Button href="/signup">Start free</Button>
78
+ <Button href="/docs/pilot" variant="secondary">
79
+ Pilot in 10 minutes
80
+ </Button>
81
+ </div>
82
+
83
+ <section className="mt-12 grid gap-5 lg:grid-cols-[0.9fr_1.1fr]">
84
+ <DocCard title="Install" code={install} />
85
+ <DocCard title="Environment" code={env} />
86
+ </section>
87
+
88
+ <section className="mt-14">
89
+ <p className="text-label uppercase text-text-tertiary">Recommended helper</p>
90
+ <h2 className="mt-2 text-3xl font-semibold text-text-primary">Use withClaim first</h2>
91
+ <p className="mt-3 max-w-3xl text-body leading-6 text-text-secondary">
92
+ Default to repo-level resources. In enforce mode, blocked agents get <code>skip_run</code>.
93
+ Observe mode currently applies to the Node SDK, MCP work tools, and direct calls to <code>/v1/work/run/start</code>.
94
+ In observe mode, the callback still runs and receives shadow metadata.
95
+ </p>
96
+ <div className="mt-6 grid gap-5">
97
+ {snippets.map((snippet) => (
98
+ <Snippet key={snippet.id} title={snippet.title} description={snippet.description} code={snippet.code} />
99
+ ))}
100
+ </div>
101
+ </section>
102
+
103
+ <section className="mt-14 grid gap-5 lg:grid-cols-2">
104
+ <div>
105
+ <p className="text-label uppercase text-text-tertiary">API surface</p>
106
+ <h2 className="mt-2 text-3xl font-semibold text-text-primary">Methods</h2>
107
+ <div className="mt-5 space-y-3">
108
+ {apiReference.map((item) => (
109
+ <div className="rounded border border-border bg-surface p-4" key={item.name}>
110
+ <code className="font-mono text-sm text-text-primary">{item.name}</code>
111
+ <p className="mt-2 text-body leading-6 text-text-secondary">{item.body}</p>
112
+ </div>
113
+ ))}
114
+ </div>
115
+ </div>
116
+ <div>
117
+ <p className="text-label uppercase text-text-tertiary">Runtime outcomes</p>
118
+ <h2 className="mt-2 text-3xl font-semibold text-text-primary">What to handle</h2>
119
+ <div className="mt-5 space-y-3">
120
+ {responseNotes.map(([label, body]) => (
121
+ <div className="rounded border border-border bg-surface p-4" key={label}>
122
+ <code className="font-mono text-sm text-text-primary">{label}</code>
123
+ <p className="mt-2 text-body leading-6 text-text-secondary">{body}</p>
124
+ </div>
125
+ ))}
126
+ </div>
127
+ </div>
128
+ </section>
129
+
130
+ <section className="mt-14 rounded border border-warning/40 bg-warning/10 p-5">
131
+ <h2 className="text-heading font-semibold text-text-primary">Alpha package note</h2>
132
+ <p className="mt-2 text-body leading-6 text-text-secondary">
133
+ The current public package is an alpha. Use <code>npm install @availsync/node@alpha</code>
134
+ in docs and pilots so the prerelease status is explicit, even if npm also resolves the
135
+ first package through its default tag.
136
+ </p>
137
+ </section>
138
+ </section>
139
+ </main>
140
+ <SiteFooter />
141
+ </>
142
+ );
143
+ }
144
+
145
+ function DocCard({ title, code }: { title: string; code: string }) {
146
+ return (
147
+ <div className="rounded border border-border bg-surface p-5">
148
+ <h2 className="text-heading font-semibold text-text-primary">{title}</h2>
149
+ <pre className="mt-4 overflow-auto rounded border border-border bg-bg p-4 text-sm leading-6 text-text-secondary">
150
+ <code>{code}</code>
151
+ </pre>
152
+ </div>
153
+ );
154
+ }
155
+
156
+ function Snippet({ title, description, code }: { title: string; description: string; code: string }) {
157
+ return (
158
+ <div className="rounded border border-border bg-surface p-5">
159
+ <h3 className="text-title font-semibold text-text-primary">{title}</h3>
160
+ <p className="mt-1 text-body leading-6 text-text-secondary">{description}</p>
161
+ <pre className="mt-4 max-h-[420px] overflow-auto rounded border border-border bg-bg p-4 text-sm leading-6 text-text-secondary">
162
+ <code>{code}</code>
163
+ </pre>
164
+ </div>
165
+ );
166
+ }
@@ -0,0 +1,57 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ :root {
6
+ color-scheme: dark;
7
+ }
8
+
9
+ * {
10
+ box-sizing: border-box;
11
+ }
12
+
13
+ body {
14
+ margin: 0;
15
+ background: #0f0f0f;
16
+ color: #f2f2f2;
17
+ }
18
+
19
+ a {
20
+ color: inherit;
21
+ text-decoration: none;
22
+ }
23
+
24
+ button,
25
+ input,
26
+ select,
27
+ textarea {
28
+ font: inherit;
29
+ }
30
+
31
+ /* Skeleton loading animation */
32
+ @keyframes skeleton-shimmer {
33
+ 0% { background-position: -200% 0; }
34
+ 100% { background-position: 200% 0; }
35
+ }
36
+
37
+ .skeleton {
38
+ background: linear-gradient(90deg, #1C1C1C 25%, #2A2A2A 50%, #1C1C1C 75%);
39
+ background-size: 200% 100%;
40
+ animation: skeleton-shimmer 1.5s ease-in-out infinite;
41
+ border-radius: 4px;
42
+ }
43
+
44
+ /* Dashboard dark scrollbar */
45
+ .dark-scroll::-webkit-scrollbar {
46
+ width: 6px;
47
+ }
48
+ .dark-scroll::-webkit-scrollbar-track {
49
+ background: transparent;
50
+ }
51
+ .dark-scroll::-webkit-scrollbar-thumb {
52
+ background: #2A2A2A;
53
+ border-radius: 3px;
54
+ }
55
+ .dark-scroll::-webkit-scrollbar-thumb:hover {
56
+ background: #3D3D3D;
57
+ }
Binary file