@vibiz/cli 0.2.3 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibiz/cli",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "description": "The Vibiz Stack CLI and MCP server: website, database, sign-in, email and AI for a new business, from your terminal or your AI agent.",
5
5
  "keywords": [
6
6
  "vibiz",
@@ -6,8 +6,6 @@ VIBIZ_AUTH_COOKIE_SECRET=
6
6
  # Optional: site analytics. When both are set, the analytics script loads.
7
7
  NEXT_PUBLIC_VIBIZ_ANALYTICS_KEY=
8
8
  NEXT_PUBLIC_VIBIZ_ANALYTICS_URL=
9
- # Optional: session replay (the `replay` resource). Asks visitors for consent first.
10
- NEXT_PUBLIC_VIBIZ_REPLAY=
11
9
  # Optional: the AI assistant on the dashboard (`vibiz add ai`). OPENAI_* are aliases.
12
10
  VIBIZ_AI_BASE_URL=
13
11
  VIBIZ_AI_API_KEY=
@@ -66,9 +66,7 @@ app/api/auth/[...path] forwards sign-in requests to the sign-in service
66
66
  proxy.ts guards /dashboard, finishes Google sign-in
67
67
  lib/auth/ server (getAuth, currentUser) and browser (authClient) handles
68
68
  lib/db.ts, db/ Postgres via Drizzle, schema, create-if-missing
69
- components/analytics.tsx loads site analytics when NEXT_PUBLIC_VIBIZ_ANALYTICS_* are set
70
- components/replay-*.tsx session replay: consent banner, `always` for signed-in users
71
- lib/replay.ts the consent choice (localStorage) and vibiz('replay', …)
69
+ components/analytics.tsx loads site analytics and session replay when NEXT_PUBLIC_VIBIZ_ANALYTICS_* are set
72
70
  app/api/chat, components/chat-box.tsx the AI assistant (streams from the Vibiz AI gateway)
73
71
  ```
74
72
 
@@ -82,7 +80,6 @@ app/api/chat, components/chat-box.tsx the AI assistant (streams from the Vibiz
82
80
  | `VIBIZ_AUTH_COOKIE_SECRET` | signs the session cookie (32+ chars) |
83
81
  | `NEXT_PUBLIC_VIBIZ_ANALYTICS_KEY` | optional: analytics, with the URL below |
84
82
  | `NEXT_PUBLIC_VIBIZ_ANALYTICS_URL` | optional: loads `<url>/v1/script.js` |
85
- | `NEXT_PUBLIC_VIBIZ_REPLAY` | optional: session replay, after consent |
86
83
 
87
84
  The other sign-in variables Vibiz sets (`VIBIZ_AUTH_JWKS_URL`, `VIBIZ_AUTH_PROJECT_ID`, keys) are
88
85
  there for code that verifies tokens itself; this app doesn't need them.
@@ -97,10 +94,12 @@ it and sign in on the live address. Everything else (pages, the database) works
97
94
 
98
95
  ## Session replay
99
96
 
100
- With the `replay` resource (`vibiz add replay`), the app asks each visitor once, in a small banner,
101
- whether the visit may be recorded to find and fix problems. Nothing is recorded before they say yes,
102
- and the choice is kept in `localStorage`. "Recording choices" in the footer asks again. What people
103
- type, passwords and card fields are never in a recording. Signed-in users on `/dashboard` are
104
- recorded for the whole tab (`vibiz('replay', 'always')`); everyone else only when something goes
105
- wrong (an error, a rage or dead click). Mark anything else private with `data-vibiz-mask` (text
106
- hidden) or `data-vibiz-block` (not recorded at all).
97
+ With the `replay` resource (`vibiz add replay`), every session is recorded, with no prompt and no
98
+ code in this app: the analytics script starts it. What people type, emails and phone numbers are
99
+ masked, and password and card fields are never in a recording. Mention the recording in your privacy
100
+ policy. Mark anything else private with `data-vibiz-mask` (text hidden) or `data-vibiz-block` (not
101
+ recorded at all).
102
+
103
+ If your visitors need to agree first (the EU, the UK, or a business that wants it), set
104
+ `require_consent: true` on the resource and start recording yourself with `vibiz('replay', 'start')`
105
+ once they do.
@@ -6,7 +6,6 @@ import { type Note, notes } from '@/db/schema';
6
6
  import { ChatBox } from '@/components/chat-box';
7
7
  import { Header } from '@/components/header';
8
8
  import { NotConfigured } from '@/components/not-configured';
9
- import { ReplaySignedIn } from '@/components/replay-identify';
10
9
  import { SignOutButton } from '@/components/sign-out-button';
11
10
  import { Button, Input, Notice } from '@/components/ui';
12
11
  import { currentUser } from '@/lib/auth/server';
@@ -51,7 +50,6 @@ export default async function Dashboard() {
51
50
 
52
51
  return (
53
52
  <Shell signedIn>
54
- <ReplaySignedIn />
55
53
  <section className="flex items-center gap-4 rounded-xl border border-zinc-200 p-6">
56
54
  {user.image ? (
57
55
  // A plain <img>: avatars come from any host, so next/image would need them all listed.
@@ -2,7 +2,6 @@ import type { Metadata } from 'next';
2
2
  import type { CSSProperties, ReactNode } from 'react';
3
3
  import { site } from '@/app.config';
4
4
  import { Analytics } from '@/components/analytics';
5
- import { ReplayConsent } from '@/components/replay-consent';
6
5
  import './globals.css';
7
6
 
8
7
  export const metadata: Metadata = {
@@ -21,7 +20,6 @@ export default function RootLayout({ children }: { children: ReactNode }) {
21
20
  <body className="flex min-h-screen flex-col font-sans">
22
21
  {children}
23
22
  <Analytics />
24
- <ReplayConsent />
25
23
  </body>
26
24
  </html>
27
25
  );
@@ -1,6 +1,5 @@
1
1
  import { site } from '@/app.config';
2
2
  import { Header } from '@/components/header';
3
- import { ReplayChoicesLink } from '@/components/replay-consent';
4
3
  import { ButtonLink } from '@/components/ui';
5
4
 
6
5
  const features = [
@@ -51,11 +50,8 @@ export default function Home() {
51
50
  </main>
52
51
 
53
52
  <footer className="border-t border-zinc-200">
54
- <div className="mx-auto flex max-w-5xl justify-between gap-4 px-6 py-8 text-sm text-zinc-500">
55
- <span>
56
- © {new Date().getFullYear()} {site.name}
57
- </span>
58
- <ReplayChoicesLink />
53
+ <div className="mx-auto max-w-5xl px-6 py-8 text-sm text-zinc-500">
54
+ © {new Date().getFullYear()} {site.name}
59
55
  </div>
60
56
  </footer>
61
57
  </>