Merge P2.2 part 2: remove the excluded packages and scrub internal names
This commit is contained in:
5
.github/PULL_REQUEST_TEMPLATE.md
vendored
5
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -32,6 +32,5 @@ Closes #
|
|||||||
- [ ] New behavior has accompanying tests; bug fixes have a regression test.
|
- [ ] New behavior has accompanying tests; bug fixes have a regression test.
|
||||||
- [ ] No secrets, API keys, or credentials are committed.
|
- [ ] No secrets, API keys, or credentials are committed.
|
||||||
- [ ] Docs updated if behavior, commands, or configuration changed.
|
- [ ] Docs updated if behavior, commands, or configuration changed.
|
||||||
- [ ] If this touches the memory substrate (`packages/hive-mind-core`), I read
|
- [ ] If this touches memory, it goes through `MemoryStore` from
|
||||||
CLAUDE.md §7.5 (the monorepo is the source of truth; do not author
|
`@waggle/memory-contract` (AGENTS.md, section 3, rule 2).
|
||||||
substrate features directly on the OSS mirror).
|
|
||||||
|
|||||||
99
.github/workflows/deploy-www.yml
vendored
99
.github/workflows/deploy-www.yml
vendored
@@ -1,99 +0,0 @@
|
|||||||
name: Deploy Landing Page
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
paths:
|
|
||||||
- 'apps/www/**'
|
|
||||||
- 'docs/methodology.md'
|
|
||||||
- 'package.json'
|
|
||||||
- 'package-lock.json'
|
|
||||||
- '.github/workflows/deploy-www.yml'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: www-production
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deployment_config:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment:
|
|
||||||
name: production
|
|
||||||
url: https://waggle-os.ai
|
|
||||||
outputs:
|
|
||||||
configured: ${{ steps.vercel.outputs.configured }}
|
|
||||||
env:
|
|
||||||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
|
||||||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
|
||||||
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
|
||||||
steps:
|
|
||||||
- name: Check Vercel configuration
|
|
||||||
id: vercel
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
if [[ -n "$VERCEL_TOKEN" && -n "$VERCEL_ORG_ID" && -n "$VERCEL_PROJECT_ID" ]]; then
|
|
||||||
echo "configured=true" >> "$GITHUB_OUTPUT"
|
|
||||||
else
|
|
||||||
echo "configured=false" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "::warning::Landing page verified but not deployed: Vercel secrets are not configured."
|
|
||||||
fi
|
|
||||||
|
|
||||||
verify:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Test public site
|
|
||||||
run: npm run test -w apps/www -- --reporter=dot
|
|
||||||
|
|
||||||
- name: Typecheck public site
|
|
||||||
run: npx tsc --noEmit --project apps/www/tsconfig.json
|
|
||||||
|
|
||||||
- name: Build public site
|
|
||||||
run: npm run build:www
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [deployment_config, verify]
|
|
||||||
if: needs.deployment_config.outputs.configured == 'true'
|
|
||||||
environment:
|
|
||||||
name: production
|
|
||||||
url: https://waggle-os.ai
|
|
||||||
env:
|
|
||||||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
|
||||||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
|
||||||
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Pull Vercel production environment
|
|
||||||
working-directory: apps/www
|
|
||||||
run: npx --yes vercel pull --yes --environment=production --token="$VERCEL_TOKEN"
|
|
||||||
|
|
||||||
- name: Build Vercel prebuilt output
|
|
||||||
working-directory: apps/www
|
|
||||||
run: npx --yes vercel build --prod --token="$VERCEL_TOKEN"
|
|
||||||
|
|
||||||
- name: Deploy Vercel prebuilt output
|
|
||||||
working-directory: apps/www
|
|
||||||
run: npx --yes vercel deploy --prebuilt --prod --token="$VERCEL_TOKEN"
|
|
||||||
108
.github/workflows/hive-mind-cli-cross-platform.yml
vendored
108
.github/workflows/hive-mind-cli-cross-platform.yml
vendored
@@ -1,108 +0,0 @@
|
|||||||
name: hive-mind-cli cross-platform install + smoke
|
|
||||||
|
|
||||||
# Wave 1 cleanup brief 2026-04-29 §3.5 — windows-latest CI regression test.
|
|
||||||
# Verifies that `npm install -g @waggle/hive-mind-cli` followed by `hive-mind-cli doctor`
|
|
||||||
# works without ENOENT, quarantine, or manual debug on Windows + macOS + Linux.
|
|
||||||
#
|
|
||||||
# Acceptance per feedback_memory_install_dead_simple binding rule:
|
|
||||||
# - All three OS matrix cells PASS green
|
|
||||||
# - Zero manual intervention required
|
|
||||||
# - First MCP-style tool call (the doctor smoke test) succeeds in <60s
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main, 'feature/**']
|
|
||||||
paths:
|
|
||||||
- 'packages/hive-mind-cli/**'
|
|
||||||
- 'packages/hive-mind-shim-core/**'
|
|
||||||
- 'packages/hive-mind-core/**'
|
|
||||||
- 'packages/hive-mind-mcp-server/**'
|
|
||||||
- 'packages/hive-mind-wiki-compiler/**'
|
|
||||||
- 'packages/hive-mind-hooks-claude-code/**'
|
|
||||||
- 'vendor/pptxgenjs/**'
|
|
||||||
- 'package.json'
|
|
||||||
- 'package-lock.json'
|
|
||||||
- '.github/workflows/hive-mind-cli-cross-platform.yml'
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
paths:
|
|
||||||
- 'packages/hive-mind-cli/**'
|
|
||||||
- 'packages/hive-mind-shim-core/**'
|
|
||||||
- 'packages/hive-mind-core/**'
|
|
||||||
- 'vendor/pptxgenjs/**'
|
|
||||||
- 'package.json'
|
|
||||||
- 'package-lock.json'
|
|
||||||
- '.github/workflows/hive-mind-cli-cross-platform.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
install-and-smoke:
|
|
||||||
name: ${{ matrix.os }} install + smoke
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
||||||
node-version: ['20.x']
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
|
|
||||||
- name: Install workspace deps
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
# hive-mind-core imports @waggle/shared, whose dist/ is gitignored and so
|
|
||||||
# absent on a clean checkout. hive-mind-core/tsconfig declares no project
|
|
||||||
# reference to it (the OSS subtree-split mirrors that tsconfig, so a
|
|
||||||
# ../shared reference would dangle in the export root), so `tsc --build`
|
|
||||||
# won't bootstrap it. Build shared first — same as ci.yml/tauri-build-pr.yml.
|
|
||||||
- name: Build @waggle/shared (hive-mind-core dep)
|
|
||||||
run: cd packages/shared && npx tsc --build
|
|
||||||
|
|
||||||
- name: Build hive-mind-core (substrate)
|
|
||||||
run: cd packages/hive-mind-core && npx tsc --build
|
|
||||||
|
|
||||||
- name: Build hive-mind-wiki-compiler
|
|
||||||
run: cd packages/hive-mind-wiki-compiler && npx tsc --build
|
|
||||||
|
|
||||||
- name: Build hive-mind-mcp-server
|
|
||||||
run: cd packages/hive-mind-mcp-server && npx tsc --build
|
|
||||||
|
|
||||||
- name: Build hive-mind-cli
|
|
||||||
run: cd packages/hive-mind-cli && npx tsc --build
|
|
||||||
|
|
||||||
- name: Run postinstall (bundles fix on win32, no-op POSIX)
|
|
||||||
run: node packages/hive-mind-cli/postinstall.cjs
|
|
||||||
|
|
||||||
- name: Init hive-mind data dir (scaffold personal.mind for the smoke)
|
|
||||||
run: node packages/hive-mind-cli/dist/index.js init
|
|
||||||
env:
|
|
||||||
HIVE_MIND_DATA_DIR: ${{ runner.temp }}/waggle-ci-home
|
|
||||||
|
|
||||||
- name: Smoke test — hive-mind-cli doctor (independent of upstream hook)
|
|
||||||
run: node packages/hive-mind-cli/dist/index.js doctor
|
|
||||||
env:
|
|
||||||
# doctor + init resolve the mind via HIVE_MIND_DATA_DIR (the CLI never
|
|
||||||
# reads WAGGLE_HOME — that prior env was a no-op). Isolate to a CI temp
|
|
||||||
# dir; init above scaffolds personal.mind there so doctor finds it.
|
|
||||||
HIVE_MIND_DATA_DIR: ${{ runner.temp }}/waggle-ci-home
|
|
||||||
|
|
||||||
- name: Doctor smoke result must be green (no quarantine, no ENOENT)
|
|
||||||
run: |
|
|
||||||
# If we got here, doctor exited 0 — green. Re-emit a confirmation marker
|
|
||||||
# so log scrapers see the success line clearly.
|
|
||||||
echo "::notice title=hive-mind-cli doctor passed::Cross-platform install + smoke verified on ${{ matrix.os }}"
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
acceptance:
|
|
||||||
name: Wave 1 acceptance gate
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: install-and-smoke
|
|
||||||
steps:
|
|
||||||
- name: All matrix cells passed
|
|
||||||
run: echo "Wave 1 dead-simple acceptance criteria met across windows-latest + macos-latest + ubuntu-latest."
|
|
||||||
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -104,11 +104,6 @@ jobs:
|
|||||||
- name: Stage sidecar dependencies
|
- name: Stage sidecar dependencies
|
||||||
run: node scripts/stage-sidecar-deps.mjs
|
run: node scripts/stage-sidecar-deps.mjs
|
||||||
|
|
||||||
- name: Verify packaged hook lifecycles
|
|
||||||
run: node node_modules/vitest/vitest.mjs run --root . --config vitest.config.ts packages/agent/tests/hook-packages-runtime.test.ts -t "runs staged Tauri hook lifecycles"
|
|
||||||
env:
|
|
||||||
WAGGLE_VERIFY_STAGED_HOOK_RUNTIME: '1'
|
|
||||||
|
|
||||||
- name: Build frontend
|
- name: Build frontend
|
||||||
run: cd apps/web && npx vite build
|
run: cd apps/web && npx vite build
|
||||||
|
|
||||||
|
|||||||
5
.github/workflows/tauri-build-pr.yml
vendored
5
.github/workflows/tauri-build-pr.yml
vendored
@@ -99,11 +99,6 @@ jobs:
|
|||||||
- name: Stage sidecar dependencies
|
- name: Stage sidecar dependencies
|
||||||
run: node scripts/stage-sidecar-deps.mjs
|
run: node scripts/stage-sidecar-deps.mjs
|
||||||
|
|
||||||
- name: Verify packaged hook lifecycles
|
|
||||||
run: node node_modules/vitest/vitest.mjs run --root . --config vitest.config.ts packages/agent/tests/hook-packages-runtime.test.ts -t "runs staged Tauri hook lifecycles"
|
|
||||||
env:
|
|
||||||
WAGGLE_VERIFY_STAGED_HOOK_RUNTIME: '1'
|
|
||||||
|
|
||||||
- name: Build frontend
|
- name: Build frontend
|
||||||
run: cd apps/web && npx vite build
|
run: cd apps/web && npx vite build
|
||||||
|
|
||||||
|
|||||||
9
.gitignore
vendored
9
.gitignore
vendored
@@ -106,15 +106,6 @@ tmp_hermes-pilot*.log
|
|||||||
tmp_lpv*.log
|
tmp_lpv*.log
|
||||||
tmp_lpv*.json
|
tmp_lpv*.json
|
||||||
|
|
||||||
# Bee regen backup folders — rollback artifacts, not committed
|
|
||||||
apps/www/public/brand/_backup-*/
|
|
||||||
|
|
||||||
# Next.js (apps/www)
|
|
||||||
.next/
|
|
||||||
.vercel/
|
|
||||||
|
|
||||||
# Lighthouse audit artifacts (regenerable via `npx lighthouse`)
|
|
||||||
apps/www/lighthouse-report.json
|
|
||||||
|
|
||||||
|
|
||||||
# Vision-harness capture output (regenerated per run)
|
# Vision-harness capture output (regenerated per run)
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
This branch turns the commercial Waggle OS codebase into an open-source **community edition**.
|
This branch turns the commercial Waggle OS codebase into an open-source **community edition**.
|
||||||
The conversion is in progress. Memory runs on local mem0 through the memory contract (P1.5);
|
The conversion is in progress. Memory runs on local mem0 through the memory contract (P1.5);
|
||||||
team mode stays in postponed packages, and the excluded memory packages remain in the
|
team mode stays in postponed packages, and the excluded packages left the repository in P2.2.
|
||||||
repository, unbuilt, until P2.2. Work packages remove or replace the rest one by one.
|
Work packages remove or replace the rest one by one.
|
||||||
|
|
||||||
Sources of truth, in order:
|
Sources of truth, in order:
|
||||||
1. The agreed scope ("Waggle OSS Agreed Scope Annex", held by the project owner).
|
1. The agreed scope ("Waggle OSS Agreed Scope Annex", held by the project owner).
|
||||||
@@ -64,8 +64,7 @@ npm workspaces with the root `package-lock.json`. Node `^20.19.0 || >=22.12.0`.
|
|||||||
| `packages/agent`, `core`, `server`, `shared`, `sdk`, `marketplace`, `cli`, `launcher` | Keep. |
|
| `packages/agent`, `core`, `server`, `shared`, `sdk`, `marketplace`, `cli`, `launcher` | Keep. |
|
||||||
| `packages/memory-contract`, `packages/memory-mem0` | Keep. The memory contract and its mem0 implementation (ADR-0007). |
|
| `packages/memory-contract`, `packages/memory-mem0` | Keep. The memory contract and its mem0 implementation (ADR-0007). |
|
||||||
| `packages/team-server`, `packages/waggle-dance`, `packages/worker` | Postponed: team mode stays in the repo, is not built or shipped (ADR-0003). |
|
| `packages/team-server`, `packages/waggle-dance`, `packages/worker` | Postponed: team mode stays in the repo, is not built or shipped (ADR-0003). |
|
||||||
| `packages/hive-mind-*`, `memory-mcp`, `wiki-compiler` | Excluded. Nothing in scope imports them; they are not built or tested and leave in P2.2. |
|
| `packages/hive-mind-*`, `memory-mcp`, `wiki-compiler`, `admin-web`, `apps/www` | Excluded; removed in P2.2. The old memory engine is maintained separately by the owner. |
|
||||||
| `packages/admin-web`, `apps/www` | Excluded. |
|
|
||||||
| `apps/browser-ext` | Not decided. Do not extend it. |
|
| `apps/browser-ext` | Not decided. Do not extend it. |
|
||||||
| `docs/` | `docs/oss/` holds the community-edition records. The remaining guides, reference, architecture, getting-started and contributing pages predate this edition and are rewritten in P2.4. Internal history (`sidecar/`, `benchmarks/`, `judging/`, internal docs) was removed in P2.2. |
|
| `docs/` | `docs/oss/` holds the community-edition records. The remaining guides, reference, architecture, getting-started and contributing pages predate this edition and are rewritten in P2.4. Internal history (`sidecar/`, `benchmarks/`, `judging/`, internal docs) was removed in P2.2. |
|
||||||
|
|
||||||
|
|||||||
17
Dockerfile
17
Dockerfile
@@ -9,11 +9,10 @@ FROM node:20-alpine AS builder
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy the full workspace before install. The monorepo has 27 workspaces
|
# Copy the full workspace before install. A hand-maintained COPY list of the
|
||||||
# (packages/* + apps/*); a hand-maintained COPY list drifts (it had referenced
|
# workspaces (packages/* + apps/*) drifts, so copy wholesale for correctness.
|
||||||
# the nonexistent packages/ui and omitted every hive-mind-* package), so copy
|
# Trades some layer-cache granularity for not silently breaking when a
|
||||||
# wholesale for correctness. Trades some layer-cache granularity for not
|
# workspace is added.
|
||||||
# silently breaking when a workspace is added.
|
|
||||||
COPY package.json package-lock.json* ./
|
COPY package.json package-lock.json* ./
|
||||||
COPY packages packages
|
COPY packages packages
|
||||||
COPY apps apps
|
COPY apps apps
|
||||||
@@ -26,9 +25,8 @@ COPY vitest*.ts ./
|
|||||||
RUN npm install --ignore-scripts 2>/dev/null || npm install
|
RUN npm install --ignore-scripts 2>/dev/null || npm install
|
||||||
|
|
||||||
# Build workspace packages THEN the web UI.
|
# Build workspace packages THEN the web UI.
|
||||||
# build:all → build:packages (hive-mind-core → shared → core → agent → server)
|
# build:all → build:packages (shared → core → agent → server)
|
||||||
# then the apps/web Vite build to root /dist. @waggle/hive-mind-core emits its
|
# then the apps/web Vite build to root /dist.
|
||||||
# dist/ here; @waggle/core imports it as dist/ at runtime, so this is required.
|
|
||||||
RUN npm run build:all
|
RUN npm run build:all
|
||||||
# Team mode is left out of build:packages (ADR-0003); build what this image runs.
|
# Team mode is left out of build:packages (ADR-0003); build what this image runs.
|
||||||
RUN cd packages/waggle-dance && npx tsc --build --force && cd ../worker && npm run build
|
RUN cd packages/waggle-dance && npx tsc --build --force && cd ../worker && npm run build
|
||||||
@@ -61,8 +59,7 @@ COPY --from=native-builder /app/node_modules node_modules
|
|||||||
COPY --from=native-builder /app/package.json package.json
|
COPY --from=native-builder /app/package.json package.json
|
||||||
|
|
||||||
# Built workspace packages from the builder — carries emitted dist/ alongside
|
# Built workspace packages from the builder — carries emitted dist/ alongside
|
||||||
# src, so @waggle/hive-mind-core/dist (a runtime dep of @waggle/core) is present.
|
# src. (The old Dockerfile copied source packages from the build context here, which
|
||||||
# (The old Dockerfile copied source packages from the build context here, which
|
|
||||||
# dropped every freshly-built dist/ and broke runtime module resolution.)
|
# dropped every freshly-built dist/ and broke runtime module resolution.)
|
||||||
COPY --from=builder /app/packages packages
|
COPY --from=builder /app/packages packages
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ In scope:
|
|||||||
|
|
||||||
- The desktop app (Tauri shell + bundled sidecar), the web app, and the
|
- The desktop app (Tauri shell + bundled sidecar), the web app, and the
|
||||||
workspace packages under `packages/` and `apps/`.
|
workspace packages under `packages/` and `apps/`.
|
||||||
- The memory substrate (`packages/hive-mind-core`) and its MCP servers.
|
- Memory (`packages/memory-contract`, `packages/memory-mem0`).
|
||||||
- Prompt-injection paths, secret handling (the vault), the filesystem boundary,
|
- Prompt-injection paths, secret handling (the vault), the filesystem boundary,
|
||||||
and the capability/approval gates — see `THREAT_MODEL.md` for the details.
|
and the capability/approval gates — see `THREAT_MODEL.md` for the details.
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ override, prompt-extraction) and make it act against the operator's intent.
|
|||||||
## Controls (implemented)
|
## Controls (implemented)
|
||||||
|
|
||||||
### 1. Injection scanning at every ingress — `scanForInjection`
|
### 1. Injection scanning at every ingress — `scanForInjection`
|
||||||
`packages/hive-mind-core/src/injection-scanner.ts` (re-exported via
|
`packages/core/src/injection-scanner.ts` (re-exported via
|
||||||
`packages/agent/src/injection-scanner.ts`). Three pattern sets — role-override,
|
`packages/agent/src/injection-scanner.ts`). Three pattern sets — role-override,
|
||||||
prompt-extraction, instruction-injection — produce a score; `safe = score < 0.3`
|
prompt-extraction, instruction-injection — produce a score; `safe = score < 0.3`
|
||||||
(instruction-injection is weighted higher, 0.6, for `tool_output` context). It gates the
|
(instruction-injection is weighted higher, 0.6, for `tool_output` context). It gates the
|
||||||
@@ -82,14 +82,9 @@ belong in the vault or a local `.env` (never committed). `.env.example` contains
|
|||||||
names plus non-secret development defaults, never live credentials. Callers must
|
names plus non-secret development defaults, never live credentials. Callers must
|
||||||
not persist secret values into prompts, logs, or memory frames.
|
not persist secret values into prompts, logs, or memory frames.
|
||||||
|
|
||||||
### 6. MCP tool scope gate — `scope.ts`
|
### 6. MCP tool scope gate (removed)
|
||||||
`packages/memory-mcp/src/scope.ts` + `packages/hive-mind-mcp-server/src/scope.ts`. An
|
The memory MCP servers this gate protected are not part of the community edition
|
||||||
external agent (Claude Code/Codex) granted stdio access to the memory substrate can be
|
(ADR-0002), so no external agent gets stdio access to memory.
|
||||||
scoped **read-only** via `WAGGLE_MCP_SCOPES` / `HIVE_MIND_SCOPES`: a `memory:read` scope
|
|
||||||
registers only the read tools, so a read-only client literally cannot call
|
|
||||||
save/cleanup/ingest. Default (unset) stays full read+write for backward-compat;
|
|
||||||
`memory:write` implies `memory:read`. This keeps a poisoned or buggy external agent from
|
|
||||||
writing junk into the substrate.
|
|
||||||
|
|
||||||
### 7. Workspace filesystem boundary + secret deny — `file-store.ts`
|
### 7. Workspace filesystem boundary + secret deny — `file-store.ts`
|
||||||
`packages/core/src/file-store.ts`. Every FileStore op resolves the caller path and asserts
|
`packages/core/src/file-store.ts`. Every FileStore op resolves the caller path and asserts
|
||||||
@@ -106,10 +101,7 @@ sandbox:** the deny is a curated list (it cannot enumerate every secret a home d
|
|||||||
is deny-by-default with no per-workspace override yet.
|
is deny-by-default with no per-workspace override yet.
|
||||||
|
|
||||||
### 8. SSRF egress guard — `url-egress-guard.ts`
|
### 8. SSRF egress guard — `url-egress-guard.ts`
|
||||||
`packages/agent/src/url-egress-guard.ts` (guarding `web_fetch` in `system-tools.ts`) and
|
`packages/agent/src/url-egress-guard.ts` (guarding `web_fetch` in `system-tools.ts`). A URL named by untrusted
|
||||||
the structurally-identical `packages/hive-mind-core/src/harvest/url-egress-guard.ts`
|
|
||||||
(guarding `UrlAdapter.fetchAndParse`, reached by the MCP `ingest_source` url path in
|
|
||||||
`packages/{memory-mcp,hive-mind-mcp-server}/src/tools/ingest.ts`). A URL named by untrusted
|
|
||||||
content or a user is resolved to concrete IP(s); the fetch is **refused if any resolved
|
content or a user is resolved to concrete IP(s); the fetch is **refused if any resolved
|
||||||
address is loopback / private (RFC1918 + CGNAT) / link-local / unique-local / multicast /
|
address is loopback / private (RFC1918 + CGNAT) / link-local / unique-local / multicast /
|
||||||
reserved / unspecified**. This closes the **cloud instance-metadata** exfiltration path —
|
reserved / unspecified**. This closes the **cloud instance-metadata** exfiltration path —
|
||||||
@@ -170,6 +162,4 @@ Coverage:
|
|||||||
full closure needs IP-pinning (connect to the validated address) which `fetch`+HTTPS can't
|
full closure needs IP-pinning (connect to the validated address) which `fetch`+HTTPS can't
|
||||||
do portably without breaking TLS SNI/cert validation. Also out of scope: the guard bounds
|
do portably without breaking TLS SNI/cert validation. Also out of scope: the guard bounds
|
||||||
the *target* address, not response size/content, and does not defend a genuinely
|
the *target* address, not response size/content, and does not defend a genuinely
|
||||||
public-but-malicious endpoint. The duplicated agent/hive-mind-core guard copies share one
|
public-but-malicious endpoint.
|
||||||
spec and must be kept in sync (they cannot share a module — hive-mind-core is OSS-mirrored
|
|
||||||
and must not import `@waggle/agent`).
|
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
// CC Sesija A §2.1 Task A4 — shared HTTP helpers for sidecar-proxy commands.
|
// Shared HTTP helpers for sidecar-proxy commands. Command modules import
|
||||||
//
|
// from here rather than reimplementing.
|
||||||
// Extracted from commands/memory.rs at A4 because wiki.rs becomes the second
|
|
||||||
// consumer (rule of two). Future command modules (onboarding A10+, agent.rs
|
|
||||||
// where applicable) should also import from here rather than reimplementing.
|
|
||||||
|
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
// CC Sesija A §2.1 Tasks A1 + A4 — memory + KG + identity Tauri commands.
|
// Memory, knowledge graph and identity Tauri commands.
|
||||||
//
|
//
|
||||||
// Architecture: thin HTTP proxies to local sidecar (Fastify, port from ServiceState).
|
// Architecture: thin HTTP proxies to local sidecar (Fastify, port from ServiceState).
|
||||||
// Tauri Rust shell intentionally has no direct sqlite/sqlite-vec dependencies — all
|
// Tauri Rust shell intentionally has no direct SQLite dependencies — all memory
|
||||||
// substrate access goes through the sidecar so that the storage layer (FrameStore,
|
// access goes through the sidecar so that the storage layer lives in one process.
|
||||||
// HybridSearch, KnowledgeGraph, wiki-compiler) lives in one process.
|
|
||||||
//
|
//
|
||||||
// Command surface (4 commands here; wiki commands moved to commands/wiki.rs at A4):
|
// Command surface:
|
||||||
// recall_memory → GET /api/memory/search
|
// recall_memory → GET /api/memory/search
|
||||||
// save_memory → POST /api/memory/frames
|
// save_memory → POST /api/memory/frames
|
||||||
// search_entities → GET /api/memory/graph
|
// search_entities → GET /api/memory/graph
|
||||||
// get_identity → GET /api/identity (route not yet in sidecar — graceful 404
|
// get_identity → GET /api/identity (route not yet in sidecar — graceful 404
|
||||||
// → placeholder; A1.1 follow-up adds route)
|
// → placeholder; A1.1 follow-up adds route)
|
||||||
//
|
//
|
||||||
// Shared HTTP helpers extracted to commands/http.rs at A4 (rule of two — wiki.rs is
|
// Shared HTTP helpers live in commands/http.rs.
|
||||||
// the second consumer).
|
|
||||||
|
|
||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
use tauri::State;
|
use tauri::State;
|
||||||
|
|||||||
@@ -5,4 +5,3 @@ pub mod agent;
|
|||||||
pub mod http;
|
pub mod http;
|
||||||
pub mod memory;
|
pub mod memory;
|
||||||
pub mod onboarding;
|
pub mod onboarding;
|
||||||
pub mod wiki;
|
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
// CC Sesija A §2.1 Task A4 — wiki Tauri commands.
|
|
||||||
//
|
|
||||||
// Brief: briefs/2026-04-30-cc-sesija-A-waggle-apps-web-integration.md §2.1 Task A4
|
|
||||||
//
|
|
||||||
// Read-side wiki commands proxying to the sidecar's /api/wiki/* routes which read
|
|
||||||
// from the per-workspace MindDB (FrameStore + KnowledgeGraph). The compile route
|
|
||||||
// triggers a fresh wiki-compiler pass for the active workspace.
|
|
||||||
//
|
|
||||||
// Brief §2.1 Task A4 says "reads packages/wiki-compiler output direktno iz hive-mind
|
|
||||||
// frame store" — direktno here means "without intermediate cache" not "direct
|
|
||||||
// sqlite from Rust" (Tauri shell intentionally has no sqlite deps; substrate stays
|
|
||||||
// in the sidecar process — see commands/memory.rs header for full rationale).
|
|
||||||
//
|
|
||||||
// Note: compile_wiki_section was previously colocated in commands/memory.rs (A1).
|
|
||||||
// A4 moves it here for cohesion. Tauri command surface is unchanged; lib.rs
|
|
||||||
// invoke_handler entry just rewires from `memory::compile_wiki_section` to
|
|
||||||
// `wiki::compile_wiki_section`.
|
|
||||||
|
|
||||||
use serde_json::{json, Value};
|
|
||||||
use tauri::State;
|
|
||||||
|
|
||||||
use crate::commands::http::{http_get, http_post, parse_json, sidecar_url};
|
|
||||||
use crate::service::ServiceState;
|
|
||||||
|
|
||||||
/// List all compiled wiki pages for the active workspace. Returns the page
|
|
||||||
/// index (slugs + titles + metadata); call get_wiki_page_content for the body.
|
|
||||||
#[tauri::command]
|
|
||||||
pub async fn get_wiki_pages(state: State<'_, ServiceState>) -> Result<Value, String> {
|
|
||||||
let url = sidecar_url(state.verified_port()?, "/api/wiki/pages");
|
|
||||||
let resp = http_get(&url).await?;
|
|
||||||
parse_json(resp).await
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Fetch a single wiki page's metadata (title, type, source frame ids, etc.)
|
|
||||||
/// without the full markdown body. Use get_wiki_page_content for the body.
|
|
||||||
#[tauri::command]
|
|
||||||
pub async fn get_wiki_page(state: State<'_, ServiceState>, slug: String) -> Result<Value, String> {
|
|
||||||
let url = sidecar_url(
|
|
||||||
state.verified_port()?,
|
|
||||||
&format!("/api/wiki/pages/{}", urlencoding::encode(&slug)),
|
|
||||||
);
|
|
||||||
let resp = http_get(&url).await?;
|
|
||||||
parse_json(resp).await
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Fetch the full markdown content for a wiki page by slug. Returns whatever
|
|
||||||
/// the sidecar emits (typically `{ slug, content, ... }`).
|
|
||||||
#[tauri::command]
|
|
||||||
pub async fn get_wiki_page_content(
|
|
||||||
state: State<'_, ServiceState>,
|
|
||||||
slug: String,
|
|
||||||
) -> Result<Value, String> {
|
|
||||||
let url = sidecar_url(
|
|
||||||
state.verified_port()?,
|
|
||||||
&format!("/api/wiki/pages/{}/content", urlencoding::encode(&slug)),
|
|
||||||
);
|
|
||||||
let resp = http_get(&url).await?;
|
|
||||||
parse_json(resp).await
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Trigger wiki compilation for the active or specified workspace. Returns the
|
|
||||||
/// compilation summary (page count, entities, gaps) from packages/wiki-compiler.
|
|
||||||
#[tauri::command]
|
|
||||||
pub async fn compile_wiki_section(
|
|
||||||
state: State<'_, ServiceState>,
|
|
||||||
workspace_id: Option<String>,
|
|
||||||
) -> Result<Value, String> {
|
|
||||||
let mut body = json!({});
|
|
||||||
if let Some(ws) = workspace_id {
|
|
||||||
body["workspace"] = json!(ws);
|
|
||||||
}
|
|
||||||
let url = sidecar_url(state.verified_port()?, "/api/wiki/compile");
|
|
||||||
let resp = http_post(&url, &body).await?;
|
|
||||||
parse_json(resp).await
|
|
||||||
}
|
|
||||||
@@ -49,10 +49,6 @@ pub fn run() {
|
|||||||
commands::memory::save_memory,
|
commands::memory::save_memory,
|
||||||
commands::memory::search_entities,
|
commands::memory::search_entities,
|
||||||
commands::memory::get_identity,
|
commands::memory::get_identity,
|
||||||
commands::wiki::get_wiki_pages,
|
|
||||||
commands::wiki::get_wiki_page,
|
|
||||||
commands::wiki::get_wiki_page_content,
|
|
||||||
commands::wiki::compile_wiki_section,
|
|
||||||
commands::agent::run_agent_query,
|
commands::agent::run_agent_query,
|
||||||
commands::onboarding::is_first_launch,
|
commands::onboarding::is_first_launch,
|
||||||
commands::onboarding::mark_first_launch_complete,
|
commands::onboarding::mark_first_launch_complete,
|
||||||
|
|||||||
@@ -1039,7 +1039,7 @@ mod tests {
|
|||||||
std::fs::create_dir_all(&resources).expect("creates temp resources");
|
std::fs::create_dir_all(&resources).expect("creates temp resources");
|
||||||
std::fs::write(resources.join("service.js"), "console.log('ok')").expect("writes service");
|
std::fs::write(resources.join("service.js"), "console.log('ok')").expect("writes service");
|
||||||
|
|
||||||
let script = resolve_service_script(Some(&root), Path::new("D:/Projects/waggle-os"))
|
let script = resolve_service_script(Some(&root), Path::new("D:/work/waggle-os"))
|
||||||
.expect("bundled script resolves");
|
.expect("bundled script resolves");
|
||||||
|
|
||||||
assert_eq!(script.kind, ServiceScriptKind::Bundled);
|
assert_eq!(script.kind, ServiceScriptKind::Bundled);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
# environment; Vite reads it at build time, so it cannot be added afterwards.
|
# environment; Vite reads it at build time, so it cannot be added afterwards.
|
||||||
# VITE_POSTHOG_KEY=
|
# VITE_POSTHOG_KEY=
|
||||||
|
|
||||||
# PR7b Auth — Clerk publishable key (shared instance with apps/www). Public-safe by
|
# PR7b Auth — Clerk publishable key. Public-safe by
|
||||||
# design (ships in the client bundle); the SECRET key is server-side only and is NOT
|
# design (ships in the client bundle); the SECRET key is server-side only and is NOT
|
||||||
# used by the desktop SPA (the local sidecar authorizes with its device token, not a
|
# used by the desktop SPA (the local sidecar authorizes with its device token, not a
|
||||||
# Clerk JWT). Absent → /auth degrades to the accountless local-first state (honest).
|
# Clerk JWT). Absent → /auth degrades to the accountless local-first state (honest).
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ AI-generated bee mascots — **one unique avatar per Waggle persona (22/22)**,
|
|||||||
wired in `apps/web/src/lib/personas.ts` (AVATAR_MAP, 1:1 by persona id).
|
wired in `apps/web/src/lib/personas.ts` (AVATAR_MAP, 1:1 by persona id).
|
||||||
|
|
||||||
**Wave Q (2026-07-06): the whole set was redrawn in the canonical
|
**Wave Q (2026-07-06): the whole set was redrawn in the canonical
|
||||||
flat-geometric hex-bee language** — the same style as the landing personas grid
|
flat-geometric hex-bee language** — the same style as the landing personas grid.
|
||||||
(`apps/www/public/brand/bee-*-dark.png`). The R9 5-judge panel flagged the
|
The R9 5-judge panel flagged the
|
||||||
previous glossy cel-shaded sticker set as a second illustration dialect
|
previous glossy cel-shaded sticker set as a second illustration dialect
|
||||||
("two mascot languages"); one dialect now covers landing + app.
|
("two mascot languages"); one dialect now covers landing + app.
|
||||||
|
|
||||||
|
|||||||
@@ -61,9 +61,6 @@ describe('BenchmarkApp', () => {
|
|||||||
expect(screen.getByText('+4.54')).toBeInTheDocument();
|
expect(screen.getByText('+4.54')).toBeInTheDocument();
|
||||||
expect(screen.getByText('92.27%')).toBeInTheDocument();
|
expect(screen.getByText('92.27%')).toBeInTheDocument();
|
||||||
expect(screen.getByText('100%')).toBeInTheDocument();
|
expect(screen.getByText('100%')).toBeInTheDocument();
|
||||||
|
|
||||||
// Method/caveat line.
|
|
||||||
expect(screen.getByText(/github\.com\/marolinik\/hive-mind/i)).toBeInTheDocument();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('toggles back to Capabilities', () => {
|
it('toggles back to Capabilities', () => {
|
||||||
|
|||||||
@@ -401,8 +401,6 @@ function MemorySotaView() {
|
|||||||
SOTA's exact published protocol, reproduced in-harness to 0.03 points before comparison. The intelligence lives in
|
SOTA's exact published protocol, reproduced in-harness to 0.03 points before comparison. The intelligence lives in
|
||||||
the <b className="text-foreground/90 font-medium">memory layer, not the model</b>, so it travels onto a small local
|
the <b className="text-foreground/90 font-medium">memory layer, not the model</b>, so it travels onto a small local
|
||||||
model too. Honest caveat: higher token use per question than the leanest systems; efficiency work underway.
|
model too. Honest caveat: higher token use per question than the leanest systems; efficiency work underway.
|
||||||
Reproducible offline:{' '}
|
|
||||||
<span className="font-mono" style={{ color: 'var(--text-2)' }}>github.com/marolinik/hive-mind</span>.
|
|
||||||
</Disclaimer>
|
</Disclaimer>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ function GreetingHeader({
|
|||||||
lastActive?: string;
|
lastActive?: string;
|
||||||
}) {
|
}) {
|
||||||
// Round-7 fix 1: the server-composed greeting may already carry an
|
// Round-7 fix 1: the server-composed greeting may already carry an
|
||||||
// away/last-active statement ("You've been away 1 day, Marko") built from
|
// away/last-active statement ("You've been away 1 day, Alex") built from
|
||||||
// ITS OWN recency field. Repeating a client-computed "last active 2d ago"
|
// ITS OWN recency field. Repeating a client-computed "last active 2d ago"
|
||||||
// clause right below it showed two disagreeing truths in one viewport.
|
// clause right below it showed two disagreeing truths in one viewport.
|
||||||
// ONE truth: when the greeting already says it, the factual line drops its
|
// ONE truth: when the greeting already says it, the factual line drops its
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Warm-Hive PR6b (B1) — LauncherApp A/B segmented toggle.
|
* LauncherApp — detect, launch, watch and stop external AI tools.
|
||||||
*
|
*
|
||||||
* Variation A · Launch = the existing live detect/launch UI (preserved).
|
* Waggle Room tasks are hidden in v1 by the memory feature map (ADR-0002).
|
||||||
* Variation B · How memory is shared = a pure-UI explainer (flow diagram +
|
* Most suites switch them on to keep the hidden code covered; the "v1 memory
|
||||||
* three cards + an explicitly-labelled provenance example, no live data).
|
* features" suite checks the default.
|
||||||
*
|
|
||||||
* These tests assert the toggle wiring and that Variation B carries the
|
|
||||||
* static explainer content WITHOUT fabricating a live recall.
|
|
||||||
*
|
|
||||||
* Agent hooks, the explainer and Waggle Room tasks are hidden in v1 by the
|
|
||||||
* memory feature map (ADR-0002). Most suites switch them on to keep the hidden
|
|
||||||
* code covered; the "v1 memory features" suite checks the default.
|
|
||||||
*/
|
*/
|
||||||
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
||||||
import { render, screen, waitFor, cleanup, fireEvent, within } from '@testing-library/react';
|
import { render, screen, waitFor, cleanup, fireEvent, within } from '@testing-library/react';
|
||||||
@@ -20,7 +13,6 @@ const mocks = vi.hoisted(() => ({
|
|||||||
detectTools: vi.fn(),
|
detectTools: vi.fn(),
|
||||||
getToolProcesses: vi.fn(),
|
getToolProcesses: vi.fn(),
|
||||||
launchTool: vi.fn(),
|
launchTool: vi.fn(),
|
||||||
manageHooks: vi.fn(),
|
|
||||||
killTool: vi.fn(),
|
killTool: vi.fn(),
|
||||||
runExternalToolTask: vi.fn(),
|
runExternalToolTask: vi.fn(),
|
||||||
streamToolOutput: vi.fn(() => () => {}),
|
streamToolOutput: vi.fn(() => () => {}),
|
||||||
@@ -43,8 +35,6 @@ const detectionResp = {
|
|||||||
installed: true,
|
installed: true,
|
||||||
installedPath: '/opt/homebrew/bin/claude',
|
installedPath: '/opt/homebrew/bin/claude',
|
||||||
version: '2.4.0',
|
version: '2.4.0',
|
||||||
hooksInstalled: true,
|
|
||||||
hookPointerPath: '/home/.claude/hooks',
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@@ -55,7 +45,6 @@ beforeEach(() => {
|
|||||||
mocks.adapter.detectTools.mockResolvedValue(detectionResp);
|
mocks.adapter.detectTools.mockResolvedValue(detectionResp);
|
||||||
mocks.adapter.getToolProcesses.mockResolvedValue({ processes: [] });
|
mocks.adapter.getToolProcesses.mockResolvedValue({ processes: [] });
|
||||||
mocks.adapter.launchTool.mockResolvedValue({ ok: true, pid: 123 });
|
mocks.adapter.launchTool.mockResolvedValue({ ok: true, pid: 123 });
|
||||||
mocks.adapter.manageHooks.mockResolvedValue({ ok: true });
|
|
||||||
mocks.adapter.killTool.mockResolvedValue({ ok: true, pid: 123, reason: 'SIGTERM' });
|
mocks.adapter.killTool.mockResolvedValue({ ok: true, pid: 123, reason: 'SIGTERM' });
|
||||||
mocks.adapter.runExternalToolTask.mockResolvedValue({
|
mocks.adapter.runExternalToolTask.mockResolvedValue({
|
||||||
roomId: 'room-1',
|
roomId: 'room-1',
|
||||||
@@ -67,7 +56,7 @@ afterEach(() => {
|
|||||||
vi.clearAllMocks();
|
vi.clearAllMocks();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('LauncherApp · A/B toggle', () => {
|
describe('LauncherApp · detection', () => {
|
||||||
it('repaints detected tools on return and refreshes silently', async () => {
|
it('repaints detected tools on return and refreshes silently', async () => {
|
||||||
const first = render(<LauncherApp />);
|
const first = render(<LauncherApp />);
|
||||||
expect(await screen.findByText('Claude Code')).toBeInTheDocument();
|
expect(await screen.findByText('Claude Code')).toBeInTheDocument();
|
||||||
@@ -79,54 +68,11 @@ describe('LauncherApp · A/B toggle', () => {
|
|||||||
await waitFor(() => expect(mocks.adapter.detectTools.mock.calls.length).toBeGreaterThan(baseline));
|
await waitFor(() => expect(mocks.adapter.detectTools.mock.calls.length).toBeGreaterThan(baseline));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('defaults to Variation A and renders the live launch UI', async () => {
|
it('renders the live launch UI', async () => {
|
||||||
render(<LauncherApp />);
|
render(<LauncherApp />);
|
||||||
// The detected tool from the live adapter appears (Variation A).
|
|
||||||
expect(await screen.findByText('Claude Code')).toBeInTheDocument();
|
expect(await screen.findByText('Claude Code')).toBeInTheDocument();
|
||||||
expect(screen.getByText(/optional prompt/i)).toBeInTheDocument();
|
expect(screen.getByText(/optional prompt/i)).toBeInTheDocument();
|
||||||
// Toggle exists with both tabs, A selected.
|
expect(screen.getByRole('button', { name: /^launch$/i })).toBeInTheDocument();
|
||||||
const launchTab = screen.getByRole('tab', { name: /^launch$/i });
|
|
||||||
const memTab = screen.getByRole('tab', { name: /how memory is shared/i });
|
|
||||||
expect(launchTab).toHaveAttribute('aria-selected', 'true');
|
|
||||||
expect(memTab).toHaveAttribute('aria-selected', 'false');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('switches to Variation B and renders the explainer (flow + cards), hiding the live UI', async () => {
|
|
||||||
render(<LauncherApp />);
|
|
||||||
await screen.findByText('Claude Code');
|
|
||||||
fireEvent.click(screen.getByRole('tab', { name: /how memory is shared/i }));
|
|
||||||
|
|
||||||
expect(screen.getByRole('tab', { name: /how memory is shared/i })).toHaveAttribute('aria-selected', 'true');
|
|
||||||
// Explainer heading + flow nodes.
|
|
||||||
expect(screen.getByText(/how a launched agent shares the hive/i)).toBeInTheDocument();
|
|
||||||
expect(screen.getByText('The hive')).toBeInTheDocument();
|
|
||||||
expect(screen.getByText('hive-mind')).toBeInTheDocument();
|
|
||||||
// Three explainer cards.
|
|
||||||
expect(screen.getByText(/it recalls on start/i)).toBeInTheDocument();
|
|
||||||
expect(screen.getByText(/it commits as it works/i)).toBeInTheDocument();
|
|
||||||
expect(screen.getByText(/reversible & local/i)).toBeInTheDocument();
|
|
||||||
// The live launch UI (prompt box) is no longer mounted.
|
|
||||||
expect(screen.queryByText(/optional prompt/i)).not.toBeInTheDocument();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('labels the provenance example as an example (no fabricated live recall)', async () => {
|
|
||||||
render(<LauncherApp />);
|
|
||||||
await screen.findByText('Claude Code');
|
|
||||||
fireEvent.click(screen.getByRole('tab', { name: /how memory is shared/i }));
|
|
||||||
const prov = screen.getByText(/remembered from Claude Code/i);
|
|
||||||
expect(prov).toHaveTextContent(/^example ·/i);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('toggles back to Variation A and restores the live UI', async () => {
|
|
||||||
render(<LauncherApp />);
|
|
||||||
await screen.findByText('Claude Code');
|
|
||||||
fireEvent.click(screen.getByRole('tab', { name: /how memory is shared/i }));
|
|
||||||
expect(screen.queryByText(/optional prompt/i)).not.toBeInTheDocument();
|
|
||||||
|
|
||||||
fireEvent.click(screen.getByRole('tab', { name: /^launch$/i }));
|
|
||||||
expect(screen.getByRole('tab', { name: /^launch$/i })).toHaveAttribute('aria-selected', 'true');
|
|
||||||
await waitFor(() => expect(screen.getByText(/optional prompt/i)).toBeInTheDocument());
|
|
||||||
expect(screen.getByText('Claude Code')).toBeInTheDocument();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -158,8 +104,6 @@ describe('LauncherApp · captured tasks', () => {
|
|||||||
installed: true,
|
installed: true,
|
||||||
installedPath: '/usr/local/bin/codex',
|
installedPath: '/usr/local/bin/codex',
|
||||||
version: '0.144.1',
|
version: '0.144.1',
|
||||||
hooksInstalled: true,
|
|
||||||
hookPointerPath: '/home/.codex/hooks',
|
|
||||||
capabilities: {
|
capabilities: {
|
||||||
interactiveLaunch: true,
|
interactiveLaunch: true,
|
||||||
headlessTask: true,
|
headlessTask: true,
|
||||||
@@ -175,8 +119,6 @@ describe('LauncherApp · captured tasks', () => {
|
|||||||
installed: true,
|
installed: true,
|
||||||
installedPath: '/usr/local/bin/hermes',
|
installedPath: '/usr/local/bin/hermes',
|
||||||
version: '1.0.0',
|
version: '1.0.0',
|
||||||
hooksInstalled: true,
|
|
||||||
hookPointerPath: '/home/.hermes/hooks',
|
|
||||||
capabilities: {
|
capabilities: {
|
||||||
interactiveLaunch: true,
|
interactiveLaunch: true,
|
||||||
headlessTask: true,
|
headlessTask: true,
|
||||||
@@ -192,8 +134,6 @@ describe('LauncherApp · captured tasks', () => {
|
|||||||
installed: true,
|
installed: true,
|
||||||
installedPath: '/Applications/Cursor.app',
|
installedPath: '/Applications/Cursor.app',
|
||||||
version: '1.0.0',
|
version: '1.0.0',
|
||||||
hooksInstalled: true,
|
|
||||||
hookPointerPath: '/home/.cursor/hooks',
|
|
||||||
capabilities: {
|
capabilities: {
|
||||||
interactiveLaunch: true,
|
interactiveLaunch: true,
|
||||||
headlessTask: false,
|
headlessTask: false,
|
||||||
@@ -209,8 +149,6 @@ describe('LauncherApp · captured tasks', () => {
|
|||||||
installed: false,
|
installed: false,
|
||||||
installedPath: null,
|
installedPath: null,
|
||||||
version: null,
|
version: null,
|
||||||
hooksInstalled: false,
|
|
||||||
hookPointerPath: null,
|
|
||||||
capabilities: {
|
capabilities: {
|
||||||
interactiveLaunch: true,
|
interactiveLaunch: true,
|
||||||
headlessTask: true,
|
headlessTask: true,
|
||||||
@@ -274,7 +212,7 @@ describe('LauncherApp · captured tasks', () => {
|
|||||||
expect(onOpenRoom).toHaveBeenCalledWith('room-multi');
|
expect(onOpenRoom).toHaveBeenCalledWith('room-multi');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('labels a roadmap tool and offers no launch, task, or hook actions', async () => {
|
it('labels a roadmap tool and offers no launch or task actions', async () => {
|
||||||
mocks.adapter.detectTools.mockResolvedValue({
|
mocks.adapter.detectTools.mockResolvedValue({
|
||||||
platform: 'darwin',
|
platform: 'darwin',
|
||||||
detectedAt: '2026-07-11T00:00:00.000Z',
|
detectedAt: '2026-07-11T00:00:00.000Z',
|
||||||
@@ -283,12 +221,9 @@ describe('LauncherApp · captured tasks', () => {
|
|||||||
displayName: 'Cursor',
|
displayName: 'Cursor',
|
||||||
releaseStatus: 'roadmap',
|
releaseStatus: 'roadmap',
|
||||||
launchable: false,
|
launchable: false,
|
||||||
hookCapable: false,
|
|
||||||
installed: true,
|
installed: true,
|
||||||
installedPath: '/Applications/Cursor.app',
|
installedPath: '/Applications/Cursor.app',
|
||||||
version: '1.0.0',
|
version: '1.0.0',
|
||||||
hooksInstalled: true,
|
|
||||||
hookPointerPath: '/home/.cursor/hooks',
|
|
||||||
capabilities: {
|
capabilities: {
|
||||||
interactiveLaunch: true,
|
interactiveLaunch: true,
|
||||||
headlessTask: false,
|
headlessTask: false,
|
||||||
@@ -306,10 +241,8 @@ describe('LauncherApp · captured tasks', () => {
|
|||||||
expect(within(card).getByText('Roadmap')).toBeInTheDocument();
|
expect(within(card).getByText('Roadmap')).toBeInTheDocument();
|
||||||
expect(within(card).getByText(/detection retained for compatibility/i)).toBeInTheDocument();
|
expect(within(card).getByText(/detection retained for compatibility/i)).toBeInTheDocument();
|
||||||
expect(within(card).queryByText('Detect only')).not.toBeInTheDocument();
|
expect(within(card).queryByText('Detect only')).not.toBeInTheDocument();
|
||||||
expect(within(card).queryByText('Hooks active')).not.toBeInTheDocument();
|
|
||||||
expect(within(card).queryByRole('button', { name: /^launch$/i })).not.toBeInTheDocument();
|
expect(within(card).queryByRole('button', { name: /^launch$/i })).not.toBeInTheDocument();
|
||||||
expect(within(card).queryByRole('button', { name: /run task/i })).not.toBeInTheDocument();
|
expect(within(card).queryByRole('button', { name: /run task/i })).not.toBeInTheDocument();
|
||||||
expect(within(card).queryByRole('button', { name: /install hooks/i })).not.toBeInTheDocument();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('launches Hermes Desktop but excludes it and a broken CLI from captured teams', async () => {
|
it('launches Hermes Desktop but excludes it and a broken CLI from captured teams', async () => {
|
||||||
@@ -323,8 +256,6 @@ describe('LauncherApp · captured tasks', () => {
|
|||||||
installed: true,
|
installed: true,
|
||||||
installedPath: 'C:\\tools\\codex.exe',
|
installedPath: 'C:\\tools\\codex.exe',
|
||||||
version: '0.144.1',
|
version: '0.144.1',
|
||||||
hooksInstalled: true,
|
|
||||||
hookPointerPath: 'C:\\Users\\test\\.codex\\hooks.json',
|
|
||||||
launchable: true,
|
launchable: true,
|
||||||
capabilities: {
|
capabilities: {
|
||||||
interactiveLaunch: true,
|
interactiveLaunch: true,
|
||||||
@@ -341,8 +272,6 @@ describe('LauncherApp · captured tasks', () => {
|
|||||||
installed: true,
|
installed: true,
|
||||||
installedPath: 'C:\\Users\\test\\AppData\\Local\\hermes\\bin\\hermes.cmd',
|
installedPath: 'C:\\Users\\test\\AppData\\Local\\hermes\\bin\\hermes.cmd',
|
||||||
version: null,
|
version: null,
|
||||||
hooksInstalled: false,
|
|
||||||
hookPointerPath: null,
|
|
||||||
launchable: false,
|
launchable: false,
|
||||||
diagnostic: 'Hermes failed its --version health check.',
|
diagnostic: 'Hermes failed its --version health check.',
|
||||||
capabilities: {
|
capabilities: {
|
||||||
@@ -360,10 +289,7 @@ describe('LauncherApp · captured tasks', () => {
|
|||||||
installed: true,
|
installed: true,
|
||||||
installedPath: 'C:\\Users\\test\\AppData\\Local\\hermes\\Hermes.exe',
|
installedPath: 'C:\\Users\\test\\AppData\\Local\\hermes\\Hermes.exe',
|
||||||
version: null,
|
version: null,
|
||||||
hooksInstalled: false,
|
|
||||||
hookPointerPath: null,
|
|
||||||
launchable: true,
|
launchable: true,
|
||||||
hookCapable: false,
|
|
||||||
capabilities: {
|
capabilities: {
|
||||||
interactiveLaunch: true,
|
interactiveLaunch: true,
|
||||||
headlessTask: false,
|
headlessTask: false,
|
||||||
@@ -381,8 +307,6 @@ describe('LauncherApp · captured tasks', () => {
|
|||||||
const desktopCard = await screen.findByTestId('launcher-tool-hermes-desktop');
|
const desktopCard = await screen.findByTestId('launcher-tool-hermes-desktop');
|
||||||
expect(within(desktopCard).getByRole('button', { name: /^launch$/i })).toBeInTheDocument();
|
expect(within(desktopCard).getByRole('button', { name: /^launch$/i })).toBeInTheDocument();
|
||||||
expect(within(desktopCard).queryByRole('button', { name: /run task/i })).not.toBeInTheDocument();
|
expect(within(desktopCard).queryByRole('button', { name: /run task/i })).not.toBeInTheDocument();
|
||||||
expect(within(desktopCard).queryByRole('button', { name: /install hooks/i })).not.toBeInTheDocument();
|
|
||||||
expect(within(desktopCard).getByText(/launch only/i)).toBeInTheDocument();
|
|
||||||
|
|
||||||
const cliCard = screen.getByTestId('launcher-tool-hermes');
|
const cliCard = screen.getByTestId('launcher-tool-hermes');
|
||||||
expect(within(cliCard).queryByRole('button', { name: /^launch$/i })).not.toBeInTheDocument();
|
expect(within(cliCard).queryByRole('button', { name: /^launch$/i })).not.toBeInTheDocument();
|
||||||
@@ -395,31 +319,7 @@ describe('LauncherApp · captured tasks', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('LauncherApp · hook cohort (#3)', () => {
|
describe('LauncherApp · launch', () => {
|
||||||
it('offers hook actions for every real-hook tool (e.g. codex), not just claude-code', async () => {
|
|
||||||
// The 7 real-hook tools (claude-code, claude-desktop, codex,
|
|
||||||
// codex-desktop, cursor, hermes, openclaw) all ship a bin — the dock
|
|
||||||
// must expose hook install for each, mirroring the backend HOOKS_COHORT.
|
|
||||||
mocks.adapter.detectTools.mockResolvedValue({
|
|
||||||
platform: 'darwin',
|
|
||||||
detectedAt: '2026-06-29T00:00:00.000Z',
|
|
||||||
tools: [
|
|
||||||
{
|
|
||||||
id: 'codex',
|
|
||||||
displayName: 'Codex',
|
|
||||||
installed: true,
|
|
||||||
installedPath: '/usr/local/bin/codex',
|
|
||||||
version: '1.0.0',
|
|
||||||
hooksInstalled: false,
|
|
||||||
hookPointerPath: null,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
render(<LauncherApp />);
|
|
||||||
expect(await screen.findByText('Codex')).toBeInTheDocument();
|
|
||||||
expect(screen.getByRole('button', { name: /install hooks/i })).toBeInTheDocument();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('offers launch for a detected third-party adapter and sends its raw prompt', async () => {
|
it('offers launch for a detected third-party adapter and sends its raw prompt', async () => {
|
||||||
mocks.adapter.detectTools.mockResolvedValue({
|
mocks.adapter.detectTools.mockResolvedValue({
|
||||||
platform: 'linux',
|
platform: 'linux',
|
||||||
@@ -431,10 +331,7 @@ describe('LauncherApp · hook cohort (#3)', () => {
|
|||||||
installed: true,
|
installed: true,
|
||||||
installedPath: '/usr/local/bin/foo',
|
installedPath: '/usr/local/bin/foo',
|
||||||
version: '1.0.0',
|
version: '1.0.0',
|
||||||
hooksInstalled: false,
|
|
||||||
hookPointerPath: null,
|
|
||||||
launchable: true,
|
launchable: true,
|
||||||
hookCapable: false,
|
|
||||||
builtin: false,
|
builtin: false,
|
||||||
acceptsInlinePrompt: true,
|
acceptsInlinePrompt: true,
|
||||||
},
|
},
|
||||||
@@ -460,7 +357,6 @@ describe('LauncherApp · hook cohort (#3)', () => {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
expect(screen.queryByRole('button', { name: /install hooks/i })).not.toBeInTheDocument();
|
|
||||||
expect(screen.queryByText(/launch and hook management arrive in Phase 4/i)).not.toBeInTheDocument();
|
expect(screen.queryByText(/launch and hook management arrive in Phase 4/i)).not.toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -476,10 +372,7 @@ describe('LauncherApp · hook cohort (#3)', () => {
|
|||||||
installedPath:
|
installedPath:
|
||||||
'C:\\Program Files\\WindowsApps\\OpenAI.Codex_26.623.19656.0_x64__2p2nqsd0c76g0\\app\\resources\\codex.exe',
|
'C:\\Program Files\\WindowsApps\\OpenAI.Codex_26.623.19656.0_x64__2p2nqsd0c76g0\\app\\resources\\codex.exe',
|
||||||
version: null,
|
version: null,
|
||||||
hooksInstalled: false,
|
|
||||||
hookPointerPath: null,
|
|
||||||
launchable: false,
|
launchable: false,
|
||||||
hookCapable: true,
|
|
||||||
diagnostic:
|
diagnostic:
|
||||||
'Codex was found in WindowsApps, but Windows blocks command-line launch from that app alias. Install a PATH CLI build of Codex or launch Codex from Start, then refresh.',
|
'Codex was found in WindowsApps, but Windows blocks command-line launch from that app alias. Install a PATH CLI build of Codex or launch Codex from Start, then refresh.',
|
||||||
},
|
},
|
||||||
@@ -495,163 +388,7 @@ describe('LauncherApp · hook cohort (#3)', () => {
|
|||||||
expect(screen.queryByText(/adapter is not configured for launch/i)).not.toBeInTheDocument();
|
expect(screen.queryByText(/adapter is not configured for launch/i)).not.toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('shows actionable hook install stdout details such as the backup path', async () => {
|
it('offers Claude Desktop launch from the shared manifest', async () => {
|
||||||
mocks.adapter.detectTools.mockResolvedValue({
|
|
||||||
...detectionResp,
|
|
||||||
tools: [
|
|
||||||
{
|
|
||||||
...detectionResp.tools[0],
|
|
||||||
hooksInstalled: false,
|
|
||||||
hookPointerPath: null,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
mocks.adapter.manageHooks.mockResolvedValueOnce({
|
|
||||||
ok: true,
|
|
||||||
action: 'install',
|
|
||||||
stdout: 'settings backed up: /home/.claude/settings.json.hive-mind-backup.2026-07-08T19-00-00Z\ninstall complete',
|
|
||||||
stderr: '',
|
|
||||||
code: 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
render(<LauncherApp />);
|
|
||||||
fireEvent.click(await screen.findByRole('button', { name: /install hooks/i }));
|
|
||||||
|
|
||||||
expect(await screen.findByText(/Claude Code: install OK/i)).toBeInTheDocument();
|
|
||||||
expect(screen.getByText('Backup')).toBeInTheDocument();
|
|
||||||
expect(screen.getByText(/settings\.json\.hive-mind-backup/i)).toBeInTheDocument();
|
|
||||||
expect(screen.getByText('Recovery')).toBeInTheDocument();
|
|
||||||
expect(screen.queryByText(/^stdout:/i)).not.toBeInTheDocument();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('shows hook failure stderr even when the route returns a generic error', async () => {
|
|
||||||
mocks.adapter.manageHooks.mockResolvedValueOnce({
|
|
||||||
ok: false,
|
|
||||||
action: 'verify',
|
|
||||||
stdout: '',
|
|
||||||
stderr: 'missing hook pointer: /home/.claude/settings.json',
|
|
||||||
code: 1,
|
|
||||||
error: 'verify failed',
|
|
||||||
});
|
|
||||||
|
|
||||||
render(<LauncherApp />);
|
|
||||||
fireEvent.click(await screen.findByRole('button', { name: /^verify$/i }));
|
|
||||||
|
|
||||||
expect(await screen.findByText(/verify failed/i)).toBeInTheDocument();
|
|
||||||
expect(screen.getByText(/missing hook pointer/i)).toBeInTheDocument();
|
|
||||||
expect(screen.getByText(/settings\.json/i)).toBeInTheDocument();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('summarizes long hook output instead of flooding the result panel', async () => {
|
|
||||||
mocks.adapter.manageHooks.mockResolvedValueOnce({
|
|
||||||
ok: false,
|
|
||||||
action: 'verify',
|
|
||||||
stdout: '',
|
|
||||||
stderr: [
|
|
||||||
'failure detail 1: missing hook pointer',
|
|
||||||
'failure detail 2: stale backup file',
|
|
||||||
'failure detail 3: cli not trusted',
|
|
||||||
'failure detail 4: config mismatch',
|
|
||||||
'failure detail 5: lifecycle skipped',
|
|
||||||
'failure detail 6: retry recommended',
|
|
||||||
'failure detail 7: noisy internal trace',
|
|
||||||
'failure detail 8: noisy internal trace',
|
|
||||||
].join('\n'),
|
|
||||||
code: 1,
|
|
||||||
error: 'verify failed',
|
|
||||||
});
|
|
||||||
|
|
||||||
render(<LauncherApp />);
|
|
||||||
fireEvent.click(await screen.findByRole('button', { name: /^verify$/i }));
|
|
||||||
|
|
||||||
expect(await screen.findByText(/verify failed/i)).toBeInTheDocument();
|
|
||||||
expect(screen.getByText(/failure detail 1/i)).toBeInTheDocument();
|
|
||||||
expect(screen.getByText('More output')).toBeInTheDocument();
|
|
||||||
expect(screen.getByText(/2 additional hook output lines hidden/i)).toBeInTheDocument();
|
|
||||||
expect(screen.queryByText(/failure detail 8/i)).not.toBeInTheDocument();
|
|
||||||
expect(screen.getByText('Recovery')).toBeInTheDocument();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('shows recovery guidance when hook verify fails without stdout or stderr', async () => {
|
|
||||||
mocks.adapter.manageHooks.mockResolvedValueOnce({
|
|
||||||
ok: false,
|
|
||||||
action: 'verify',
|
|
||||||
stdout: '',
|
|
||||||
stderr: '',
|
|
||||||
code: 1,
|
|
||||||
});
|
|
||||||
|
|
||||||
render(<LauncherApp />);
|
|
||||||
fireEvent.click(await screen.findByRole('button', { name: /^verify$/i }));
|
|
||||||
|
|
||||||
expect(await screen.findByText(/verify failed \(exit 1\)/i)).toBeInTheDocument();
|
|
||||||
expect(screen.getByText(/no hook output was returned/i)).toBeInTheDocument();
|
|
||||||
expect(screen.getByText(/reinstall hooks/i)).toBeInTheDocument();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('summarizes hook verify check failures instead of showing raw check output', async () => {
|
|
||||||
mocks.adapter.manageHooks.mockResolvedValueOnce({
|
|
||||||
ok: false,
|
|
||||||
action: 'verify',
|
|
||||||
stdout: [
|
|
||||||
'hive-mind/codex-hooks: verify',
|
|
||||||
' [PASS] hooks.json exists — /home/.codex/hooks.json',
|
|
||||||
' [FAIL] hook command trusted — manual approval required in Codex settings',
|
|
||||||
'One or more checks failed.',
|
|
||||||
].join('\n'),
|
|
||||||
stderr: '',
|
|
||||||
code: 1,
|
|
||||||
});
|
|
||||||
|
|
||||||
render(<LauncherApp />);
|
|
||||||
fireEvent.click(await screen.findByRole('button', { name: /^verify$/i }));
|
|
||||||
|
|
||||||
expect(await screen.findByText(/verify failed \(exit 1\)/i)).toBeInTheDocument();
|
|
||||||
expect(screen.getByText('Check failed')).toBeInTheDocument();
|
|
||||||
expect(screen.getByText(/manual approval required in Codex settings/i)).toBeInTheDocument();
|
|
||||||
expect(screen.getByText('Recovery')).toBeInTheDocument();
|
|
||||||
expect(screen.queryByText(/\[FAIL\]/)).not.toBeInTheDocument();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('labels hook uninstall restore and cleanup details without implying install state', async () => {
|
|
||||||
mocks.adapter.detectTools.mockResolvedValue({
|
|
||||||
...detectionResp,
|
|
||||||
tools: [
|
|
||||||
{
|
|
||||||
...detectionResp.tools[0],
|
|
||||||
hooksInstalled: true,
|
|
||||||
hookPointerPath: '/home/.codex/hive-mind-install.json',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
mocks.adapter.manageHooks.mockResolvedValueOnce({
|
|
||||||
ok: true,
|
|
||||||
action: 'uninstall',
|
|
||||||
stdout: [
|
|
||||||
'hive-mind/codex-hooks: uninstall',
|
|
||||||
' - hooks.json: /home/.codex/hooks.json',
|
|
||||||
' - restored from: /home/.codex/hooks.json.hive-mind-backup.2026-07-08T19-00-00Z',
|
|
||||||
' - created removed: no',
|
|
||||||
' - backup removed: yes',
|
|
||||||
' - pointer removed: yes',
|
|
||||||
'Done. hooks.json is byte-identical to pre-install state.',
|
|
||||||
].join('\n'),
|
|
||||||
stderr: '',
|
|
||||||
code: 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
render(<LauncherApp />);
|
|
||||||
fireEvent.click(await screen.findByRole('button', { name: /uninstall hooks/i }));
|
|
||||||
|
|
||||||
expect(await screen.findByText(/Claude Code: uninstall OK/i)).toBeInTheDocument();
|
|
||||||
expect(screen.getByText('Changed file')).toBeInTheDocument();
|
|
||||||
expect(screen.getByText('Restored from')).toBeInTheDocument();
|
|
||||||
expect(screen.getByText('Backup removed')).toBeInTheDocument();
|
|
||||||
expect(screen.getByText('Pointer removed')).toBeInTheDocument();
|
|
||||||
expect(screen.queryByText('Install pointer')).not.toBeInTheDocument();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('offers Claude Desktop launch and hook management from the shared manifest', async () => {
|
|
||||||
mocks.adapter.detectTools.mockResolvedValue({
|
mocks.adapter.detectTools.mockResolvedValue({
|
||||||
platform: 'darwin',
|
platform: 'darwin',
|
||||||
detectedAt: '2026-07-08T00:00:00.000Z',
|
detectedAt: '2026-07-08T00:00:00.000Z',
|
||||||
@@ -662,8 +399,6 @@ describe('LauncherApp · hook cohort (#3)', () => {
|
|||||||
installed: true,
|
installed: true,
|
||||||
installedPath: '/Applications/Claude.app',
|
installedPath: '/Applications/Claude.app',
|
||||||
version: '1.2.3',
|
version: '1.2.3',
|
||||||
hooksInstalled: false,
|
|
||||||
hookPointerPath: null,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@@ -672,15 +407,11 @@ describe('LauncherApp · hook cohort (#3)', () => {
|
|||||||
|
|
||||||
expect(await screen.findByText('Claude Desktop')).toBeInTheDocument();
|
expect(await screen.findByText('Claude Desktop')).toBeInTheDocument();
|
||||||
expect(screen.getByRole('button', { name: /^launch$/i })).toBeInTheDocument();
|
expect(screen.getByRole('button', { name: /^launch$/i })).toBeInTheDocument();
|
||||||
expect(screen.getByRole('button', { name: /install hooks/i })).toBeInTheDocument();
|
|
||||||
expect(screen.getByRole('button', { name: /^verify$/i })).toBeInTheDocument();
|
|
||||||
expect(screen.queryByText(/launch only/i)).not.toBeInTheDocument();
|
|
||||||
expect(screen.queryByText(/hooks are not supported for Claude Desktop yet/i)).not.toBeInTheDocument();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('LauncherApp · v1 memory features (ADR-0002)', () => {
|
describe('LauncherApp · v1 memory features (ADR-0002)', () => {
|
||||||
it('hides hook controls, the memory-sharing explainer and Room tasks; launch stays', async () => {
|
it('hides Room tasks; launch stays', async () => {
|
||||||
features.enabled = false;
|
features.enabled = false;
|
||||||
mocks.adapter.detectTools.mockResolvedValue({
|
mocks.adapter.detectTools.mockResolvedValue({
|
||||||
platform: 'darwin',
|
platform: 'darwin',
|
||||||
@@ -692,8 +423,6 @@ describe('LauncherApp · v1 memory features (ADR-0002)', () => {
|
|||||||
installed: true,
|
installed: true,
|
||||||
installedPath: '/usr/local/bin/codex',
|
installedPath: '/usr/local/bin/codex',
|
||||||
version: '0.144.1',
|
version: '0.144.1',
|
||||||
hooksInstalled: true,
|
|
||||||
hookPointerPath: '/home/.codex/hooks',
|
|
||||||
capabilities: { interactiveLaunch: true, headlessTask: true, structuredProgress: true, resumable: true },
|
capabilities: { interactiveLaunch: true, headlessTask: true, structuredProgress: true, resumable: true },
|
||||||
permissionModes: ['read-only', 'workspace-write', 'native'],
|
permissionModes: ['read-only', 'workspace-write', 'native'],
|
||||||
},
|
},
|
||||||
@@ -704,10 +433,6 @@ describe('LauncherApp · v1 memory features (ADR-0002)', () => {
|
|||||||
|
|
||||||
expect(await screen.findByText('Codex CLI')).toBeInTheDocument();
|
expect(await screen.findByText('Codex CLI')).toBeInTheDocument();
|
||||||
expect(screen.getByRole('button', { name: /^launch$/i })).toBeInTheDocument();
|
expect(screen.getByRole('button', { name: /^launch$/i })).toBeInTheDocument();
|
||||||
expect(screen.queryByRole('tablist', { name: /launcher view/i })).not.toBeInTheDocument();
|
|
||||||
expect(screen.queryByText(/hooks active/i)).not.toBeInTheDocument();
|
|
||||||
expect(screen.queryByRole('button', { name: /install hooks|uninstall hooks|^verify$/i })).not.toBeInTheDocument();
|
|
||||||
expect(screen.queryByText(/launch only|hook management is not supported/i)).not.toBeInTheDocument();
|
|
||||||
expect(screen.queryByRole('button', { name: /run task/i })).not.toBeInTheDocument();
|
expect(screen.queryByRole('button', { name: /run task/i })).not.toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,28 +3,18 @@
|
|||||||
*
|
*
|
||||||
* Dock surface for the AI-OS tool launcher. Lists registered AI execution
|
* Dock surface for the AI-OS tool launcher. Lists registered AI execution
|
||||||
* surfaces while keeping roadmap integrations visibly inert. Each card
|
* surfaces while keeping roadmap integrations visibly inert. Each card
|
||||||
* includes detection status, hook-install status,
|
* includes detection status and its supported actions (launch in the active
|
||||||
* and its supported actions:
|
* workspace, watch, stop).
|
||||||
*
|
|
||||||
* Launch in workspace X / Install hooks / Verify hooks / Uninstall hooks
|
|
||||||
*
|
*
|
||||||
* Adapter contract:
|
* Adapter contract:
|
||||||
* adapter.detectTools() → /api/tools/detect
|
* adapter.detectTools() → /api/tools/detect
|
||||||
* adapter.launchTool() → /api/tools/launch
|
* adapter.launchTool() → /api/tools/launch
|
||||||
* adapter.manageHooks() → /api/tools/hooks
|
|
||||||
*
|
|
||||||
* Warm-Hive PR6b (B1): two views behind a segmented toggle —
|
|
||||||
* Variation A · Launch — the live detect/launch/hooks/processes UI (below).
|
|
||||||
* Variation B · How memory is shared — a pure-UI explainer (flow diagram +
|
|
||||||
* three cards + a provenance example). Static, no backend, mirrors
|
|
||||||
* docs/design_handoff_waggle_app/design-files/screens/launcher.html.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useState, useEffect, useCallback, useMemo } from 'react';
|
import { useState, useEffect, useCallback, useMemo } from 'react';
|
||||||
import {
|
import {
|
||||||
Rocket, RefreshCw, CheckCircle2, XCircle, AlertTriangle,
|
Rocket, RefreshCw, CheckCircle2, XCircle, AlertTriangle,
|
||||||
Play, Download, ShieldCheck, Trash2, Loader2, MessageSquare, Square,
|
Play, Loader2, MessageSquare, Square, Workflow,
|
||||||
Workflow, ArrowDownToLine, ArrowRight, ShieldCheck as ShieldCheckIcon, Hexagon,
|
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
@@ -45,19 +35,15 @@ import {
|
|||||||
} from '@waggle/shared';
|
} from '@waggle/shared';
|
||||||
|
|
||||||
// #5 — derived from the shared manifest registry (single source of truth),
|
// #5 — derived from the shared manifest registry (single source of truth),
|
||||||
// replacing the hand-maintained local copies. LAUNCH_COHORT = launchable tools;
|
// replacing the hand-maintained local copy. LAUNCH_COHORT = launchable tools.
|
||||||
// HOOKS_COHORT = tools whose hive-mind hook package ships a bin (hookCapable).
|
// Mirrors the backend cohort, which derives from the same BUILTIN_TOOL_MANIFESTS.
|
||||||
// Hermes Desktop is intentionally excluded. Mirrors the backend cohorts, which
|
|
||||||
// derive from the same BUILTIN_TOOL_MANIFESTS.
|
|
||||||
const LAUNCH_COHORT = BUILTIN_TOOL_MANIFESTS.filter((m) => m.launchable).map((m) => m.id);
|
const LAUNCH_COHORT = BUILTIN_TOOL_MANIFESTS.filter((m) => m.launchable).map((m) => m.id);
|
||||||
const HOOKS_COHORT = BUILTIN_TOOL_MANIFESTS.filter((m) => m.hookCapable).map((m) => m.id);
|
|
||||||
|
|
||||||
interface DetectedTool {
|
interface DetectedTool {
|
||||||
id: string;
|
id: string;
|
||||||
displayName: string;
|
displayName: string;
|
||||||
releaseStatus?: ToolReleaseStatus;
|
releaseStatus?: ToolReleaseStatus;
|
||||||
launchable?: boolean;
|
launchable?: boolean;
|
||||||
hookCapable?: boolean;
|
|
||||||
builtin?: boolean;
|
builtin?: boolean;
|
||||||
acceptsInlinePrompt?: boolean;
|
acceptsInlinePrompt?: boolean;
|
||||||
capabilities?: ToolCapabilities;
|
capabilities?: ToolCapabilities;
|
||||||
@@ -65,8 +51,6 @@ interface DetectedTool {
|
|||||||
installed: boolean;
|
installed: boolean;
|
||||||
installedPath: string | null;
|
installedPath: string | null;
|
||||||
version: string | null;
|
version: string | null;
|
||||||
hooksInstalled: boolean;
|
|
||||||
hookPointerPath: string | null;
|
|
||||||
diagnostic?: string;
|
diagnostic?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,10 +60,7 @@ interface DetectionResult {
|
|||||||
tools: DetectedTool[];
|
tools: DetectedTool[];
|
||||||
}
|
}
|
||||||
|
|
||||||
type ToolAction = 'launch' | 'run' | 'install' | 'verify' | 'uninstall';
|
type ToolAction = 'launch' | 'run';
|
||||||
|
|
||||||
/** Segmented-toggle view: A = the live launch UI; B = the memory-sharing explainer. */
|
|
||||||
type LauncherView = 'a' | 'b';
|
|
||||||
|
|
||||||
interface ActionState {
|
interface ActionState {
|
||||||
toolId: string;
|
toolId: string;
|
||||||
@@ -91,13 +72,6 @@ interface ActionResult {
|
|||||||
action: ToolAction;
|
action: ToolAction;
|
||||||
ok: boolean;
|
ok: boolean;
|
||||||
message: string;
|
message: string;
|
||||||
details?: ActionDetail[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ActionDetail {
|
|
||||||
label: string;
|
|
||||||
value: string;
|
|
||||||
tone?: 'attention' | 'recovery';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface LauncherAppProps {
|
interface LauncherAppProps {
|
||||||
@@ -115,16 +89,13 @@ export function resetLauncherRouteCache(): void {
|
|||||||
launcherRouteCache.resetForTests();
|
launcherRouteCache.resetForTests();
|
||||||
}
|
}
|
||||||
|
|
||||||
const HOOK_PATH_RE = /([A-Za-z]:\\[^\s]+|\/[^\s]+)/;
|
|
||||||
const MAX_VISIBLE_HOOK_DETAILS = 6;
|
|
||||||
|
|
||||||
const toolCanLaunch = (tool: DetectedTool): boolean =>
|
const toolCanLaunch = (tool: DetectedTool): boolean =>
|
||||||
tool.releaseStatus !== 'roadmap'
|
tool.releaseStatus !== 'roadmap'
|
||||||
&& (tool.launchable ?? LAUNCH_COHORT.includes(tool.id));
|
&& (tool.launchable ?? LAUNCH_COHORT.includes(tool.id));
|
||||||
|
|
||||||
const launchUnavailableMessage = (tool: DetectedTool): string =>
|
const launchUnavailableMessage = (tool: DetectedTool): string =>
|
||||||
tool.releaseStatus === 'roadmap'
|
tool.releaseStatus === 'roadmap'
|
||||||
? 'Roadmap integration. Detection retained for compatibility; launch, tasks, and hooks are deferred.'
|
? 'Roadmap integration. Detection retained for compatibility; launch and tasks are deferred.'
|
||||||
: tool.installed && tool.diagnostic
|
: tool.installed && tool.diagnostic
|
||||||
? 'Launch is blocked for this install. Follow the note above, then refresh.'
|
? 'Launch is blocked for this install. Follow the note above, then refresh.'
|
||||||
: 'Detection ready. This adapter is not configured for launch.';
|
: 'Detection ready. This adapter is not configured for launch.';
|
||||||
@@ -149,152 +120,9 @@ const toolCanRunCapturedTask = (tool: DetectedTool): boolean =>
|
|||||||
tool.capabilities?.headlessTask === true &&
|
tool.capabilities?.headlessTask === true &&
|
||||||
(tool.permissionModes?.length ?? 0) > 0;
|
(tool.permissionModes?.length ?? 0) > 0;
|
||||||
|
|
||||||
const hookDetailLabel = (rawLabel: string): string => {
|
|
||||||
const label = rawLabel.trim().toLowerCase();
|
|
||||||
if (label.includes('backup removed')) return 'Backup removed';
|
|
||||||
if (label.includes('pointer removed')) return 'Pointer removed';
|
|
||||||
if (label.includes('created removed')) return 'Created file removed';
|
|
||||||
if (label.includes('backup')) return 'Backup';
|
|
||||||
if (label.includes('pointer')) return 'Install pointer';
|
|
||||||
if (label.includes('restored')) return 'Restored from';
|
|
||||||
if (label.includes('settings') || label.includes('hooks.json') || label.includes('config')) return 'Changed file';
|
|
||||||
if (label.includes('added hooks')) return 'Hooks added';
|
|
||||||
if (label.includes('cli path')) return 'CLI path';
|
|
||||||
return rawLabel.trim().replace(/^\w/, (c) => c.toUpperCase());
|
|
||||||
};
|
|
||||||
|
|
||||||
const hookRecoveryDetail = (result?: { ok: boolean; action: ToolAction }): ActionDetail | null => {
|
|
||||||
if (!result) return null;
|
|
||||||
if (!result.ok) {
|
|
||||||
return {
|
|
||||||
label: 'Recovery',
|
|
||||||
value: result.action === 'verify'
|
|
||||||
? 'Run Install hooks for this tool, then Verify again. If it still fails, use Uninstall hooks to restore the previous config, then reinstall hooks.'
|
|
||||||
: 'Retry the action. If it repeats, use Uninstall hooks to restore the previous config, then install again.',
|
|
||||||
tone: 'recovery',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
if (result.action === 'install') {
|
|
||||||
return {
|
|
||||||
label: 'Recovery',
|
|
||||||
value: 'Use Verify to inspect the install, or Uninstall hooks to restore the previous config.',
|
|
||||||
tone: 'recovery',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
if (result.action === 'uninstall') {
|
|
||||||
return {
|
|
||||||
label: 'Recovery',
|
|
||||||
value: 'Previous hook config was restored, or the Waggle-created config was removed.',
|
|
||||||
tone: 'recovery',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
const parseHookOutputDetails = (text: string | undefined, stream: 'stdout' | 'stderr'): ActionDetail[] => {
|
|
||||||
const lines = text?.trim().split(/\r?\n/).map((line) => line.trim()).filter(Boolean) ?? [];
|
|
||||||
const tone = stream === 'stderr' ? 'attention' : undefined;
|
|
||||||
|
|
||||||
return lines
|
|
||||||
.map((line): ActionDetail | null => {
|
|
||||||
const check = line.match(/^\[(PASS|FAIL)\]\s+(.+?)(?:\s+(?:\u2014|-)\s+(.+))?$/);
|
|
||||||
if (check) {
|
|
||||||
const failed = check[1] === 'FAIL';
|
|
||||||
const name = check[2].trim();
|
|
||||||
const detail = check[3]?.trim();
|
|
||||||
return {
|
|
||||||
label: failed ? 'Check failed' : 'Check passed',
|
|
||||||
value: detail ? `${name}: ${detail}` : name,
|
|
||||||
tone: failed ? 'attention' : tone,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const labeled = line.match(/^\s*-\s*([^:]+):\s*(.*)$/);
|
|
||||||
if (labeled) {
|
|
||||||
return {
|
|
||||||
label: hookDetailLabel(labeled[1]),
|
|
||||||
value: labeled[2].trim() || line,
|
|
||||||
tone,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (/backup|backed up/i.test(line)) {
|
|
||||||
return {
|
|
||||||
label: 'Backup',
|
|
||||||
value: line.match(HOOK_PATH_RE)?.[1] ?? line,
|
|
||||||
tone,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stream === 'stderr') {
|
|
||||||
return { label: 'Needs attention', value: line, tone: 'attention' };
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
/^hive-mind\/.+:\s/.test(line) ||
|
|
||||||
/^done\./i.test(line) ||
|
|
||||||
/^run "/i.test(line) ||
|
|
||||||
/^all checks passed\.$/i.test(line) ||
|
|
||||||
/^one or more checks failed\.$/i.test(line)
|
|
||||||
) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return { label: 'Output', value: line };
|
|
||||||
})
|
|
||||||
.filter((detail): detail is ActionDetail => Boolean(detail));
|
|
||||||
};
|
|
||||||
|
|
||||||
const summarizeHookActionDetails = (details: ActionDetail[]): ActionDetail[] => {
|
|
||||||
const recoveryDetails = details.filter((detail) => detail.label === 'Recovery');
|
|
||||||
const outputDetails = details.filter((detail) => detail.label !== 'Recovery');
|
|
||||||
if (outputDetails.length <= MAX_VISIBLE_HOOK_DETAILS) return details;
|
|
||||||
|
|
||||||
const visibleOutput = outputDetails.slice(0, MAX_VISIBLE_HOOK_DETAILS);
|
|
||||||
const hiddenCount = outputDetails.length - visibleOutput.length;
|
|
||||||
const hiddenHasAttention = outputDetails
|
|
||||||
.slice(MAX_VISIBLE_HOOK_DETAILS)
|
|
||||||
.some((detail) => detail.tone === 'attention');
|
|
||||||
|
|
||||||
return [
|
|
||||||
...visibleOutput,
|
|
||||||
{
|
|
||||||
label: 'More output',
|
|
||||||
value: `${hiddenCount} additional hook output ${hiddenCount === 1 ? 'line' : 'lines'} hidden. Run the hook action from a terminal for full output.`,
|
|
||||||
tone: hiddenHasAttention ? 'attention' : undefined,
|
|
||||||
},
|
|
||||||
...recoveryDetails,
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
const hookActionDetails = (
|
|
||||||
stdout?: string,
|
|
||||||
stderr?: string,
|
|
||||||
result?: { ok: boolean; action: ToolAction },
|
|
||||||
): ActionDetail[] => {
|
|
||||||
const details = [
|
|
||||||
...parseHookOutputDetails(stdout, 'stdout'),
|
|
||||||
...parseHookOutputDetails(stderr, 'stderr'),
|
|
||||||
];
|
|
||||||
const recovery = hookRecoveryDetail(result);
|
|
||||||
if (recovery) {
|
|
||||||
details.push(recovery);
|
|
||||||
}
|
|
||||||
if (!result?.ok && details.length === 1 && recovery) {
|
|
||||||
details.unshift({
|
|
||||||
label: 'Needs attention',
|
|
||||||
value: 'No hook output was returned.',
|
|
||||||
tone: 'attention',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return summarizeHookActionDetails(details);
|
|
||||||
};
|
|
||||||
|
|
||||||
const LauncherApp = ({ activeWorkspaceId, workspaces = [], onOpenRoom }: LauncherAppProps = {}) => {
|
const LauncherApp = ({ activeWorkspaceId, workspaces = [], onOpenRoom }: LauncherAppProps = {}) => {
|
||||||
const [view, setView] = useState<LauncherView>('a');
|
// ADR-0002: Waggle Room is hidden in v1 (memory feature map). Launch, watch
|
||||||
// ADR-0002: agent memory hooks and Waggle Room are hidden in v1 (memory
|
// and stop stay.
|
||||||
// feature map). Launch, watch and stop stay.
|
|
||||||
const hooksShown = hasMemoryFeature('agentHooks');
|
|
||||||
const roomShown = hasMemoryFeature('room');
|
const roomShown = hasMemoryFeature('room');
|
||||||
const cachedDetection = launcherRouteCache.read('tools');
|
const cachedDetection = launcherRouteCache.read('tools');
|
||||||
const [detection, setDetection] = useState<DetectionResult | null>(cachedDetection ?? null);
|
const [detection, setDetection] = useState<DetectionResult | null>(cachedDetection ?? null);
|
||||||
@@ -435,12 +263,12 @@ const LauncherApp = ({ activeWorkspaceId, workspaces = [], onOpenRoom }: Launche
|
|||||||
[pidsByTool],
|
[pidsByTool],
|
||||||
);
|
);
|
||||||
|
|
||||||
const doAction = useCallback(
|
const launchSelectedTool = useCallback(
|
||||||
async (tool: DetectedTool, action: Exclude<ToolAction, 'run'>) => {
|
async (tool: DetectedTool) => {
|
||||||
|
const action = 'launch';
|
||||||
setActiveAction({ toolId: tool.id, action });
|
setActiveAction({ toolId: tool.id, action });
|
||||||
setLastResult(null);
|
setLastResult(null);
|
||||||
try {
|
try {
|
||||||
if (action === 'launch') {
|
|
||||||
if (!tool.installedPath) {
|
if (!tool.installedPath) {
|
||||||
setLastResult({
|
setLastResult({
|
||||||
toolId: tool.id,
|
toolId: tool.id,
|
||||||
@@ -479,23 +307,6 @@ const LauncherApp = ({ activeWorkspaceId, workspaces = [], onOpenRoom }: Launche
|
|||||||
if (r.ok && (args || sendsRawPrompt)) setPrompt('');
|
if (r.ok && (args || sendsRawPrompt)) setPrompt('');
|
||||||
// Watch mode (⌘K deep-link): auto-open the live output pane.
|
// Watch mode (⌘K deep-link): auto-open the live output pane.
|
||||||
if (r.ok && watchMode) setOpenPaneToolId(tool.id);
|
if (r.ok && watchMode) setOpenPaneToolId(tool.id);
|
||||||
} else {
|
|
||||||
const r = await adapter.manageHooks({ id: tool.id, action });
|
|
||||||
setLastResult({
|
|
||||||
toolId: tool.id,
|
|
||||||
action,
|
|
||||||
ok: r.ok,
|
|
||||||
message: r.ok
|
|
||||||
? `${tool.displayName}: ${action} OK`
|
|
||||||
: (r.error || r.stderr || `${action} failed (exit ${r.code})`),
|
|
||||||
details: hookActionDetails(r.stdout, r.stderr, { ok: r.ok, action }),
|
|
||||||
});
|
|
||||||
// Refresh detection after install/uninstall so hook status
|
|
||||||
// updates on screen without waiting for user click.
|
|
||||||
if (action === 'install' || action === 'uninstall') {
|
|
||||||
await refresh();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setLastResult({
|
setLastResult({
|
||||||
toolId: tool.id,
|
toolId: tool.id,
|
||||||
@@ -507,7 +318,7 @@ const LauncherApp = ({ activeWorkspaceId, workspaces = [], onOpenRoom }: Launche
|
|||||||
setActiveAction(null);
|
setActiveAction(null);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[activeWorkspaceId, prompt, refresh, watchMode],
|
[activeWorkspaceId, prompt, watchMode],
|
||||||
);
|
);
|
||||||
|
|
||||||
const tools = useMemo<DetectedTool[]>(() => detection?.tools ?? [], [detection]);
|
const tools = useMemo<DetectedTool[]>(() => detection?.tools ?? [], [detection]);
|
||||||
@@ -590,51 +401,22 @@ const LauncherApp = ({ activeWorkspaceId, workspaces = [], onOpenRoom }: Launche
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col h-full bg-background text-foreground">
|
<div className="flex flex-col h-full bg-background text-foreground">
|
||||||
{/* Header — title + A/B segmented toggle + (Variation A only) refresh */}
|
{/* Header — title + refresh */}
|
||||||
<div className="flex items-center gap-3 px-3 py-2 border-b border-border/50">
|
<div className="flex items-center gap-3 px-3 py-2 border-b border-border/50">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Rocket className="w-4 h-4" style={{ color: 'var(--honey)' }} />
|
<Rocket className="w-4 h-4" style={{ color: 'var(--honey)' }} />
|
||||||
<span className="text-sm font-display font-semibold">Tool Launcher</span>
|
<span className="text-sm font-display font-semibold">Tool Launcher</span>
|
||||||
{view === 'a' && detection && (
|
{detection && (
|
||||||
<Badge variant="secondary" className="text-[11px] px-1.5 py-0 h-4">
|
<Badge variant="secondary" className="text-[11px] px-1.5 py-0 h-4">
|
||||||
{detection.platform}
|
{detection.platform}
|
||||||
</Badge>
|
</Badge>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{hooksShown && (
|
|
||||||
<div
|
|
||||||
role="tablist"
|
|
||||||
aria-label="Launcher view"
|
|
||||||
className="inline-flex gap-1 p-[3px] rounded-[10px]"
|
|
||||||
style={{ background: 'var(--secondary, hsl(var(--secondary)))', border: '1px solid var(--line-soft)' }}
|
|
||||||
>
|
|
||||||
{(['a', 'b'] as LauncherView[]).map((v) => (
|
|
||||||
<button
|
|
||||||
key={v}
|
|
||||||
role="tab"
|
|
||||||
aria-selected={view === v}
|
|
||||||
onClick={() => setView(v)}
|
|
||||||
className={`text-[11.5px] font-display font-semibold px-2.5 py-1 rounded-md transition-colors whitespace-nowrap ${
|
|
||||||
view === v ? '' : 'text-muted-foreground hover:text-foreground'
|
|
||||||
}`}
|
|
||||||
style={view === v ? { background: 'var(--honey)', color: '#1a1407' } : undefined}
|
|
||||||
>
|
|
||||||
{v === 'a' ? 'Launch' : 'How memory is shared'}
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{view === 'a' && (
|
|
||||||
<Button type="button" variant="ghost" size="sm" onClick={refresh} aria-label="Refresh installed tools" className="h-7 w-7 p-0 ml-auto">
|
<Button type="button" variant="ghost" size="sm" onClick={refresh} aria-label="Refresh installed tools" className="h-7 w-7 p-0 ml-auto">
|
||||||
<RefreshCw className={`w-3.5 h-3.5 ${loading ? 'animate-spin' : ''}`} />
|
<RefreshCw className={`w-3.5 h-3.5 ${loading ? 'animate-spin' : ''}`} />
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{view === 'b' && hooksShown ? (
|
|
||||||
<MemorySharingView />
|
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
{/* Status bar */}
|
{/* Status bar */}
|
||||||
{error && (
|
{error && (
|
||||||
<div className="flex items-center gap-2 px-3 py-2 bg-destructive/10 border-b border-destructive/30 text-[12px] text-destructive">
|
<div className="flex items-center gap-2 px-3 py-2 bg-destructive/10 border-b border-destructive/30 text-[12px] text-destructive">
|
||||||
@@ -670,25 +452,6 @@ const LauncherApp = ({ activeWorkspaceId, workspaces = [], onOpenRoom }: Launche
|
|||||||
)}
|
)}
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<div>{lastResult.message}</div>
|
<div>{lastResult.message}</div>
|
||||||
{lastResult.details?.length ? (
|
|
||||||
<div className="mt-1.5 space-y-1.5 text-[11px] leading-snug opacity-90">
|
|
||||||
{lastResult.details.map((detail, index) => (
|
|
||||||
<div key={`${detail.label}-${detail.value}-${index}`} className="min-w-0">
|
|
||||||
<div className="font-display text-[10px] font-semibold uppercase tracking-normal opacity-75">
|
|
||||||
{detail.label}
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className={[
|
|
||||||
detail.tone === 'recovery' ? 'font-sans' : 'font-mono',
|
|
||||||
'whitespace-pre-wrap break-all',
|
|
||||||
].join(' ')}
|
|
||||||
>
|
|
||||||
{detail.value}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -753,8 +516,6 @@ const LauncherApp = ({ activeWorkspaceId, workspaces = [], onOpenRoom }: Launche
|
|||||||
)}
|
)}
|
||||||
{tools.map((tool) => {
|
{tools.map((tool) => {
|
||||||
const launchable = toolCanLaunch(tool);
|
const launchable = toolCanLaunch(tool);
|
||||||
const hooksSupported = hooksShown && HOOKS_COHORT.includes(tool.id);
|
|
||||||
const launchOnly = hooksShown && launchable && !hooksSupported;
|
|
||||||
const isActive = activeAction?.toolId === tool.id;
|
const isActive = activeAction?.toolId === tool.id;
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -776,16 +537,6 @@ const LauncherApp = ({ activeWorkspaceId, workspaces = [], onOpenRoom }: Launche
|
|||||||
Not installed
|
Not installed
|
||||||
</Badge>
|
</Badge>
|
||||||
)}
|
)}
|
||||||
{hooksShown && tool.hooksInstalled && tool.releaseStatus !== 'roadmap' && (
|
|
||||||
<Badge variant="secondary" className="text-[10px] px-1.5 py-0 h-4" style={{ background: 'var(--honey-wash)', color: 'var(--honey)' }}>
|
|
||||||
Hooks active
|
|
||||||
</Badge>
|
|
||||||
)}
|
|
||||||
{launchOnly && (
|
|
||||||
<Badge variant="outline" className="text-[10px] px-1.5 py-0 h-4 text-muted-foreground">
|
|
||||||
Launch only
|
|
||||||
</Badge>
|
|
||||||
)}
|
|
||||||
{runningTools.has(tool.id) && (
|
{runningTools.has(tool.id) && (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -831,7 +582,7 @@ const LauncherApp = ({ activeWorkspaceId, workspaces = [], onOpenRoom }: Launche
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
className="h-7 text-[11px]"
|
className="h-7 text-[11px]"
|
||||||
onClick={() => doAction(tool, 'launch')}
|
onClick={() => launchSelectedTool(tool)}
|
||||||
disabled={isActive}
|
disabled={isActive}
|
||||||
>
|
>
|
||||||
{isActive && activeAction?.action === 'launch' ? (
|
{isActive && activeAction?.action === 'launch' ? (
|
||||||
@@ -871,63 +622,7 @@ const LauncherApp = ({ activeWorkspaceId, workspaces = [], onOpenRoom }: Launche
|
|||||||
Stop
|
Stop
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{hooksSupported && !tool.hooksInstalled && (
|
|
||||||
<Button
|
|
||||||
size="sm"
|
|
||||||
variant="secondary"
|
|
||||||
className="h-7 text-[11px]"
|
|
||||||
onClick={() => doAction(tool, 'install')}
|
|
||||||
disabled={isActive}
|
|
||||||
>
|
|
||||||
{isActive && activeAction?.action === 'install' ? (
|
|
||||||
<Loader2 className="w-3 h-3 animate-spin mr-1" />
|
|
||||||
) : (
|
|
||||||
<Download className="w-3 h-3 mr-1" />
|
|
||||||
)}
|
|
||||||
Install hooks
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
{hooksSupported && (
|
|
||||||
<Button
|
|
||||||
size="sm"
|
|
||||||
variant="ghost"
|
|
||||||
className="h-7 text-[11px]"
|
|
||||||
onClick={() => doAction(tool, 'verify')}
|
|
||||||
disabled={isActive}
|
|
||||||
>
|
|
||||||
{isActive && activeAction?.action === 'verify' ? (
|
|
||||||
<Loader2 className="w-3 h-3 animate-spin mr-1" />
|
|
||||||
) : (
|
|
||||||
<ShieldCheck className="w-3 h-3 mr-1" />
|
|
||||||
)}
|
|
||||||
Verify
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
{hooksSupported && tool.hooksInstalled && (
|
|
||||||
<Button
|
|
||||||
size="sm"
|
|
||||||
variant="ghost"
|
|
||||||
className="h-7 text-[11px]"
|
|
||||||
style={{ color: 'var(--risk)' }}
|
|
||||||
onClick={() => doAction(tool, 'uninstall')}
|
|
||||||
disabled={isActive}
|
|
||||||
>
|
|
||||||
{isActive && activeAction?.action === 'uninstall' ? (
|
|
||||||
<Loader2 className="w-3 h-3 animate-spin mr-1" />
|
|
||||||
) : (
|
|
||||||
<Trash2 className="w-3 h-3 mr-1" />
|
|
||||||
)}
|
|
||||||
Uninstall hooks
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
{launchOnly && (
|
|
||||||
<div className="text-[11px] text-muted-foreground">
|
|
||||||
{tool.id === 'hermes-desktop'
|
|
||||||
? 'Hook management is not supported for Hermes Desktop.'
|
|
||||||
: 'Hook management is not supported for this tool yet.'}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{roomShown && taskToolId === tool.id && toolCanRunCapturedTask(tool) && (
|
{roomShown && taskToolId === tool.id && toolCanRunCapturedTask(tool) && (
|
||||||
<div
|
<div
|
||||||
className="rounded-lg border border-primary/30 bg-primary/5 p-3 space-y-3"
|
className="rounded-lg border border-primary/30 bg-primary/5 p-3 space-y-3"
|
||||||
@@ -1068,188 +763,8 @@ const LauncherApp = ({ activeWorkspaceId, workspaces = [], onOpenRoom }: Launche
|
|||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Variation B · How memory is shared — a pure-UI explainer. No backend, no
|
|
||||||
* adapter calls, no live data: a fixed flow diagram + three cards + one
|
|
||||||
* provenance example, mirroring launcher.html lines 147-181. The provenance
|
|
||||||
* example string is illustrative (a documentation example, not a real recall),
|
|
||||||
* so it carries an explicit "example" label — no fabricated live data.
|
|
||||||
*/
|
|
||||||
|
|
||||||
interface FlowNode {
|
|
||||||
tag: string;
|
|
||||||
title: string;
|
|
||||||
detail: React.ReactNode;
|
|
||||||
hive?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
const FLOW_NODES: readonly FlowNode[] = [
|
|
||||||
{
|
|
||||||
tag: 'You launch',
|
|
||||||
title: 'Claude Code',
|
|
||||||
detail: (
|
|
||||||
<>
|
|
||||||
opened from Waggle with
|
|
||||||
<br />
|
|
||||||
<span className="font-mono text-[10.5px]" style={{ color: 'var(--honey)' }}>
|
|
||||||
WAGGLE_WORKSPACE_ID
|
|
||||||
</span>
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
tag: '5 lifecycle hooks',
|
|
||||||
title: 'hive-mind',
|
|
||||||
detail: <>session · prompt · stop · compact · tool</>,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
tag: 'Your workspace',
|
|
||||||
title: 'The hive',
|
|
||||||
detail: (
|
|
||||||
<>
|
|
||||||
local SQLite memory
|
|
||||||
<br />
|
|
||||||
shared with Waggle
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
hive: true,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
interface ExplainerCard {
|
|
||||||
icon: typeof ArrowDownToLine;
|
|
||||||
title: string;
|
|
||||||
body: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const EXPLAINER_CARDS: readonly ExplainerCard[] = [
|
|
||||||
{
|
|
||||||
icon: ArrowDownToLine,
|
|
||||||
title: 'It recalls on start',
|
|
||||||
body: 'The agent opens already knowing this workspace: decisions, constraints, and context, pulled from the hive.',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: ArrowRight,
|
|
||||||
title: 'It commits as it works',
|
|
||||||
body: 'Every meaningful step is captured back into the hive, so Waggle and your next session see it too.',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: ShieldCheckIcon,
|
|
||||||
title: 'Reversible & local',
|
|
||||||
body: 'Hooks install and uninstall cleanly. Nothing leaves your machine; you can verify or remove them anytime.',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const MemorySharingView = () => {
|
|
||||||
return (
|
|
||||||
<ScrollArea className="flex-1 min-h-0">
|
|
||||||
<div className="max-w-[940px] mx-auto px-8 py-8 pb-16">
|
|
||||||
{/* Heading */}
|
|
||||||
<header className="mb-6">
|
|
||||||
<div
|
|
||||||
className="font-mono text-[11px] uppercase tracking-[0.14em] mb-3 flex items-center gap-2.5"
|
|
||||||
style={{ color: 'var(--honey)' }}
|
|
||||||
>
|
|
||||||
<span className="inline-block w-5 h-px" style={{ background: 'var(--honey-line)' }} aria-hidden="true" />
|
|
||||||
How memory is shared
|
|
||||||
</div>
|
|
||||||
<h1 className="text-[26px] font-display font-semibold tracking-tight leading-tight m-0 mb-2.5 text-foreground">
|
|
||||||
How a launched agent shares the hive
|
|
||||||
</h1>
|
|
||||||
<p className="text-[15px] text-muted-foreground leading-relaxed m-0 max-w-[64ch]">
|
|
||||||
When you launch from Waggle, the workspace's memory is wired into the external tool. No copy-paste, no
|
|
||||||
re-explaining. Its work comes back <b className="text-foreground font-medium">attributed</b>.
|
|
||||||
</p>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
{/* Flow diagram + cards + provenance example */}
|
|
||||||
<div
|
|
||||||
className="rounded-2xl px-8 py-9 text-center"
|
|
||||||
style={{
|
|
||||||
border: '1px solid var(--line)',
|
|
||||||
background: 'radial-gradient(70% 90% at 50% 0%, var(--secondary, hsl(var(--secondary))), var(--bg-2))',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{/* Flow row */}
|
|
||||||
<div className="flex items-center justify-center flex-wrap gap-y-3">
|
|
||||||
{FLOW_NODES.map((node, i) => (
|
|
||||||
<div key={node.title} className="flex items-center">
|
|
||||||
<div
|
|
||||||
className="rounded-xl px-4 py-4 min-w-[140px] max-w-[184px] text-left"
|
|
||||||
style={
|
|
||||||
node.hive
|
|
||||||
? {
|
|
||||||
border: '1px solid var(--honey-line)',
|
|
||||||
boxShadow: 'var(--honey-glow)',
|
|
||||||
background: 'linear-gradient(150deg, var(--secondary, hsl(var(--secondary))), var(--card, hsl(var(--card))))',
|
|
||||||
}
|
|
||||||
: { border: '1px solid var(--line-strong)', background: 'var(--card, hsl(var(--card)))' }
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<div className="font-mono text-[9.5px] uppercase tracking-[0.12em] mb-1.5 text-[var(--text-tertiary)]">
|
|
||||||
{node.tag}
|
|
||||||
</div>
|
|
||||||
<div className="text-sm font-display font-semibold text-foreground">{node.title}</div>
|
|
||||||
<div className="text-[11.5px] text-muted-foreground mt-1 leading-snug">{node.detail}</div>
|
|
||||||
</div>
|
|
||||||
{i < FLOW_NODES.length - 1 && (
|
|
||||||
<div className="px-3 text-center shrink-0" style={{ color: 'var(--honey)' }} aria-hidden="true">
|
|
||||||
<ArrowRight className="w-5 h-5 mx-auto" />
|
|
||||||
<span className="block font-mono text-[9px] uppercase tracking-[0.1em] text-[var(--text-tertiary)]">
|
|
||||||
{i === 0 ? 'hooks' : 'recall + commit'}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Three explainer cards */}
|
|
||||||
<div className="grid grid-cols-1 sm:grid-cols-3 gap-3.5 mt-7 text-left">
|
|
||||||
{EXPLAINER_CARDS.map((card) => {
|
|
||||||
const Icon = card.icon;
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
key={card.title}
|
|
||||||
className="rounded-xl p-4"
|
|
||||||
style={{ background: 'var(--card, hsl(var(--card)))', border: '1px solid var(--line-soft)' }}
|
|
||||||
>
|
|
||||||
<Icon className="w-[17px] h-[17px] mb-2.5" style={{ color: 'var(--honey)' }} aria-hidden="true" />
|
|
||||||
<b className="text-[13.5px] font-display font-semibold block mb-1.5 text-foreground">{card.title}</b>
|
|
||||||
<p className="m-0 text-[12.5px] text-muted-foreground leading-relaxed">{card.body}</p>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Provenance example — illustrative, explicitly labelled */}
|
|
||||||
<div
|
|
||||||
className="mt-5 inline-flex items-center gap-2 font-mono text-[11.5px] px-3 py-1.5 rounded-lg"
|
|
||||||
style={{
|
|
||||||
color: 'var(--intel)',
|
|
||||||
background: 'var(--intel-wash)',
|
|
||||||
border: '1px solid color-mix(in srgb, var(--intel) 28%, transparent)',
|
|
||||||
}}
|
|
||||||
title="Illustrative example of how a recall is attributed"
|
|
||||||
>
|
|
||||||
<Hexagon className="w-3.5 h-3.5" aria-hidden="true" />
|
|
||||||
<span>example · remembered from Claude Code · 14:22 · session a1f9</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="mt-4 flex items-center gap-2 text-[12px] text-muted-foreground">
|
|
||||||
<Workflow className="w-3.5 h-3.5 shrink-0" aria-hidden="true" />
|
|
||||||
<span>This is how the wiring works. Switch to <b className="text-foreground/90 font-medium">Launch</b> to open an agent into this workspace.</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ScrollArea>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default LauncherApp;
|
export default LauncherApp;
|
||||||
|
|||||||
@@ -10,14 +10,12 @@ interface MissionControlAppProps {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* AI-OS Phase 4 polish — compact inventory of installed AI tools at
|
* AI-OS Phase 4 polish — compact inventory of installed AI tools at
|
||||||
* the top of Mission Control. One line: detected · installed ·
|
* the top of Mission Control. One line: detected · installed counts,
|
||||||
* hook-wired counts, with an "Open Launcher" button to jump to the
|
* with an "Open Launcher" button to jump to the dedicated dock app.
|
||||||
* dedicated dock app.
|
|
||||||
*/
|
*/
|
||||||
interface ToolInventoryCounts {
|
interface ToolInventoryCounts {
|
||||||
detected: number;
|
detected: number;
|
||||||
installed: number;
|
installed: number;
|
||||||
hooked: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const MissionControlApp = ({ onSpawnOpen }: MissionControlAppProps) => {
|
const MissionControlApp = ({ onSpawnOpen }: MissionControlAppProps) => {
|
||||||
@@ -43,7 +41,6 @@ const MissionControlApp = ({ onSpawnOpen }: MissionControlAppProps) => {
|
|||||||
setToolCounts({
|
setToolCounts({
|
||||||
detected: ts.length,
|
detected: ts.length,
|
||||||
installed: ts.filter((t) => t.installed).length,
|
installed: ts.filter((t) => t.installed).length,
|
||||||
hooked: ts.filter((t) => t.hooksInstalled).length,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (fleet.status === 'rejected') {
|
if (fleet.status === 'rejected') {
|
||||||
@@ -104,8 +101,7 @@ const MissionControlApp = ({ onSpawnOpen }: MissionControlAppProps) => {
|
|||||||
<Rocket className="w-3.5 h-3.5 text-amber-400 flex-shrink-0" />
|
<Rocket className="w-3.5 h-3.5 text-amber-400 flex-shrink-0" />
|
||||||
<span className="text-muted-foreground">
|
<span className="text-muted-foreground">
|
||||||
<span className="text-foreground font-medium">{toolCounts.detected}</span> tools known ·{' '}
|
<span className="text-foreground font-medium">{toolCounts.detected}</span> tools known ·{' '}
|
||||||
<span className="text-emerald-400 font-medium">{toolCounts.installed}</span> installed ·{' '}
|
<span className="text-emerald-400 font-medium">{toolCounts.installed}</span> installed
|
||||||
<span className="text-amber-300 font-medium">{toolCounts.hooked}</span> hook-wired
|
|
||||||
</span>
|
</span>
|
||||||
<div className="flex-1" />
|
<div className="flex-1" />
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ const UserProfileApp = () => {
|
|||||||
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2">
|
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2">
|
||||||
<div>
|
<div>
|
||||||
<label htmlFor="profile-name" className="text-xs text-muted-foreground block mb-1">Name</label>
|
<label htmlFor="profile-name" className="text-xs text-muted-foreground block mb-1">Name</label>
|
||||||
<Input id="profile-name" name="name" autoComplete="name" value={name} onChange={e => setName(e.target.value)} placeholder="Marko Markovic"
|
<Input id="profile-name" name="name" autoComplete="name" value={name} onChange={e => setName(e.target.value)} placeholder="Alex Morgan"
|
||||||
className="w-full bg-muted/50 h-auto py-1.5" />
|
className="w-full bg-muted/50 h-auto py-1.5" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ beforeEach(() => {
|
|||||||
id: 1,
|
id: 1,
|
||||||
source: 'claude-code',
|
source: 'claude-code',
|
||||||
displayName: 'Claude Code',
|
displayName: 'Claude Code',
|
||||||
sourcePath: 'C:/Users/Marko/.claude/projects',
|
sourcePath: 'C:/Users/Alex/.claude/projects',
|
||||||
lastSyncedAt: '2026-07-08T12:00:00.000Z',
|
lastSyncedAt: '2026-07-08T12:00:00.000Z',
|
||||||
itemsImported: 4,
|
itemsImported: 4,
|
||||||
framesCreated: 9,
|
framesCreated: 9,
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ function FolderPickerModal({ open, storageType, currentPath, onSelect, onClose }
|
|||||||
}
|
}
|
||||||
}, [browsePath, newFolderName, storageType, fetchEntries]);
|
}, [browsePath, newFolderName, storageType, fetchEntries]);
|
||||||
|
|
||||||
// P14: Windows paths (C:\Users\Marko...) need separator-aware splitting.
|
// P14: Windows paths (C:\Users\Alex...) need separator-aware splitting.
|
||||||
// The old inline logic split only on '/' and collapsed Windows paths into
|
// The old inline logic split only on '/' and collapsed Windows paths into
|
||||||
// a single unusable crumb. Pure helper handles both separator styles.
|
// a single unusable crumb. Pure helper handles both separator styles.
|
||||||
const breadcrumbs = buildBreadcrumbs(
|
const breadcrumbs = buildBreadcrumbs(
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ const WhoAreYouStep = ({ profile, onChange, onContinue, saving }: WhoAreYouStepP
|
|||||||
autoComplete="name"
|
autoComplete="name"
|
||||||
value={profile.name ?? ''}
|
value={profile.name ?? ''}
|
||||||
onChange={e => onChange({ name: e.target.value })}
|
onChange={e => onChange({ name: e.target.value })}
|
||||||
placeholder="Marko Markovic"
|
placeholder="Alex Morgan"
|
||||||
className="w-full bg-muted/50 border border-border/50 rounded-lg px-3 py-1.5 text-[13px] sm:text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
className="w-full bg-muted/50 border border-border/50 rounded-lg px-3 py-1.5 text-[13px] sm:text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ describe('ChannelsSettings protected API integration', () => {
|
|||||||
}
|
}
|
||||||
: channel));
|
: channel));
|
||||||
mocks.getChannelPairings.mockResolvedValue({
|
mocks.getChannelPairings.mockResolvedValue({
|
||||||
telegram: [{ senderId: 'sender-1', senderName: 'Marko', pairedAt: Date.now() }],
|
telegram: [{ senderId: 'sender-1', senderName: 'Alex', pairedAt: Date.now() }],
|
||||||
});
|
});
|
||||||
render(<ChannelsSettings />);
|
render(<ChannelsSettings />);
|
||||||
|
|
||||||
|
|||||||
@@ -955,35 +955,6 @@ describe('P1b auth gate', () => {
|
|||||||
await expect(call(a)).rejects.toThrow(AdapterHttpError);
|
await expect(call(a)).rejects.toThrow(AdapterHttpError);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('manageHooks maps a non-2xx body into the { ok:false, stderr, code } envelope (not a throw)', async () => {
|
|
||||||
const a = new LocalAdapter(BASE);
|
|
||||||
routeMock(fetchSpy, [['/api/tools/hooks', () => jsonRes({ ok: false, action: 'install', stdout: '', stderr: 'permission denied', code: 1, error: 'install failed' }, 500)]]);
|
|
||||||
await expect(a.manageHooks({ id: 'claude-code', action: 'install' })).resolves.toMatchObject({
|
|
||||||
ok: false, stderr: 'permission denied', code: 1, error: 'install failed',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('manageHooks preserves a structured hook failure without replacing it with HTTP status text', async () => {
|
|
||||||
const a = new LocalAdapter(BASE);
|
|
||||||
routeMock(fetchSpy, [['/api/tools/hooks', () => jsonRes({
|
|
||||||
ok: false,
|
|
||||||
action: 'verify',
|
|
||||||
packageName: '@waggle/hive-mind-hooks-claude-code',
|
|
||||||
stdout: '',
|
|
||||||
stderr: '',
|
|
||||||
code: 1,
|
|
||||||
}, 400)]]);
|
|
||||||
|
|
||||||
await expect(a.manageHooks({ id: 'claude-code', action: 'verify' })).resolves.toMatchObject({
|
|
||||||
ok: false,
|
|
||||||
action: 'verify',
|
|
||||||
stdout: '',
|
|
||||||
stderr: '',
|
|
||||||
code: 1,
|
|
||||||
error: undefined,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// ── Watchdog recovery + setServerUrl memo hygiene (review fixes) ─────────
|
// ── Watchdog recovery + setServerUrl memo hygiene (review fixes) ─────────
|
||||||
|
|
||||||
it('after a hung-body timeout, the NEXT connect probes fresh (memo does not wedge re-arms)', async () => {
|
it('after a hung-body timeout, the NEXT connect probes fresh (memo does not wedge re-arms)', async () => {
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ describe('adapter isTauri() branch routing', () => {
|
|||||||
it('getIdentity routes to get_identity Tauri command + returns shape', async () => {
|
it('getIdentity routes to get_identity Tauri command + returns shape', async () => {
|
||||||
mockedInvoke.mockResolvedValue({
|
mockedInvoke.mockResolvedValue({
|
||||||
configured: true,
|
configured: true,
|
||||||
name: 'Marko',
|
name: 'Alex',
|
||||||
role: 'Founder',
|
role: 'Founder',
|
||||||
department: 'Egzakta',
|
department: 'Egzakta',
|
||||||
});
|
});
|
||||||
@@ -118,7 +118,7 @@ describe('adapter isTauri() branch routing', () => {
|
|||||||
|
|
||||||
expect(mockedInvoke).toHaveBeenCalledWith('get_identity');
|
expect(mockedInvoke).toHaveBeenCalledWith('get_identity');
|
||||||
expect(id.configured).toBe(true);
|
expect(id.configured).toBe(true);
|
||||||
expect(id.name).toBe('Marko');
|
expect(id.name).toBe('Alex');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -3165,7 +3165,7 @@ class LocalAdapter {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// --- AI-OS launcher (Phase 2B) ---
|
// --- AI-OS launcher (Phase 2B) ---
|
||||||
// detectTools/launchTool/manageHooks each surface the matching
|
// detectTools/launchTool each surface the matching
|
||||||
// sidecar route. All are loopback-only and report only the user's
|
// sidecar route. All are loopback-only and report only the user's
|
||||||
// own machine — no remote calls.
|
// own machine — no remote calls.
|
||||||
|
|
||||||
@@ -3286,38 +3286,6 @@ class LocalAdapter {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async manageHooks(payload: {
|
|
||||||
id: string;
|
|
||||||
action: 'install' | 'verify' | 'uninstall';
|
|
||||||
cliPath?: string;
|
|
||||||
}): Promise<{
|
|
||||||
ok: boolean;
|
|
||||||
action: string;
|
|
||||||
stdout: string;
|
|
||||||
stderr: string;
|
|
||||||
code: number;
|
|
||||||
error?: string;
|
|
||||||
}> {
|
|
||||||
// P1b D3: fetchRaw — hook-failure diagnostics (stderr/exit code) ride the error body.
|
|
||||||
const res = await this.fetchRaw('/api/tools/hooks', {
|
|
||||||
method: 'POST',
|
|
||||||
body: JSON.stringify(payload),
|
|
||||||
});
|
|
||||||
const body = await res.json().catch(() => ({}));
|
|
||||||
const hasHookEnvelope =
|
|
||||||
typeof body.ok === 'boolean' &&
|
|
||||||
typeof body.action === 'string' &&
|
|
||||||
typeof body.code === 'number';
|
|
||||||
return {
|
|
||||||
ok: res.ok && body.ok === true,
|
|
||||||
action: body.action ?? payload.action,
|
|
||||||
stdout: body.stdout ?? '',
|
|
||||||
stderr: body.stderr ?? '',
|
|
||||||
code: body.code ?? -1,
|
|
||||||
error: body.error ?? (res.ok || hasHookEnvelope ? undefined : `HTTP ${res.status}`),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* P1b-SSE: shared EventSource lifecycle — token-attached, lazy-open,
|
* P1b-SSE: shared EventSource lifecycle — token-attached, lazy-open,
|
||||||
* reconnecting. Fixes the three defects that made every stream dead in
|
* reconnecting. Fixes the three defects that made every stream dead in
|
||||||
|
|||||||
@@ -35,13 +35,13 @@ describe('buildBreadcrumbs', () => {
|
|||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('splits C:\\Users\\Marko into root / drive / Users / Marko', () => {
|
it('splits C:\\Users\\Alex into root / drive / Users / Alex', () => {
|
||||||
const out = buildBreadcrumbs('C:\\Users\\Marko', 'Drives', 'local');
|
const out = buildBreadcrumbs('C:\\Users\\Alex', 'Drives', 'local');
|
||||||
expect(out).toEqual([
|
expect(out).toEqual([
|
||||||
{ label: 'Drives', path: '/' },
|
{ label: 'Drives', path: '/' },
|
||||||
{ label: 'C:', path: 'C:\\' },
|
{ label: 'C:', path: 'C:\\' },
|
||||||
{ label: 'Users', path: 'C:\\Users' },
|
{ label: 'Users', path: 'C:\\Users' },
|
||||||
{ label: 'Marko', path: 'C:\\Users\\Marko' },
|
{ label: 'Alex', path: 'C:\\Users\\Alex' },
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -58,25 +58,25 @@ describe('buildBreadcrumbs', () => {
|
|||||||
expect(out[1]).toEqual({ label: 'C:', path: 'C:\\' });
|
expect(out[1]).toEqual({ label: 'C:', path: 'C:\\' });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('accepts mixed separators (C:/Users/Marko)', () => {
|
it('accepts mixed separators (C:/Users/Alex)', () => {
|
||||||
const out = buildBreadcrumbs('C:/Users/Marko', 'Drives', 'local');
|
const out = buildBreadcrumbs('C:/Users/Alex', 'Drives', 'local');
|
||||||
expect(out).toEqual([
|
expect(out).toEqual([
|
||||||
{ label: 'Drives', path: '/' },
|
{ label: 'Drives', path: '/' },
|
||||||
{ label: 'C:', path: 'C:\\' },
|
{ label: 'C:', path: 'C:\\' },
|
||||||
{ label: 'Users', path: 'C:\\Users' },
|
{ label: 'Users', path: 'C:\\Users' },
|
||||||
{ label: 'Marko', path: 'C:\\Users\\Marko' },
|
{ label: 'Alex', path: 'C:\\Users\\Alex' },
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('POSIX local paths', () => {
|
describe('POSIX local paths', () => {
|
||||||
it('splits /Users/marko/Documents into three crumbs', () => {
|
it('splits /Users/alex/Documents into three crumbs', () => {
|
||||||
const out = buildBreadcrumbs('/Users/marko/Documents', 'Drives', 'local');
|
const out = buildBreadcrumbs('/Users/alex/Documents', 'Drives', 'local');
|
||||||
expect(out).toEqual([
|
expect(out).toEqual([
|
||||||
{ label: 'Drives', path: '/' },
|
{ label: 'Drives', path: '/' },
|
||||||
{ label: 'Users', path: '/Users' },
|
{ label: 'Users', path: '/Users' },
|
||||||
{ label: 'marko', path: '/Users/marko' },
|
{ label: 'alex', path: '/Users/alex' },
|
||||||
{ label: 'Documents', path: '/Users/marko/Documents' },
|
{ label: 'Documents', path: '/Users/alex/Documents' },
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -102,9 +102,9 @@ describe('buildBreadcrumbs', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('handles deeply nested Windows paths without collapsing', () => {
|
it('handles deeply nested Windows paths without collapsing', () => {
|
||||||
const deep = 'C:\\Users\\Marko\\OneDrive - Egzakta d.o.o\\Desktop';
|
const deep = 'C:\\Users\\Alex\\OneDrive - Egzakta d.o.o\\Desktop';
|
||||||
const out = buildBreadcrumbs(deep, 'Drives', 'local');
|
const out = buildBreadcrumbs(deep, 'Drives', 'local');
|
||||||
// root + drive + Users + Marko + OneDrive... + Desktop = 6
|
// root + drive + Users + Alex + OneDrive... + Desktop = 6
|
||||||
expect(out).toHaveLength(6);
|
expect(out).toHaveLength(6);
|
||||||
expect(out[5]).toEqual({ label: 'Desktop', path: deep });
|
expect(out[5]).toEqual({ label: 'Desktop', path: deep });
|
||||||
expect(out[4].label).toBe('OneDrive - Egzakta d.o.o');
|
expect(out[4].label).toBe('OneDrive - Egzakta d.o.o');
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Breadcrumb helper for the local-browse dialog.
|
* Breadcrumb helper for the local-browse dialog.
|
||||||
*
|
*
|
||||||
* On Windows the sidecar returns paths like `C:\Users\Marko`. The old
|
* On Windows the sidecar returns paths like `C:\Users\Alex`. The old
|
||||||
* breadcrumb rendering split on `/` only, so Windows paths collapsed
|
* breadcrumb rendering split on `/` only, so Windows paths collapsed
|
||||||
* into a single unusable crumb. This helper normalises across both
|
* into a single unusable crumb. This helper normalises across both
|
||||||
* separator styles, keeping virtual (POSIX) storage untouched.
|
* separator styles, keeping virtual (POSIX) storage untouched.
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export function clerkPublishableKey(): string | undefined {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Warm-token Clerk appearance. Mirrors the apps/www pattern (baseTheme: dark + a
|
* Warm-token Clerk appearance: baseTheme dark plus a variables override, in the
|
||||||
* variables override) recolored to the WARM hex (apps/www uses the old cooler hex).
|
* WARM hex.
|
||||||
* NOTE: do NOT add `as const` — it over-narrows Clerk's Appearance union and silently
|
* NOTE: do NOT add `as const` — it over-narrows Clerk's Appearance union and silently
|
||||||
* drops `baseTheme` (recon 05 §5.3 / apps/www layout.tsx:31-34 gotcha).
|
* drops `baseTheme` (recon 05 §5.3).
|
||||||
*/
|
*/
|
||||||
export function clerkAppearance(isDark: boolean) {
|
export function clerkAppearance(isDark: boolean) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import {
|
|||||||
Lock, Activity, History, BarChart3, Users, Radio,
|
Lock, Activity, History, BarChart3, Users, Radio,
|
||||||
Gauge, Monitor, LayoutGrid, Eye,
|
Gauge, Monitor, LayoutGrid, Eye,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { hasMemoryFeature } from "@/lib/memory-features";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Curated ⌘K catalog (design ref: design-files/screens/ia.html).
|
* Curated ⌘K catalog (design ref: design-files/screens/ia.html).
|
||||||
@@ -67,7 +66,7 @@ export function buildCommandCatalog(ctx: CatalogContext): CatalogGroup[] {
|
|||||||
|
|
||||||
const doGroup: CatalogCommand[] = [
|
const doGroup: CatalogCommand[] = [
|
||||||
{ id: "start-task", group: "do", name: "Start a task", subtitle: "new agent run", icon: Plus, action: "spawn" },
|
{ id: "start-task", group: "do", name: "Start a task", subtitle: "new agent run", icon: Plus, action: "spawn" },
|
||||||
{ id: "launch-agent", group: "do", name: "Launch a coding agent", subtitle: hasMemoryFeature("agentHooks") ? "Claude Code · Cursor · Codex, sharing this hive" : "Claude Code · Cursor · Codex", icon: Rocket, to: "/launcher" },
|
{ id: "launch-agent", group: "do", name: "Launch a coding agent", subtitle: "Claude Code · Cursor · Codex", icon: Rocket, to: "/launcher" },
|
||||||
{ id: "watch-agent", group: "do", name: "Watch a coding agent live", subtitle: "Claude Code · Cursor · Codex, live output", keywords: "observe pty terminal live output tail", icon: Eye, to: "/launcher?watch=1" },
|
{ id: "watch-agent", group: "do", name: "Watch a coding agent live", subtitle: "Claude Code · Cursor · Codex, live output", keywords: "observe pty terminal live output tail", icon: Eye, to: "/launcher?watch=1" },
|
||||||
{ id: "settings", group: "do", name: "Settings", subtitle: "models · failover · permissions", icon: Settings, to: "/settings" },
|
{ id: "settings", group: "do", name: "Settings", subtitle: "models · failover · permissions", icon: Settings, to: "/settings" },
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* frame.source provenance vocabulary.
|
* frame.source provenance vocabulary.
|
||||||
*
|
*
|
||||||
* The `memory_frames.source` column persists exactly 5 values (the DB CHECK
|
* The memory `source` field carries exactly 5 values. The server
|
||||||
* constraint at `packages/hive-mind-core/src/mind/schema.ts:57`). The server
|
|
||||||
* projects the raw string; the FE owns the friendly label/description map
|
* projects the raw string; the FE owns the friendly label/description map
|
||||||
* (recon 01 §5). Single source of truth for the ⬡ provenance pill across
|
* (recon 01 §5). Single source of truth for the ⬡ provenance pill across
|
||||||
* Workspace Overview, Chat activity steps, and the Memory-Trust screen.
|
* Workspace Overview, Chat activity steps, and the Memory-Trust screen.
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
// `@waggle/shared`, mirroring the memory contract's kinds). This module maps each kind to (a) a human label for Memory
|
// `@waggle/shared`, mirroring the memory contract's kinds). This module maps each kind to (a) a human label for Memory
|
||||||
// Center filter chips / cards (S04) and (b) an onboarding Memory Review grouping
|
// Center filter chips / cards (S04) and (b) an onboarding Memory Review grouping
|
||||||
// bucket (S16). The server-side `ImportItemType → MemoryKind` normalization lives
|
// bucket (S16). The server-side `ImportItemType → MemoryKind` normalization lives
|
||||||
// in the sidecar harvest layer (Phase 2B), NOT here — the build order forbids
|
// in the sidecar harvest layer (Phase 2B), NOT here.
|
||||||
// `@waggle/shared` from importing the hive-mind-core `ImportItemType` union.
|
|
||||||
//
|
//
|
||||||
// Pure functions only; no side effects. The `Record<MemoryKind, …>` map is the
|
// Pure functions only; no side effects. The `Record<MemoryKind, …>` map is the
|
||||||
// safety net: tsc fails if a new `MemoryKind` member is added without a mapping.
|
// safety net: tsc fails if a new `MemoryKind` member is added without a mapping.
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ const CACHE_KEY = 'waggle:home-cache:v1';
|
|||||||
|
|
||||||
function briefing(over: Partial<HomeBriefing> = {}): HomeBriefing {
|
function briefing(over: Partial<HomeBriefing> = {}): HomeBriefing {
|
||||||
return {
|
return {
|
||||||
greeting: 'Welcome back, Marko',
|
greeting: 'Welcome back, Alex',
|
||||||
date: '2026-07-07T08:00:00.000Z',
|
date: '2026-07-07T08:00:00.000Z',
|
||||||
recentWorkspaces: [
|
recentWorkspaces: [
|
||||||
{ id: 'w1', name: 'Alpha', group: 'Personal', lastActive: '2026-07-06T09:00:00.000Z', pendingCount: 0 },
|
{ id: 'w1', name: 'Alpha', group: 'Personal', lastActive: '2026-07-06T09:00:00.000Z', pendingCount: 0 },
|
||||||
@@ -44,7 +44,7 @@ describe('home-cache (Lane H item 1)', () => {
|
|||||||
});
|
});
|
||||||
const got = readHomeCache();
|
const got = readHomeCache();
|
||||||
expect(got).not.toBeNull();
|
expect(got).not.toBeNull();
|
||||||
expect(got!.briefing.greeting).toBe('Welcome back, Marko');
|
expect(got!.briefing.greeting).toBe('Welcome back, Alex');
|
||||||
expect(got!.highlights).toHaveLength(1);
|
expect(got!.highlights).toHaveLength(1);
|
||||||
expect(got!.overnight).toBeNull();
|
expect(got!.overnight).toBeNull();
|
||||||
expect(typeof got!.savedAt).toBe('number');
|
expect(typeof got!.savedAt).toBe('number');
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export function promptArgsForTool(toolId: string, prompt: string): string[] | nu
|
|||||||
case 'claude-code':
|
case 'claude-code':
|
||||||
return ['--print', p];
|
return ['--print', p];
|
||||||
|
|
||||||
// OpenClaw: Claude Code fork (hive-mind-hooks-openclaw exists).
|
// OpenClaw: Claude Code fork.
|
||||||
// Same --print flag inherited from the upstream CLI convention.
|
// Same --print flag inherited from the upstream CLI convention.
|
||||||
case 'openclaw':
|
case 'openclaw':
|
||||||
return ['--print', p];
|
return ['--print', p];
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
*
|
*
|
||||||
* v1 memory is facts, search and the user profile. The knowledge graph follows
|
* v1 memory is facts, search and the user profile. The knowledge graph follows
|
||||||
* the server's memory capability map (`GET /api/memory/capabilities`), which
|
* the server's memory capability map (`GET /api/memory/capabilities`), which
|
||||||
* reports it unavailable in v1. History import, wiki, coding-agent hooks, Room
|
* reports it unavailable in v1. History import, wiki and Room are hidden in v1
|
||||||
* and the memory MCP server are hidden in v1 by decision, whatever the store
|
* by decision, whatever the store supports. Their screens stay in the code and
|
||||||
* supports. Their screens stay in the code and every surface that offers one
|
* every surface that offers one checks this module first. Coding-agent hooks
|
||||||
* checks this module first.
|
* and the memory MCP server left with their packages (P2.2).
|
||||||
*/
|
*/
|
||||||
import { useEffect, useSyncExternalStore } from 'react';
|
import { useEffect, useSyncExternalStore } from 'react';
|
||||||
import { adapter } from '@/lib/adapter';
|
import { adapter } from '@/lib/adapter';
|
||||||
@@ -19,12 +19,8 @@ export interface MemoryFeatures {
|
|||||||
importHistory: boolean;
|
importHistory: boolean;
|
||||||
/** Compiled wiki pages. */
|
/** Compiled wiki pages. */
|
||||||
wiki: boolean;
|
wiki: boolean;
|
||||||
/** Memory hooks installed into Claude Code, Codex and other coding agents. */
|
|
||||||
agentHooks: boolean;
|
|
||||||
/** Waggle Room: coding agents started as a team that shares one Room. */
|
/** Waggle Room: coding agents started as a team that shares one Room. */
|
||||||
room: boolean;
|
room: boolean;
|
||||||
/** The Waggle memory MCP server for other clients. */
|
|
||||||
memoryMcp: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type MemoryFeature = keyof MemoryFeatures;
|
export type MemoryFeature = keyof MemoryFeatures;
|
||||||
@@ -33,9 +29,7 @@ export type MemoryFeature = keyof MemoryFeatures;
|
|||||||
const HIDDEN_IN_V1: Readonly<Record<Exclude<MemoryFeature, 'knowledgeGraph'>, false>> = {
|
const HIDDEN_IN_V1: Readonly<Record<Exclude<MemoryFeature, 'knowledgeGraph'>, false>> = {
|
||||||
importHistory: false,
|
importHistory: false,
|
||||||
wiki: false,
|
wiki: false,
|
||||||
agentHooks: false,
|
|
||||||
room: false,
|
room: false,
|
||||||
memoryMcp: false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let current: MemoryCapabilitiesResponse | null = null;
|
let current: MemoryCapabilitiesResponse | null = null;
|
||||||
|
|||||||
@@ -143,8 +143,8 @@ describe('buildMemoryPreview (round-7 fix 3 — humanized row titles)', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('keeps the remainder as the title when the harvest prefix wraps human text', () => {
|
it('keeps the remainder as the title when the harvest prefix wraps human text', () => {
|
||||||
const { title } = buildMemoryPreview('[Harvest:claude] Marko prefers dark mode across all tools');
|
const { title } = buildMemoryPreview('[Harvest:claude] Alex prefers dark mode across all tools');
|
||||||
expect(title).toBe('Marko prefers dark mode across all tools');
|
expect(title).toBe('Alex prefers dark mode across all tools');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('advances past a harvest lead with no usable remainder to the first human line', () => {
|
it('advances past a harvest lead with no usable remainder to the first human line', () => {
|
||||||
@@ -205,7 +205,7 @@ describe('humanizeMemoryTitle (round-9 Lane C fix 1)', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('leaves ordinary titles untouched with no meta', () => {
|
it('leaves ordinary titles untouched with no meta', () => {
|
||||||
expect(humanizeMemoryTitle('Marko prefers dark mode')).toEqual({ title: 'Marko prefers dark mode' });
|
expect(humanizeMemoryTitle('Alex prefers dark mode')).toEqual({ title: 'Alex prefers dark mode' });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does not strip a handoff prefix down to an empty title', () => {
|
it('does not strip a handoff prefix down to an empty title', () => {
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* W4B (F22) — shared memory-text normalizer for DISPLAY-LAYER dedup.
|
* W4B (F22) — shared memory-text normalizer for DISPLAY-LAYER dedup.
|
||||||
*
|
*
|
||||||
* The substrate (`packages/hive-mind-core/src/mind/frames.ts` `findDuplicate`)
|
* The memory store dedupes only on exact text in the same scope, so two writes that differ by a single
|
||||||
* dedupes only on an exact content hash, so two writes that differ by a single
|
|
||||||
* embedded volatile token — a benchmark/audit-run id, a UUID, a timestamp — land
|
* embedded volatile token — a benchmark/audit-run id, a UUID, a timestamp — land
|
||||||
* as separate frames and surface to the user as near-identical duplicates.
|
* as separate frames and surface to the user as near-identical duplicates.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -33,24 +33,24 @@ describe('buildProfilePreview', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('greets by name with the memory promise when only the name is set', () => {
|
it('greets by name with the memory promise when only the name is set', () => {
|
||||||
expect(buildProfilePreview({ name: 'Marko' }, at(20)))
|
expect(buildProfilePreview({ name: 'Alex' }, at(20)))
|
||||||
.toBe('Good evening, Marko. Your work will be remembered here.');
|
.toBe('Good evening, Alex. Your work will be remembered here.');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('varies the salutation with the time of day', () => {
|
it('varies the salutation with the time of day', () => {
|
||||||
expect(buildProfilePreview({ name: 'Marko' }, at(9))).toMatch(/^Good morning, Marko/);
|
expect(buildProfilePreview({ name: 'Alex' }, at(9))).toMatch(/^Good morning, Alex/);
|
||||||
expect(buildProfilePreview({ name: 'Marko' }, at(14))).toMatch(/^Good afternoon, Marko/);
|
expect(buildProfilePreview({ name: 'Alex' }, at(14))).toMatch(/^Good afternoon, Alex/);
|
||||||
expect(buildProfilePreview({ name: 'Marko' }, at(20))).toMatch(/^Good evening, Marko/);
|
expect(buildProfilePreview({ name: 'Alex' }, at(20))).toMatch(/^Good evening, Alex/);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('adds a role-aware clause from the selected work type', () => {
|
it('adds a role-aware clause from the selected work type', () => {
|
||||||
expect(buildProfilePreview({ name: 'Marko', workType: 'consulting' }, at(20)))
|
expect(buildProfilePreview({ name: 'Alex', workType: 'consulting' }, at(20)))
|
||||||
.toBe('Good evening, Marko. Ready to pick up your consulting work?');
|
.toBe('Good evening, Alex. Ready to pick up your consulting work?');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('falls back to the free-text role when no work type is selected', () => {
|
it('falls back to the free-text role when no work type is selected', () => {
|
||||||
expect(buildProfilePreview({ name: 'Marko', role: 'Strategy Consultant' }, at(9)))
|
expect(buildProfilePreview({ name: 'Alex', role: 'Strategy Consultant' }, at(9)))
|
||||||
.toBe('Good morning, Marko. Ready to pick up your strategy consultant work?');
|
.toBe('Good morning, Alex. Ready to pick up your strategy consultant work?');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('falls back to the raw id for an unknown work-type id', () => {
|
it('falls back to the raw id for an unknown work-type id', () => {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Phase 4.1 unblock — onboarding tier-filter tests.
|
* Phase 4.1 unblock — onboarding tier-filter tests.
|
||||||
*
|
*
|
||||||
* Spec: docs/ux-disclosure-levels.md r2 §"Templates — filter for Essential" + §"Personas — filter for Essential".
|
* Spec: docs/ux-disclosure-levels.md r2 §"Templates — filter for Essential" + §"Personas — filter for Essential".
|
||||||
* Decision (Marko Q1, 2026-05-07): drop `coder` from Essential personas — quote: "this is not the target."
|
* Decision (owner Q1, 2026-05-07): drop `coder` from Essential personas — quote: "this is not the target."
|
||||||
*/
|
*/
|
||||||
import { describe, it, expect } from 'vitest';
|
import { describe, it, expect } from 'vitest';
|
||||||
import {
|
import {
|
||||||
@@ -31,7 +31,7 @@ describe('ESSENTIAL_PERSONA_IDS', () => {
|
|||||||
expect(ESSENTIAL_PERSONA_IDS).toEqual(['general-purpose', 'researcher', 'writer', 'analyst']);
|
expect(ESSENTIAL_PERSONA_IDS).toEqual(['general-purpose', 'researcher', 'writer', 'analyst']);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does NOT include coder (Marko Q1 drop decision)', () => {
|
it('does NOT include coder (owner Q1 drop decision)', () => {
|
||||||
expect(ESSENTIAL_PERSONA_IDS).not.toContain('coder');
|
expect(ESSENTIAL_PERSONA_IDS).not.toContain('coder');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -175,9 +175,9 @@ describe('integration with constants.ts', () => {
|
|||||||
expect(filtered.every(t => typeof t.name === 'string' && t.icon !== undefined)).toBe(true);
|
expect(filtered.every(t => typeof t.name === 'string' && t.icon !== undefined)).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Ljiljana-archetype journey: simple tier + agency-consulting → consultant first, 5 personas total', () => {
|
it('consultant journey: simple tier + agency-consulting → consultant first, 5 personas total', () => {
|
||||||
// The named-user persona Marko anchors against (consulting partner archetype).
|
// The consulting partner archetype.
|
||||||
// This test guards against the "Ljiljana sees 19 personas + 15 templates" regression.
|
// This test guards against the "a non-technical user sees 19 personas + 15 templates" regression.
|
||||||
const templates = getTemplatesForTier('simple', TEMPLATES);
|
const templates = getTemplatesForTier('simple', TEMPLATES);
|
||||||
expect(templates.find(t => t.id === 'agency-consulting')).toBeDefined();
|
expect(templates.find(t => t.id === 'agency-consulting')).toBeDefined();
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,12 @@
|
|||||||
* Live system context: the dock is already filtered by `UserTier` via `TIER_DOCK_CONFIG`
|
* Live system context: the dock is already filtered by `UserTier` via `TIER_DOCK_CONFIG`
|
||||||
* (apps/web/src/lib/dock-tiers.ts). The 0507_s1 brownfield diagnostic identified that
|
* (apps/web/src/lib/dock-tiers.ts). The 0507_s1 brownfield diagnostic identified that
|
||||||
* onboarding's TemplateStep + PersonaStep show ALL options regardless of the tier the
|
* onboarding's TemplateStep + PersonaStep show ALL options regardless of the tier the
|
||||||
* user picked at step 2 — an internal inconsistency that breaks the Ljiljana-bar.
|
* user picked at step 2 — an internal inconsistency that a non-technical user cannot follow.
|
||||||
*
|
*
|
||||||
* This file provides the smallest pure functions to close that gap. Pure helpers
|
* This file provides the smallest pure functions to close that gap. Pure helpers
|
||||||
* keep the test surface trivial; the components import + apply.
|
* keep the test surface trivial; the components import + apply.
|
||||||
*
|
*
|
||||||
* Marko Q1 (2026-05-07): drop `coder` from Essential personas — quote: "this is not
|
* Owner decision Q1 (2026-05-07): drop `coder` from Essential personas — quote: "this is not
|
||||||
* the target, unless you identify this tool can be useful for coders too, which I
|
* the target, unless you identify this tool can be useful for coders too, which I
|
||||||
* don't believe."
|
* don't believe."
|
||||||
*/
|
*/
|
||||||
@@ -24,7 +24,7 @@ import type { OnboardingTemplate, OnboardingPersona } from '@/components/os/over
|
|||||||
* `TEMPLATES` array. Other 12 templates remain reachable via "Show all" toggle.
|
* `TEMPLATES` array. Other 12 templates remain reachable via "Show all" toggle.
|
||||||
*/
|
*/
|
||||||
export const ESSENTIAL_TEMPLATE_IDS = [
|
export const ESSENTIAL_TEMPLATE_IDS = [
|
||||||
'agency-consulting', // Marko's archetype, Ljiljana's role, broadest professional services match
|
'agency-consulting', // consulting archetype, broadest professional services match
|
||||||
'research-project', // Universally useful (HR research, market research, due diligence)
|
'research-project', // Universally useful (HR research, market research, due diligence)
|
||||||
'blank', // Universal escape — any user who doesn't fit a category
|
'blank', // Universal escape — any user who doesn't fit a category
|
||||||
] as const;
|
] as const;
|
||||||
@@ -34,7 +34,7 @@ export const ESSENTIAL_TEMPLATE_IDS = [
|
|||||||
* template (e.g. `consultant` when the template is `agency-consulting`) is added on
|
* template (e.g. `consultant` when the template is `agency-consulting`) is added on
|
||||||
* top by `getPersonasForTier` so users still see the right specialist for their work.
|
* top by `getPersonasForTier` so users still see the right specialist for their work.
|
||||||
*
|
*
|
||||||
* Coder is excluded per Marko Q1 (2026-05-07).
|
* Coder is excluded per owner decision Q1 (2026-05-07).
|
||||||
*/
|
*/
|
||||||
export const ESSENTIAL_PERSONA_IDS = [
|
export const ESSENTIAL_PERSONA_IDS = [
|
||||||
'general-purpose',
|
'general-purpose',
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ import {
|
|||||||
saveMemory,
|
saveMemory,
|
||||||
searchEntities,
|
searchEntities,
|
||||||
getIdentity,
|
getIdentity,
|
||||||
compileWikiSection,
|
|
||||||
getWikiPages,
|
|
||||||
getWikiPage,
|
|
||||||
getWikiPageContent,
|
|
||||||
isFirstLaunch,
|
isFirstLaunch,
|
||||||
markFirstLaunchComplete,
|
markFirstLaunchComplete,
|
||||||
resetFirstLaunch,
|
resetFirstLaunch,
|
||||||
@@ -285,36 +281,6 @@ describe('memory + identity bindings', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('wiki bindings', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
mockedInvoke.mockReset();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('compileWikiSection defaults args + invokes', async () => {
|
|
||||||
mockedInvoke.mockResolvedValue({});
|
|
||||||
await compileWikiSection();
|
|
||||||
expect(mockedInvoke).toHaveBeenCalledWith('compile_wiki_section', {});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('getWikiPages takes no args', async () => {
|
|
||||||
mockedInvoke.mockResolvedValue([]);
|
|
||||||
await getWikiPages();
|
|
||||||
expect(mockedInvoke).toHaveBeenCalledWith('get_wiki_pages');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('getWikiPage passes slug', async () => {
|
|
||||||
mockedInvoke.mockResolvedValue({ slug: 's', title: 't' });
|
|
||||||
await getWikiPage('my-slug');
|
|
||||||
expect(mockedInvoke).toHaveBeenCalledWith('get_wiki_page', { slug: 'my-slug' });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('getWikiPageContent passes slug', async () => {
|
|
||||||
mockedInvoke.mockResolvedValue({ slug: 's', content: '# md' });
|
|
||||||
await getWikiPageContent('my-slug');
|
|
||||||
expect(mockedInvoke).toHaveBeenCalledWith('get_wiki_page_content', { slug: 'my-slug' });
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('onboarding flag bindings (A10)', () => {
|
describe('onboarding flag bindings (A10)', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
mockedInvoke.mockReset();
|
mockedInvoke.mockReset();
|
||||||
|
|||||||
@@ -148,63 +148,6 @@ export function getIdentity(): Promise<IdentityResponse> {
|
|||||||
return invoke<IdentityResponse>('get_identity');
|
return invoke<IdentityResponse>('get_identity');
|
||||||
}
|
}
|
||||||
|
|
||||||
// ─── wiki commands (A4) ────────────────────────────────────────────────────
|
|
||||||
// CC Sesija A §2.1 Task A4. Reads compiled wiki pages from sidecar (sourced
|
|
||||||
// from per-workspace MindDB by packages/wiki-compiler) + triggers compile.
|
|
||||||
|
|
||||||
/**
|
|
||||||
* One entry in the wiki page index from GET /api/wiki/pages. Shape varies by
|
|
||||||
* page type (entity/concept/synthesis); raw fields preserved for the React
|
|
||||||
* adapter to project into typed UI cells.
|
|
||||||
*/
|
|
||||||
export interface WikiPageMeta {
|
|
||||||
slug: string;
|
|
||||||
title?: string;
|
|
||||||
type?: string;
|
|
||||||
[key: string]: unknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface WikiPageContent {
|
|
||||||
slug: string;
|
|
||||||
content: string;
|
|
||||||
[key: string]: unknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** List all compiled wiki pages (slug + metadata, no body). */
|
|
||||||
export function getWikiPages(): Promise<WikiPageMeta[] | { pages: WikiPageMeta[] }> {
|
|
||||||
return invoke<WikiPageMeta[] | { pages: WikiPageMeta[] }>('get_wiki_pages');
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Fetch a single wiki page's metadata by slug. */
|
|
||||||
export function getWikiPage(slug: string): Promise<WikiPageMeta> {
|
|
||||||
return invoke<WikiPageMeta>('get_wiki_page', { slug });
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Fetch the full markdown content for a wiki page by slug. */
|
|
||||||
export function getWikiPageContent(slug: string): Promise<WikiPageContent> {
|
|
||||||
return invoke<WikiPageContent>('get_wiki_page_content', { slug });
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CompileWikiArgs {
|
|
||||||
workspaceId?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sidecar POST /api/wiki/compile triggers wiki-compiler. Response is a summary
|
|
||||||
* envelope from packages/wiki-compiler — exact shape depends on compiler version
|
|
||||||
* (page counts, entity counts, gap reports). Raw shape preserved.
|
|
||||||
*/
|
|
||||||
export interface CompileWikiResponse {
|
|
||||||
pageCount?: number;
|
|
||||||
entityCount?: number;
|
|
||||||
gaps?: number;
|
|
||||||
[key: string]: unknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function compileWikiSection(args: CompileWikiArgs = {}): Promise<CompileWikiResponse> {
|
|
||||||
return invoke<CompileWikiResponse>('compile_wiki_section', args as unknown as Record<string, unknown>);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ─── run_agent_query (streaming) ───────────────────────────────────────────
|
// ─── run_agent_query (streaming) ───────────────────────────────────────────
|
||||||
// CC Sesija A §2.1 Task A3.
|
// CC Sesija A §2.1 Task A3.
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import { pickUserName } from './user-name';
|
|||||||
describe('pickUserName (UF-055)', () => {
|
describe('pickUserName (UF-055)', () => {
|
||||||
it('prefers the name in the profile', () => {
|
it('prefers the name in the profile', () => {
|
||||||
expect(pickUserName('Ana', 'Waggle')).toBe('Ana');
|
expect(pickUserName('Ana', 'Waggle')).toBe('Ana');
|
||||||
expect(pickUserName(' Ana ', 'Marko')).toBe('Ana');
|
expect(pickUserName(' Ana ', 'Alex')).toBe('Ana');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('falls back to a real identity name', () => {
|
it('falls back to a real identity name', () => {
|
||||||
expect(pickUserName('', 'Marko')).toBe('Marko');
|
expect(pickUserName('', 'Alex')).toBe('Alex');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('never returns the assistant default name as the user', () => {
|
it('never returns the assistant default name as the user', () => {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ function renderSidebar() {
|
|||||||
onOpenWorkspaceSwitcher={() => {}}
|
onOpenWorkspaceSwitcher={() => {}}
|
||||||
onOpenCommand={() => {}}
|
onOpenCommand={() => {}}
|
||||||
onSpawnAgent={() => {}}
|
onSpawnAgent={() => {}}
|
||||||
userName="Marko"
|
userName="Alex"
|
||||||
/>
|
/>
|
||||||
</MemoryRouter>,
|
</MemoryRouter>,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ describe('investment celebration — overnight accrual pulse', () => {
|
|||||||
}
|
}
|
||||||
function makeBriefing(over: Partial<HomeBriefing> = {}): HomeBriefing {
|
function makeBriefing(over: Partial<HomeBriefing> = {}): HomeBriefing {
|
||||||
return {
|
return {
|
||||||
greeting: 'Welcome back, Marko',
|
greeting: 'Welcome back, Alex',
|
||||||
date: '2026-07-07T08:00:00.000Z',
|
date: '2026-07-07T08:00:00.000Z',
|
||||||
recentWorkspaces: [wsCard('w1', 'Alpha')],
|
recentWorkspaces: [wsCard('w1', 'Alpha')],
|
||||||
suggestedActions: [],
|
suggestedActions: [],
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ function wsCard(id: string, name: string, pendingCount = 0): RecentWorkspaceCard
|
|||||||
|
|
||||||
function makeBriefing(over: Partial<HomeBriefing> = {}): HomeBriefing {
|
function makeBriefing(over: Partial<HomeBriefing> = {}): HomeBriefing {
|
||||||
return {
|
return {
|
||||||
greeting: 'Welcome back, Marko',
|
greeting: 'Welcome back, Alex',
|
||||||
date: '2026-07-07T08:00:00.000Z',
|
date: '2026-07-07T08:00:00.000Z',
|
||||||
recentWorkspaces: [],
|
recentWorkspaces: [],
|
||||||
suggestedActions: [],
|
suggestedActions: [],
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ const mocks = vi.hoisted(() => ({
|
|||||||
detectTools: vi.fn(),
|
detectTools: vi.fn(),
|
||||||
getToolProcesses: vi.fn(),
|
getToolProcesses: vi.fn(),
|
||||||
launchTool: vi.fn(),
|
launchTool: vi.fn(),
|
||||||
manageHooks: vi.fn(),
|
|
||||||
killTool: vi.fn(),
|
killTool: vi.fn(),
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ afterEach(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('memory feature map (v1 defaults)', () => {
|
describe('memory feature map (v1 defaults)', () => {
|
||||||
it.each<MemoryFeature>(['knowledgeGraph', 'importHistory', 'wiki', 'agentHooks', 'room', 'memoryMcp'])(
|
it.each<MemoryFeature>(['knowledgeGraph', 'importHistory', 'wiki', 'room'])(
|
||||||
'%s is hidden',
|
'%s is hidden',
|
||||||
(feature) => {
|
(feature) => {
|
||||||
expect(hasMemoryFeature(feature)).toBe(false);
|
expect(hasMemoryFeature(feature)).toBe(false);
|
||||||
@@ -68,7 +68,7 @@ describe('memory feature map from the server capabilities', () => {
|
|||||||
|
|
||||||
it('keeps import, wiki, hooks, Room and the memory MCP hidden whatever the store reports', () => {
|
it('keeps import, wiki, hooks, Room and the memory MCP hidden whatever the store reports', () => {
|
||||||
setMemoryCapabilities(report(true));
|
setMemoryCapabilities(report(true));
|
||||||
for (const feature of ['importHistory', 'wiki', 'agentHooks', 'room', 'memoryMcp'] as const) {
|
for (const feature of ['importHistory', 'wiki', 'room'] as const) {
|
||||||
expect(hasMemoryFeature(feature), feature).toBe(false);
|
expect(hasMemoryFeature(feature), feature).toBe(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ describe('Onboarding ImportStep', () => {
|
|||||||
claudeCodeDetected: {
|
claudeCodeDetected: {
|
||||||
found: true,
|
found: true,
|
||||||
itemCount: 5514,
|
itemCount: 5514,
|
||||||
path: 'C:/Users/Marko/.claude/projects',
|
path: 'C:/Users/Alex/.claude/projects',
|
||||||
},
|
},
|
||||||
onClaudeCodeHarvest,
|
onClaudeCodeHarvest,
|
||||||
onContinue,
|
onContinue,
|
||||||
@@ -55,7 +55,7 @@ describe('Onboarding ImportStep', () => {
|
|||||||
claudeCodeDetected: {
|
claudeCodeDetected: {
|
||||||
found: true,
|
found: true,
|
||||||
itemCount: 12,
|
itemCount: 12,
|
||||||
path: 'C:/Users/Marko/.claude/projects',
|
path: 'C:/Users/Alex/.claude/projects',
|
||||||
},
|
},
|
||||||
onClaudeCodeHarvest,
|
onClaudeCodeHarvest,
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ function httpError(status: number, message = `HTTP ${status}`) {
|
|||||||
|
|
||||||
const RAW_ISO = '2026-06-11T07:42:13.512Z';
|
const RAW_ISO = '2026-06-11T07:42:13.512Z';
|
||||||
const briefing = (over: Record<string, unknown> = {}) => ({
|
const briefing = (over: Record<string, unknown> = {}) => ({
|
||||||
greeting: "Good morning, Marko. Here's your day",
|
greeting: "Good morning, Alex. Here's your day",
|
||||||
userName: 'Marko',
|
userName: 'Alex',
|
||||||
date: RAW_ISO,
|
date: RAW_ISO,
|
||||||
recentWorkspaces: [],
|
recentWorkspaces: [],
|
||||||
suggestedActions: [],
|
suggestedActions: [],
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ describe('PR7b · /auth — B1 accountless (no Clerk key)', () => {
|
|||||||
render(<MemoryRouter><AuthRoute /></MemoryRouter>);
|
render(<MemoryRouter><AuthRoute /></MemoryRouter>);
|
||||||
expect(screen.getByText(/running fully local/i)).toBeInTheDocument();
|
expect(screen.getByText(/running fully local/i)).toBeInTheDocument();
|
||||||
expect(screen.getByText(/don.t need this to start/i)).toBeInTheDocument();
|
expect(screen.getByText(/don.t need this to start/i)).toBeInTheDocument();
|
||||||
expect(screen.queryByText(/mara@egzakta/i)).not.toBeInTheDocument();
|
expect(screen.queryByText(/@egzakta\.com/i)).not.toBeInTheDocument();
|
||||||
expect(screen.queryByTestId('clerk-signin')).not.toBeInTheDocument();
|
expect(screen.queryByTestId('clerk-signin')).not.toBeInTheDocument();
|
||||||
expect(screen.queryByText(/signed in/i)).not.toBeInTheDocument();
|
expect(screen.queryByText(/signed in/i)).not.toBeInTheDocument();
|
||||||
});
|
});
|
||||||
@@ -76,7 +76,7 @@ describe('PR7b · /auth — B2 Clerk form (explicitly enabled + key present)', (
|
|||||||
const signin = screen.getByTestId('clerk-signin');
|
const signin = screen.getByTestId('clerk-signin');
|
||||||
expect(signin).toBeInTheDocument();
|
expect(signin).toBeInTheDocument();
|
||||||
expect(signin).toHaveAttribute('data-redirect', '/home');
|
expect(signin).toHaveAttribute('data-redirect', '/home');
|
||||||
expect(screen.queryByText(/mara@egzakta/i)).not.toBeInTheDocument();
|
expect(screen.queryByText(/@egzakta\.com/i)).not.toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('toggles to Sign up (with the honey local-first note) and back', async () => {
|
it('toggles to Sign up (with the honey local-first note) and back', async () => {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ function renderAt(pathname: string) {
|
|||||||
onOpenWorkspaceSwitcher={() => {}}
|
onOpenWorkspaceSwitcher={() => {}}
|
||||||
onOpenCommand={() => {}}
|
onOpenCommand={() => {}}
|
||||||
onSpawnAgent={() => {}}
|
onSpawnAgent={() => {}}
|
||||||
userName="Marko"
|
userName="Alex"
|
||||||
/>
|
/>
|
||||||
</MemoryRouter>,
|
</MemoryRouter>,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ function renderSidebar() {
|
|||||||
onOpenWorkspaceSwitcher={() => {}}
|
onOpenWorkspaceSwitcher={() => {}}
|
||||||
onOpenCommand={() => {}}
|
onOpenCommand={() => {}}
|
||||||
onSpawnAgent={() => {}}
|
onSpawnAgent={() => {}}
|
||||||
userName="Marko"
|
userName="Alex"
|
||||||
/>
|
/>
|
||||||
</MemoryRouter>,
|
</MemoryRouter>,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
# Waggle Landing Page Environment
|
|
||||||
|
|
||||||
# Public landing page API (legacy Vite var — read by src/components/Pricing.tsx
|
|
||||||
# until §2 ports it to NEXT_PUBLIC_API_URL).
|
|
||||||
VITE_API_URL=https://cloud.waggle-os.ai
|
|
||||||
|
|
||||||
# Stripe checkout — placeholder values trip a "configuration required" guard
|
|
||||||
# in /api/stripe/checkout instead of attempting a real Stripe call. Real keys
|
|
||||||
# are a Marko-side pre-launch action; do NOT commit live secrets here.
|
|
||||||
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_REPLACE_ME
|
|
||||||
STRIPE_SECRET_KEY=sk_test_REPLACE_ME
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
# =============================================================================
|
|
||||||
# Waggle www — env template
|
|
||||||
# =============================================================================
|
|
||||||
# Copy to `.env.local` and fill in real values. `.env.local` is gitignored.
|
|
||||||
# All NEXT_PUBLIC_* vars are exposed to the client bundle; never put secrets
|
|
||||||
# behind that prefix.
|
|
||||||
# =============================================================================
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Clerk auth
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Publishable key from Clerk dashboard → API Keys. Starts with `pk_test_` (dev)
|
|
||||||
# or `pk_live_` (prod).
|
|
||||||
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_xxxxx
|
|
||||||
|
|
||||||
# Secret key from Clerk dashboard → API Keys. Starts with `sk_test_` (dev)
|
|
||||||
# or `sk_live_` (prod). Never expose to client.
|
|
||||||
CLERK_SECRET_KEY=sk_test_xxxxx
|
|
||||||
|
|
||||||
# Hosted-flow redirect targets. `/` falls back to landing for sign-in/up
|
|
||||||
# completion; route-level redirects can override per request.
|
|
||||||
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
|
|
||||||
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
|
|
||||||
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/
|
|
||||||
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/
|
|
||||||
|
|
||||||
# Clerk webhook signing secret. Get from Clerk dashboard → Webhooks → endpoint.
|
|
||||||
# Starts with `whsec_`. Used by svix to verify `user.created` etc.
|
|
||||||
CLERK_WEBHOOK_SECRET=whsec_xxxxx
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Stripe (Connected linkage — Stripe Customer ID stored in Clerk publicMetadata)
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Secret key from Stripe dashboard → Developers → API keys.
|
|
||||||
STRIPE_SECRET_KEY=sk_test_xxxxx
|
|
||||||
|
|
||||||
# Webhook signing secret from Stripe dashboard → Webhooks → endpoint.
|
|
||||||
STRIPE_WEBHOOK_SECRET=whsec_xxxxx
|
|
||||||
|
|
||||||
# Stripe price IDs (tier × billing cycle). Provision via Stripe CLI:
|
|
||||||
# stripe prices create --product=<prod_id> --unit-amount=<cents> \
|
|
||||||
# --currency=usd --recurring.interval=month|year \
|
|
||||||
# --lookup-key=<tier>_<billing> -d "metadata[tier]=<tier>" \
|
|
||||||
# -d "metadata[billing]=<billing>"
|
|
||||||
# Code resolves IDs by lookup_key at runtime; env vars are explicit pinning.
|
|
||||||
# LEGACY: Pro is no longer a sold tier (new checkout is Team-only). These
|
|
||||||
# vars are retained only so legacy Pro subscription webhooks keep resolving.
|
|
||||||
STRIPE_PRICE_PRO_MONTHLY=price_xxxxx
|
|
||||||
STRIPE_PRICE_PRO_ANNUAL=price_xxxxx
|
|
||||||
STRIPE_PRICE_TEAMS_MONTHLY=price_xxxxx
|
|
||||||
STRIPE_PRICE_TEAMS_ANNUAL=price_xxxxx
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 988 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 984 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 967 KiB |
@@ -1,69 +0,0 @@
|
|||||||
# Lighthouse Audit — Sesija D §3.3 Final Pass
|
|
||||||
|
|
||||||
**Date:** 2026-05-03
|
|
||||||
**Build:** Next.js 15.5.15 production (`next build` + `next start -p 8005`)
|
|
||||||
**Audit tool:** `npx lighthouse@13.2.0 --chrome-flags="--headless=new --no-sandbox"`
|
|
||||||
**Page:** `http://localhost:8005/` (homepage, Variant A default)
|
|
||||||
|
|
||||||
## Scores (acceptance threshold: ≥85 / ≥95 / ≥95)
|
|
||||||
|
|
||||||
| Category | Score | Threshold | Status |
|
|
||||||
|----------------|--------|-----------|--------|
|
|
||||||
| Performance | **96** | ≥85 | ✅ |
|
|
||||||
| Accessibility | **96** | ≥95 | ✅ |
|
|
||||||
| SEO | **100**| ≥95 | ✅ |
|
|
||||||
|
|
||||||
## Core Web Vitals (final)
|
|
||||||
|
|
||||||
| Metric | Value | Score |
|
|
||||||
|---------------------------------|-------|-------|
|
|
||||||
| First Contentful Paint (FCP) | 1.2 s | 99 |
|
|
||||||
| Largest Contentful Paint (LCP) | 2.7 s | 86 |
|
|
||||||
| Total Blocking Time (TBT) | 20 ms | 100 |
|
|
||||||
| Cumulative Layout Shift (CLS) | 0.054 | 98 |
|
|
||||||
| Speed Index | 1.2 s | 100 |
|
|
||||||
|
|
||||||
## Two fixes that mattered
|
|
||||||
|
|
||||||
**1. Layout head fix — SEO 91 → 100.**
|
|
||||||
Next.js 15 + React 19 streaming SSR pushed `<title>` and `<meta name="description"` into `<body>` (byte 69244+) for client-side hoist via React 19 metadata API. Lighthouse SEO audits the initial HTML head pre-hoist and scored `meta-description` as 0. Fix: render explicit `<title>` + `<meta>` JSX inside `<head>` element in `app/layout.tsx`, using module-level constants (not JSX literals — strict criterion #11 satisfied). Strings duplicated between `metadata` const + JSX head; the static metadata API still feeds crawlers that respect React's hoist while the JSX head guarantees first-byte placement.
|
|
||||||
|
|
||||||
**2. Lazy-loaded persona + step images — Performance 74 → 96 (+22).**
|
|
||||||
Next.js auto-preloads the first ~5 above-fold images detected as LCP candidates. With 13 persona PNGs in `BrandPersonasCard` + 3 bee PNGs in `HowItWorks` rendered as `<img loading="eager">`, Next.js was preloading 5 below-fold persona images and blocking the H1 LCP measurement (reported 66.5 s — animation/preload measurement artifact). Adding `loading="lazy"` + `decoding="async"` to all below-fold `<img>` tags eliminated the preloads; LCP dropped to 2.7 s.
|
|
||||||
|
|
||||||
## Sub-100 audits (passing thresholds, but room for v1.5)
|
|
||||||
|
|
||||||
**Accessibility (96)**
|
|
||||||
- 4 instances of color contrast under 4.5:1: `--hive-400` (#5a6380) used at small font sizes (9-11px) on dark backgrounds:
|
|
||||||
- Navbar `v1.0` version pill (contrast 2.89)
|
|
||||||
- HeroVisual window strip "local · signed · 42ms" (3.09)
|
|
||||||
- HeroVisual stat strip labels "EDGES / PROVIDERS / P99 RECALL / CLOUD CALLS" (3.28)
|
|
||||||
- v1.5 fix: bump to `--hive-300` (#7d869e) at small sizes, OR raise to 12px+ where contrast permits.
|
|
||||||
|
|
||||||
**Performance (96)**
|
|
||||||
- "Reduce unused JavaScript" at score 50 — next-intl + Inter font ship more bytes than strictly needed for a single-locale, three-weight typography use. Tree-shaking next-intl messages that aren't used at runtime is a v1.5 task.
|
|
||||||
- "Improve image delivery" at 50 — bee PNGs are 2x retina pre-rendered. Switching to `<Image>` from `next/image` would auto-convert to AVIF/WebP and serve responsive srcsets. Larger refactor (13 personas) deferred.
|
|
||||||
- "Page prevented back/forward cache restoration" at 0 — the `Cache-Control: no-store` from dynamic `/` route (because of `searchParams`) prevents bfcache. Could be mitigated by switching variant resolution to client-side only (with SSR fallback to A) so `/` becomes static. Deferred to v1.5.
|
|
||||||
|
|
||||||
## Methodology + reproducibility
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd apps/www
|
|
||||||
npx next build
|
|
||||||
npx next start -p 8005 &
|
|
||||||
npx lighthouse http://localhost:8005/ \
|
|
||||||
--output=json \
|
|
||||||
--output-path=./lighthouse-report.json \
|
|
||||||
--only-categories=performance,accessibility,seo \
|
|
||||||
--chrome-flags="--headless=new --no-sandbox"
|
|
||||||
```
|
|
||||||
|
|
||||||
`lighthouse-report.json` is gitignored (regenerable artifact, ~600 KB). Run the command above to reproduce.
|
|
||||||
|
|
||||||
**Localhost vs production caveat:** Lighthouse run against localhost has known measurement discrepancies (zero network latency confuses some metrics; the LCP=66.5s pre-fix was a preload-timing artifact). Production CDN / Vercel deployment typically scores **+5 to +10** points across Performance vs the same build on localhost. The 96 / 96 / 100 here is therefore a conservative floor — production should match or exceed.
|
|
||||||
|
|
||||||
## Acceptance — amendment §3 #16
|
|
||||||
|
|
||||||
> "Lighthouse audit: Performance ≥85, Accessibility ≥95, SEO ≥95"
|
|
||||||
|
|
||||||
✅ All three thresholds met on local prod build. Re-measure on Vercel preview before launch as final confirmation.
|
|
||||||
@@ -1,119 +0,0 @@
|
|||||||
# Sesija D Manifest — apps/www Next.js Port v3.2
|
|
||||||
|
|
||||||
**Date:** 2026-05-03
|
|
||||||
**Branch:** main (+11 commits ahead of origin/main at start of Sesija D, +20 at end)
|
|
||||||
**Mode:** SUPPORT (work main directly, commit per logical milestone)
|
|
||||||
**Brief:** `PM-Waggle-OS/briefs/2026-04-25-cc1-apps-www-nextjs-port-brief.md` + `2026-05-02-cc-sesija-D-apps-www-port-v3.2-amendment.md`
|
|
||||||
**Cost cap:** $10 hard / $8 halt
|
|
||||||
**Actual cost:** $0 LLM spend (pure file/build/lighthouse ops — no eval, no LLM-heavy operations)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Commit ledger (12 commits, 11 CC + 1 Marko mid-session)
|
|
||||||
|
|
||||||
| # | SHA | Phase | Description |
|
|
||||||
|---|---|---|---|
|
|
||||||
| 1 | `9a6729b` | §1 | Scaffold Next.js 15 App Router migration (Vite 6 → Next 15.5.15) |
|
|
||||||
| 2 | `e20477f` | §2.1 | Drop 4 components (Features/CrownJewels/Enterprise/BetaSignup) + relocate personas/BrandPersonasCard into app/ |
|
|
||||||
| 3 | `b8a0020` | §2.2 | NEW lib + data + 6 server components + HeroVisual + DownloadCTA |
|
|
||||||
| 4 | `b5c3916` | §2.3 | Port Navbar + Pricing (client) into app/_components/ |
|
|
||||||
| 5 | `c4b0c04` | §2.4 | Wire app/page.tsx with 8-section landing + cleanup legacy src/ |
|
|
||||||
| 6 | `5464891` | §3.1 | Internal /api/stripe/checkout route + placeholder env guard |
|
|
||||||
| 7 | `9d7f5c9` | §3.2 | next-intl + full i18n extraction (~190 keys, strict #11) |
|
|
||||||
| 8 | `b716b04` | §3.3 | Lighthouse audit pass — Performance 96 / Accessibility 96 / SEO 100 |
|
|
||||||
| — | `7d1e0fc` | (Marko) | docs: add methodology documentation (211-line docs/methodology.md at repo root) |
|
|
||||||
| 9 | `8ecddff` | §3.4 | Path D landing decoupling — arxiv → methodology in Trust + Footer |
|
|
||||||
| 10 | `c353e49` | §4 | Initial verification artifacts: variant smoke + 3 full-page screenshots + manifest |
|
|
||||||
| 11 | (this) | §4.1 | NEW /docs/methodology Next.js route (react-markdown + remark-gfm) + app/sitemap.ts + 4th screenshot |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Acceptance criteria — amendment §3 (16 items)
|
|
||||||
|
|
||||||
| # | Criterion | Status | Evidence |
|
|
||||||
|---|---|---|---|
|
|
||||||
| 1 | 8 sections in locked IA order (Hero → Proof → How → Personas → Pricing → Trust → Final CTA → Footer) | ✅ | `app/page.tsx` composes in declared order; verified visually in 3 screenshots |
|
|
||||||
| 2 | 5 hero variants resolvable via `?p=` + `utm_source` | ✅ | §4.1 smoke: A default ✓ / B `?p=compliance` ✓ / C `?p=founder` ✓ / D `?p=developer` ✓ / E `?utm_source=legal-tech` ✓ |
|
|
||||||
| 3 | Hero microcopy lock #1 (`17 AI platforms · Local-first · Apache 2.0 · EU AI Act ready`) | ✅ | `messages/en.json` `landing.hero.microcopy` |
|
|
||||||
| 4 | Hero diagram bottom stats lock #2 (`17 PROVIDERS`, not `4 PROVIDERS`) | ✅ | `messages/en.json` `landing.hero_visual.stats.providers_value: "17"` |
|
|
||||||
| 5 | Proof Card 1 = GEPA `+12.5pp` (Trio-strict 33.5% dropped) | ✅ | `app/_data/proof-points.ts` first card; rendered in screenshots |
|
|
||||||
| 6 | Proof Card 2 description lock #4 (`Substrate beats Mem0 paper by 7.1 points on LoCoMo.`) | ✅ | `app/_data/proof-points.ts` LoCoMo card |
|
|
||||||
| 7 | Step 02 ending lock #5 (`...persists across providers, sessions, and machines, automatically.`) | ✅ | `messages/en.json` `landing.how_it_works.step_02.body` |
|
|
||||||
| 8 | 13 personas per LOCK 2026-04-22 (Sleeping #13, Sovereign tile NOT added — Edit 5 RESCINDED) | ✅ | `app/_data/personas.ts` unchanged; `BrandPersonasCard` renders 13 + 3 fillers in 4×4 grid |
|
|
||||||
| 9 | Final CTA subhead lock #6 (`...KVARK for sovereign deployments.`) | ✅ | `messages/en.json` `landing.final_cta.subhead` |
|
|
||||||
| 10 | KVARK bridge in Final CTA (one sentence + one CTA) | ✅ | `app/_components/FinalCTA.tsx` `kvarkBridgeStyle` block |
|
|
||||||
| 11 | All copy extracted to `messages/en.json` under `landing.*` namespace; STRICT no string literal in JSX | ✅ | ~190 keys; vitest 10/10 passes with mocked t() |
|
|
||||||
| 12 | Stripe checkout via internal `/api/stripe/checkout` (NOT external cloud.waggle-os.ai) | ✅ | `app/api/stripe/checkout/route.ts`; Pricing POSTs to relative path; 503 with placeholder env vars per §0.b |
|
|
||||||
| 13 | OS detection on Hero / Solo tier / Final CTA primaries | ✅ | `app/_components/DownloadCTA.tsx` (3 sections wired with `section` prop) |
|
|
||||||
| 14 | Hive pulse animation + `prefers-reduced-motion` suppression | ✅ | `app/_components/HeroVisual.tsx` scoped CSS `@media (prefers-reduced-motion: reduce)` |
|
|
||||||
| 15 | Build clean, lint clean, vitest 100% green | ✅ | `next build` → 6 routes; `tsc --noEmit` silent; `vitest run` 10/10 |
|
|
||||||
| 16 | Lighthouse: Performance ≥85, Accessibility ≥95, SEO ≥95 | ✅ | **96 / 96 / 100** on local prod; see `LIGHTHOUSE.md` for full report |
|
|
||||||
|
|
||||||
**16 / 16 PASS.**
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Out of scope (per amendment §5, OUT-of-scope locked)
|
|
||||||
|
|
||||||
- ThemeToggle / light mode / `[data-theme="light"]` block (v1.5 deferred)
|
|
||||||
- MPEG-4 hero loop placeholder (post-launch fast-follow; HeroVisual ships SVG diagram per §2.2)
|
|
||||||
- A/B testing framework (post-launch)
|
|
||||||
- Server-side rendering of hero variants — variant resolver runs server-side from `searchParams` (acceptable for v1; Next.js App Router idiom)
|
|
||||||
- Marketing email integration (BetaSignup component dropped per §2.1; CTA conversion handled by Pricing flow)
|
|
||||||
- Analytics provider integration (event-taxonomy stub only — `console.info` in dev, no-op in prod)
|
|
||||||
- Cookie banner cross-domain tracking persistence
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Day-2 polish backlog (carryover for Marko ratification)
|
|
||||||
|
|
||||||
| Item | Severity | Source | Notes |
|
|
||||||
|---|---|---|---|
|
|
||||||
| `--hive-400` (#5a6380) contrast at 9-11px sizes | low | Lighthouse a11y sub-100 | 4 instances: navbar v1.0 pill, HeroVisual window strip, stat strip labels. Bump to `--hive-300` or font-size to 12px+. |
|
|
||||||
| `next/image` migration for 13 persona PNGs | medium | Lighthouse "Improve image delivery" 50 | AVIF/WebP auto-conversion + responsive srcsets. ~200 line refactor. |
|
|
||||||
| `/` route bfcache restoration | low | Lighthouse perf sub-100 | Currently 0 due to `Cache-Control: no-store` on dynamic searchParams route. Move variant resolver client-side to keep `/` static. |
|
|
||||||
| next-intl message tree-shaking | low | Lighthouse "Reduce unused JS" 50 | next-intl ships full message bundle to client. v1.5 audit. |
|
|
||||||
| ~~`/docs/methodology` route handler~~ | ✅ resolved | §4.1 PM ratify | Shipped in §4.1 — `app/docs/methodology/page.tsx` reads `docs/methodology.md` at build (force-static) via react-markdown + remark-gfm. Live at `waggle-os.ai/docs/methodology` once deployed. |
|
|
||||||
| Vercel preview Lighthouse re-measure | medium | §3.3 carryover | Local 96/96/100 is conservative floor; production CDN typically +5-10. Re-measure on Vercel preview before launch as final confirmation. |
|
|
||||||
| Stripe real keys + live price IDs | high (pre-launch) | §0.b ratification | Marko-side action Monday 2026-05-03 with finance team. Replace `sk_test_REPLACE_ME` / `pk_test_REPLACE_ME` + populate `STRIPE_PRICE_{PRO,TEAMS}_{MONTHLY,ANNUAL}` env vars. Route auto-stops returning 503 once real keys are in place. |
|
|
||||||
| Sign-in flow | low (post-launch) | navbar | Currently `href="#"` placeholder. Auth provider + sign-in page defer to post-launch. |
|
|
||||||
| `BrandPersonasCard.tsx` font-family inheritance | low | spotted in §3.3 polish | One sub-100 a11y issue is a contrast finding; the broader fix (centralize all typography on `var(--font-inter)` rather than fallback `'Inter', system-ui, sans-serif` strings scattered through components) is a v1.5 simplification. |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Verification artifacts
|
|
||||||
|
|
||||||
- **Build output:** `next build` produces **8 routes** (`/` ƒ Dynamic 8.96kB / 127kB First Load · `/_not-found` ○ Static 989B · `/api/stripe/checkout` ƒ Dynamic 129B · `/design/personas` ○ Static 2.98kB · `/docs/methodology` ○ Static 129B / 102kB · `/sitemap.xml` ○ Static).
|
|
||||||
- **Tests:** `npx vitest run` → 10/10 BrandPersonasCard tests pass.
|
|
||||||
- **Typecheck:** `npx tsc --noEmit` → clean (silent).
|
|
||||||
- **Lighthouse:** local prod build at port 8005 — **Perf 96 / A11y 96 / SEO 100**. Full report in `apps/www/LIGHTHOUSE.md`.
|
|
||||||
- **Variant smoke:** all 5 (A/B/C/D/E) resolve correctly, eyebrow text matched per variant via `?p=` or `utm_source` param.
|
|
||||||
- **Screenshots:** `apps/www/.screenshots/` contains **4 full-page PNGs** at 1440×900 (variant A default + variant B compliance + variant E legal-tech + `/docs/methodology` page). Mid-page persona tiles render lazy-loaded; this is intentional design — `loading="lazy"` was the perf fix that boosted LCP from 66.5s → 2.7s.
|
|
||||||
- **Sitemap:** `app/sitemap.ts` auto-generates `/sitemap.xml` with 2 entries (homepage priority 1.0 weekly + `/docs/methodology` priority 0.7 monthly). `/design/personas` intentionally omitted (robots-blocked playground).
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Repo state at end of Sesija D
|
|
||||||
|
|
||||||
- `apps/www/src/` is **empty** (all 9 legacy components either dropped per §2.1 or ported into `app/_components/` via §2.2 + §2.3).
|
|
||||||
- `apps/www/vite-env.d.ts` deleted (no more `import.meta.env` consumers).
|
|
||||||
- `apps/www/app/` houses everything: `_components/` (12 files) + `_data/` (3 files) + `_lib/` (3 files) + `api/stripe/checkout/route.ts` + `design/personas/` (preview playground + 2 PNGs) + `docs/methodology/page.tsx` (NEW §4.1) + `sitemap.ts` (NEW §4.1) + `globals.css` + `layout.tsx` + `page.tsx`.
|
|
||||||
- `apps/www/messages/en.json` is the canonical i18n source (~190 keys).
|
|
||||||
- `apps/www/i18n/request.ts` configures next-intl single-locale (`en`).
|
|
||||||
- `apps/www/LIGHTHOUSE.md` documents the audit + remediation backlog.
|
|
||||||
- Branch +20 commits ahead of `origin/main` (12 pre-Sesija D + 8 CC commits + 1 Marko commit + this manifest commit).
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Standing-down
|
|
||||||
|
|
||||||
Sesija D scope per amendment delivered in 9 commits (10 with Marko's methodology.md mid-session). All 16 amendment §3 acceptance criteria meet thresholds. Build green, types green, tests green, Lighthouse green.
|
|
||||||
|
|
||||||
PM Pass 8 ready. Marko-side actions before Day 0 launch:
|
|
||||||
1. Push `main` to `origin/main` (currently +22 ahead)
|
|
||||||
2. Wire real Stripe keys in production env (Vercel/Cloudflare/wherever production lands)
|
|
||||||
3. Re-measure Lighthouse on Vercel preview as final confirmation (re-test `/docs/methodology` since it's now a real route, not just a planned link)
|
|
||||||
4. Resolve sign-in flow CTA (currently `#` placeholder)
|
|
||||||
5. Confirm `docs/methodology.md` content is locked before deploy (currently labeled "Status: Draft for github commit") — methodology page bakes this content at build time, so updates require a rebuild + redeploy.
|
|
||||||
|
|
||||||
Cost cap unspent. Standing down.
|
|
||||||
@@ -1,188 +0,0 @@
|
|||||||
# Sesija E Manifest — Clerk auth + Stripe-Clerk linkage + branding fixes
|
|
||||||
|
|
||||||
**Date:** Started 2026-05-03, last entry 2026-05-04
|
|
||||||
**Branch:** main (SUPPORT mode — work main directly, commit per logical milestone)
|
|
||||||
**Brief:** CC Sesija E — Clerk auth + Stripe-Clerk linkage + FR Pass8-A logo fix
|
|
||||||
**Cost cap:** $15 hard / $12 halt
|
|
||||||
**Status:** §5.0–§5.3 COMPLETE · §5.4 / §5.5 / §5.6 PENDING
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Commit ledger (4 commits to date — extends through §5.6)
|
|
||||||
|
|
||||||
| # | SHA | Phase | Description |
|
|
||||||
|---|---|---|---|
|
|
||||||
| 1 | `4365897` | §5.0 | Scaffold Clerk integration (deps + middleware + ClerkProvider in layout) |
|
|
||||||
| 2 | `d281a86` | §5.1 + §5.2 | Wire Clerk auth UI in navbar + account page (`SignedIn` / `SignedOut`, `/account` `UserProfile`) |
|
|
||||||
| 3 | `0147d6c` | §5.3 Phase A | Provision Stripe test-mode prices via CLI — Path A idempotent reuse, no new products created |
|
|
||||||
| 4 | `a087cf6` | §5.3 Phase C | Connect Stripe Customer to Clerk user.publicMetadata via lazy-create pattern; add webhook handler |
|
|
||||||
| 5 | (this) | §5.3 Phase E | Manifest + smoke-test instructions |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## §5.3 Stripe catalog state (test mode, account `acct_1SzHlbC0mmjh4oEM`)
|
|
||||||
|
|
||||||
| Lookup key | Price ID | Amount | Product | Metadata |
|
|
||||||
|---|---|---|---|---|
|
|
||||||
| `pro_monthly` | `price_1TNZfkC0mmjh4oEMGAZ2PDbc` | $19/mo | `prod_UMIG4B7V0Ke6zQ` (Waggle Pro) | tier=pro, billing=monthly |
|
|
||||||
| `pro_annual` | `price_1TTN4FC0mmjh4oEMyaEX40Kl` | $190/yr | `prod_UMIG4B7V0Ke6zQ` (Waggle Pro) | tier=pro, billing=annual |
|
|
||||||
| `teams_monthly` | `price_1TNZfpC0mmjh4oEMH10c02YB` | $49/mo | `prod_UMIGZ99xtazCAs` (Waggle Teams) | tier=teams, billing=monthly, seat_minimum=3 |
|
|
||||||
| `teams_annual` | `price_1TTN4HC0mmjh4oEMsgKwV1MY` | $490/yr | `prod_UMIGZ99xtazCAs` (Waggle Teams) | tier=teams, billing=annual, seat_minimum=3 |
|
|
||||||
|
|
||||||
**Archived in Phase A** (older 2026-04-08 duplicates, no longer active):
|
|
||||||
|
|
||||||
- `prod_UG0WP8RCBvaiQ2` (Waggle Teams 2026-04-08, wrong amount)
|
|
||||||
- `prod_UG0Wk4DLVpsRwf` (Waggle Basic 2026-04-08, no longer in tier roadmap)
|
|
||||||
|
|
||||||
Recreating these IDs on a new Stripe account: see `apps/www/.env.local.example` for the CLI provisioning command template.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## §5.3 Phase B — Local webhook listener (Marko-side, separate terminal)
|
|
||||||
|
|
||||||
For local dev webhook testing, run in a terminal separate from `next dev`:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
cd D:\Projects\waggle-os
|
|
||||||
stripe listen --forward-to localhost:3001/api/webhooks/stripe --print-secret
|
|
||||||
```
|
|
||||||
|
|
||||||
Stripe CLI prints the signing secret (`whsec_...`) on first run — paste
|
|
||||||
it into `apps/www/.env.local` as `STRIPE_WEBHOOK_SECRET=whsec_...`. Leave
|
|
||||||
the listener running for the duration of the test session; the secret
|
|
||||||
itself is stable across restarts of the same `stripe listen` invocation.
|
|
||||||
|
|
||||||
**Why CC didn't run this:** `stripe listen` is a long-running process. CC
|
|
||||||
sessions can't host indefinitely-blocking foreground commands without
|
|
||||||
losing the rest of the conversation, so this is documented for Marko to
|
|
||||||
run instead. The webhook handler at `apps/www/app/api/webhooks/stripe/route.ts`
|
|
||||||
is fully implemented and waiting to receive deliveries once the secret
|
|
||||||
is pasted and the listener is up.
|
|
||||||
|
|
||||||
**Production webhook setup is Marko-side ponedeljak 14:00:**
|
|
||||||
|
|
||||||
1. Stripe Dashboard → Developers → Webhooks → "Add endpoint".
|
|
||||||
2. Endpoint URL: `https://waggle-os.ai/api/webhooks/stripe` (or whichever production deploy URL).
|
|
||||||
3. Subscribe to events: `checkout.session.completed`, `customer.subscription.updated`, `customer.subscription.deleted`.
|
|
||||||
4. Copy the new endpoint's signing secret into the production env as
|
|
||||||
`STRIPE_WEBHOOK_SECRET=whsec_...` (production secret is **different**
|
|
||||||
from the local `stripe listen` secret).
|
|
||||||
5. Live key swap: replace `STRIPE_SECRET_KEY=sk_test_...` with
|
|
||||||
`STRIPE_SECRET_KEY=sk_live_...` in production env. The route accepts
|
|
||||||
both `sk_test_*` and `sk_live_*` automatically — no code changes
|
|
||||||
required.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## §5.3 Phase E — End-to-end smoke test
|
|
||||||
|
|
||||||
**Pre-conditions** (run once, then leave running):
|
|
||||||
|
|
||||||
| | Action |
|
|
||||||
|---|---|
|
|
||||||
| 1 | `STRIPE_SECRET_KEY=sk_test_*` (real value, not placeholder) is in `apps/www/.env.local` |
|
|
||||||
| 2 | `STRIPE_WEBHOOK_SECRET=whsec_*` (from `stripe listen --print-secret`) is in `apps/www/.env.local` |
|
|
||||||
| 3 | All 4 `STRIPE_PRICE_*` IDs in `apps/www/.env.local` (already done in §5.3 Phase A) |
|
|
||||||
| 4 | Terminal 1 — Next.js dev server running. Either `cd D:\Projects\waggle-os\apps\www && npx next dev -H 0.0.0.0 -p 3001`, or from repo root `npm run dev -w apps/www -- -H 0.0.0.0 -p 3001` (`-w` is the npm workspace flag; `--` separates npm args from forwarded script args). |
|
|
||||||
| 5 | Terminal 2 — `stripe listen --forward-to localhost:3001/api/webhooks/stripe` is running |
|
|
||||||
|
|
||||||
**Browser walkthrough:**
|
|
||||||
|
|
||||||
1. Visit `http://localhost:3001` → click **Sign up** in the navbar → complete Clerk sign-up (any test email, any password ≥ 8 chars).
|
|
||||||
2. Land on `/pricing` (or scroll to the pricing section on `/`).
|
|
||||||
3. On the **Pro** tier card, click "Start free trial" (or whatever the CTA is — see `landing.pricing.tiers.pro.cta` in `messages/en.json`).
|
|
||||||
4. The button currently POSTs to `/api/stripe/checkout` and opens the returned URL in a new tab. (§5.4 will migrate this to a GET-based redirect flow.)
|
|
||||||
5. On Stripe Checkout, use test card `4242 4242 4242 4242` (any future expiry, any 3-digit CVC, any ZIP).
|
|
||||||
6. After payment, Stripe redirects to `/account?checkout=success&session_id=cs_...`.
|
|
||||||
|
|
||||||
**Verify state:**
|
|
||||||
|
|
||||||
| Check | Where | Expected |
|
|
||||||
|---|---|---|
|
|
||||||
| Clerk user metadata | Clerk Dashboard → Users → your user → "Public metadata" tab | `stripeCustomerId: cus_...` · `subscriptionTier: pro` · `subscriptionStatus: active` |
|
|
||||||
| Stripe customer | Stripe Dashboard test mode → Customers → newest customer | `metadata.clerkUserId = <your Clerk user id>` |
|
|
||||||
| Webhook delivery | Terminal 2 (`stripe listen` log) | `checkout.session.completed [200]` · `customer.subscription.created [200]` · `customer.subscription.updated [200]` |
|
|
||||||
| Subscription on customer | Stripe Dashboard → Customers → your customer → Subscriptions | One active subscription on the price you selected (Pro monthly = `price_1TNZfkC0mmjh4oEMGAZ2PDbc`) |
|
|
||||||
| Checkout Session metadata | Stripe Dashboard → Payments → newest session → Metadata | `clerkUserId`, `tier`, `billing` all populated |
|
|
||||||
|
|
||||||
If any check fails: see Troubleshooting below.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## §5.3 Troubleshooting (smoke-test failure modes)
|
|
||||||
|
|
||||||
| Symptom | Likely cause | Fix |
|
|
||||||
|---|---|---|
|
|
||||||
| Pricing button click → 401 alert "Sign in required" | You haven't signed up / signed in yet | Sign up first via the navbar, then retry |
|
|
||||||
| Pricing button click → 503 "configuration required" | `STRIPE_SECRET_KEY` is still placeholder (`REPLACE_AFTER_ROTATION`) | Paste real `sk_test_*` from `stripe config --list` into `apps/www/.env.local`, restart `next dev` |
|
|
||||||
| Pricing button → 503 "No active Stripe price found" | `lookup_key` not set on the price (or env var is wrong) | Re-run §5.3 Phase A `stripe prices update` for the missing tier |
|
|
||||||
| Checkout completes but Clerk metadata stays empty | Webhook listener not running OR signature secret mismatch | Confirm `stripe listen` is up, secret in `.env.local` matches `--print-secret` output, restart `next dev` after pasting |
|
|
||||||
| `checkout.session.completed [400]` in `stripe listen` log | "Signature verification failed" — listener restarted with a new secret while old one is still in env | Copy fresh secret from listener's startup line, paste into `.env.local`, restart `next dev` |
|
|
||||||
| Webhook fires but Clerk metadata doesn't update | Session metadata missing `clerkUserId` (rare — only if checkout was created outside this app) | Inspect the offending session's metadata in Stripe Dashboard; the route always sets it on new sessions |
|
|
||||||
| Stripe customer created but Clerk `stripeCustomerId` not saved | Clerk publicMetadata write failed silently | Check `next dev` logs for Clerk errors; verify `CLERK_SECRET_KEY` is the freshly rotated key, not stale |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## §5.3 Phase D — Why no Clerk webhook is needed
|
|
||||||
|
|
||||||
The **lazy-create pattern** attaches a Stripe Customer at first paid
|
|
||||||
checkout, not at user creation. As a result:
|
|
||||||
|
|
||||||
- No `user.created` Clerk webhook handler is needed.
|
|
||||||
- `apps/www/app/api/webhooks/clerk/` is **not** created in §5.3.
|
|
||||||
- `CLERK_WEBHOOK_SECRET` in `.env.local` stays as
|
|
||||||
`REPLACE_AFTER_WEBHOOK_REGISTERED` indefinitely (or remove the line).
|
|
||||||
|
|
||||||
**Trade-off:** a user who signs up and never reaches checkout has no
|
|
||||||
`stripeCustomerId` in their publicMetadata. That's correct — they
|
|
||||||
shouldn't have a Stripe customer record until they convert. The
|
|
||||||
checkout route's `ensureStripeCustomer` handles the gap on first pay.
|
|
||||||
|
|
||||||
If we later decide to support pre-paid features (e.g. trial without a
|
|
||||||
card), pre-creating Stripe customers eagerly via Clerk webhook becomes
|
|
||||||
useful. For now, lazy-create is simpler and avoids the
|
|
||||||
"orphan Stripe customer" failure mode.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Out of scope (locked for §5.4+)
|
|
||||||
|
|
||||||
- **Pricing.tsx CTA gating** — §5.4 will migrate from `POST` + `window.open` to:
|
|
||||||
- Signed-in users: GET `/api/stripe/checkout?tier=...&billing=...` → 303 to Stripe Checkout
|
|
||||||
- Signed-out users: open `<SignUpButton>` modal with `forceRedirectUrl=/api/stripe/checkout?tier=...&billing=...` so they land on Stripe Checkout immediately after sign-up
|
|
||||||
- **POST backward-compat shim removal** — once §5.4 migrates Pricing.tsx, the POST handler in `/api/stripe/checkout/route.ts` is dead code and should be deleted.
|
|
||||||
- **FR Pass8-A logo fix** — §5.5 (filename mismatch in HeroVisual asset reference, root cause isolated in §5.0 brief).
|
|
||||||
- **§5.6 final verification** — full landing-page screenshot diff vs. Sesija D baseline + visual confirmation that Hive DS hasn't regressed.
|
|
||||||
- **Live keys + production webhook endpoint** — Marko-side ponedeljak 14:00.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Day-2 polish backlog (post §5.6)
|
|
||||||
|
|
||||||
| Item | Severity | Source | Notes |
|
|
||||||
|---|---|---|---|
|
|
||||||
| Remove POST shim from `/api/stripe/checkout` | low | §5.3 Phase C | Once §5.4 migrates Pricing.tsx to GET, the POST handler is dead code — delete the function + its `runCheckout` POST branch. |
|
|
||||||
| Stripe customer email sync | medium | observed in route | `ensureStripeCustomer` sets email from Clerk's `primaryEmailAddress` once. If user changes email in Clerk, Stripe customer email goes stale. Consider a Clerk `user.updated` webhook OR periodic sync (low priority — Stripe's email is mainly used for receipts, which can be customized). |
|
|
||||||
| `subscriptionStatus: 'paused'` collapsed to `canceled` | low | `webhooks/stripe/route.ts` `mapStatus` | Stripe's `paused` is not technically canceled. If we ever support paid-tier pausing in the UI, distinguish. Current collapse is the "UI shows it as inactive" semantic. |
|
|
||||||
| Webhook idempotency | medium | best practice | Stripe can deliver the same event twice (rare but documented). Current handlers are idempotent for the metadata fields they touch (last-write wins is fine for status). If we add side effects like email sends, gate on `event.id` dedup table. |
|
|
||||||
| Production env vars | high (pre-launch) | §5.3 Phase B | Replace test-mode keys with `sk_live_*` + production `whsec_*`. Production prices may differ from test-mode prices — re-provision via CLI on the live account, capture new IDs, update production env. |
|
|
||||||
| Subscription receipts customization | low | Stripe default | Stripe sends receipts to `customer.email` by default. Verify with Marko whether the brand wants Stripe-default receipts or a custom outbound. |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## §5.3 acceptance criteria
|
|
||||||
|
|
||||||
| # | Criterion | Status | Evidence |
|
|
||||||
|---|---|---|---|
|
|
||||||
| 1 | Stripe catalog has 2 active products (Pro + Teams) with proper lookup_keys + metadata, no duplicates added | ✅ | Path A applied; `stripe products list --active=true \| grep -i waggle` shows exactly 2 |
|
|
||||||
| 2 | All 4 prices have `lookup_key` matching `${tier}_${billing}` and `metadata[tier]` + `metadata[billing]` set | ✅ | `stripe prices list \| jq '.data[] \| select(.lookup_key \| startswith("pro_") or startswith("teams_"))'` confirms |
|
|
||||||
| 3 | `apps/www/.env.local` has all 4 real `STRIPE_PRICE_*` IDs (no placeholders) | ✅ | gitignored; verified by Marko paste of secret + this commit's env update |
|
|
||||||
| 4 | `apps/www/.env.local.example` documents the 4 keys + CLI provisioning command | ✅ | Commit `0147d6c` |
|
|
||||||
| 5 | `/api/stripe/checkout` enforces auth, lazy-creates Stripe Customer, resolves price by lookup_key with env-pin fallback | ✅ | Commit `a087cf6` |
|
|
||||||
| 6 | `/api/webhooks/stripe` verifies signature + handles 3 event types + maps to Clerk publicMetadata | ✅ | Commit `a087cf6` |
|
|
||||||
| 7 | No Clerk webhook handler created (lazy-create pattern) | ✅ | `apps/www/app/api/webhooks/clerk/` does not exist |
|
|
||||||
| 8 | TypeScript compiles clean (`npx tsc --noEmit`) | ✅ | Verified post-Phase-C |
|
|
||||||
| 9 | Manifest documents Phase B (local listener) + Phase E (smoke test) + production webhook plan | ✅ | This document |
|
|
||||||
| 10 | Smoke test executable end-to-end | ⏸ Pending | Requires Marko to run with `stripe listen` — see Phase E walkthrough above |
|
|
||||||
|
|
||||||
**9 / 10 PASS · 1 pending Marko-side smoke run.**
|
|
||||||
@@ -1,153 +0,0 @@
|
|||||||
import { describe, expect, it, vi } from 'vitest';
|
|
||||||
import { cleanup, fireEvent, render, screen, within } from '@testing-library/react';
|
|
||||||
import { afterEach } from 'vitest';
|
|
||||||
import BrandPersonasCard from '../app/_components/BrandPersonasCard';
|
|
||||||
import { personas, type PersonaSlug } from '../app/_data/personas';
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
cleanup();
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('BrandPersonasCard — landing variant', () => {
|
|
||||||
it('renders 13 persona tiles + 3 filler tiles by default', () => {
|
|
||||||
render(<BrandPersonasCard />);
|
|
||||||
|
|
||||||
const tiles = screen.getAllByTestId(/^persona-tile-/);
|
|
||||||
expect(tiles).toHaveLength(13);
|
|
||||||
|
|
||||||
const fillers = screen.getAllByTestId('brand-personas-filler');
|
|
||||||
expect(fillers).toHaveLength(3);
|
|
||||||
|
|
||||||
// Fillers must be marked aria-hidden to stay out of AT navigation.
|
|
||||||
for (const filler of fillers) {
|
|
||||||
expect(filler).toHaveAttribute('aria-hidden', 'true');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
it('renders correct title + role copy for all 13 personas (verbatim from locked decision)', () => {
|
|
||||||
render(<BrandPersonasCard />);
|
|
||||||
|
|
||||||
for (const persona of personas) {
|
|
||||||
const tile = screen.getByTestId(`persona-tile-${persona.slug}`);
|
|
||||||
const scope = within(tile);
|
|
||||||
expect(scope.getByText(persona.title)).toBeInTheDocument();
|
|
||||||
expect(scope.getByText(persona.role)).toBeInTheDocument();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
it('fires onPersonaClick with the correct slug when a tile is clicked', () => {
|
|
||||||
const handler = vi.fn<(slug: PersonaSlug) => void>();
|
|
||||||
render(<BrandPersonasCard onPersonaClick={handler} />);
|
|
||||||
|
|
||||||
const hunterTile = screen.getByTestId('persona-tile-hunter');
|
|
||||||
const button = within(hunterTile).getByRole('button', {
|
|
||||||
name: /Waggle The Hunter bee mascot/i,
|
|
||||||
});
|
|
||||||
fireEvent.click(button);
|
|
||||||
|
|
||||||
expect(handler).toHaveBeenCalledTimes(1);
|
|
||||||
expect(handler).toHaveBeenCalledWith('hunter');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('fires onTileHover with the correct slug on mouseenter', () => {
|
|
||||||
const handler = vi.fn<(slug: PersonaSlug) => void>();
|
|
||||||
render(<BrandPersonasCard onTileHover={handler} />);
|
|
||||||
|
|
||||||
const connectorTile = screen.getByTestId('persona-tile-connector');
|
|
||||||
fireEvent.mouseEnter(connectorTile);
|
|
||||||
|
|
||||||
expect(handler).toHaveBeenCalledTimes(1);
|
|
||||||
expect(handler).toHaveBeenCalledWith('connector');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('renders the cta slot below the grid', () => {
|
|
||||||
render(
|
|
||||||
<BrandPersonasCard
|
|
||||||
cta={<a href="https://example.test/cta">Meet the hive</a>}
|
|
||||||
/>,
|
|
||||||
);
|
|
||||||
|
|
||||||
const ctaSlot = screen.getByTestId('brand-personas-cta');
|
|
||||||
expect(ctaSlot).toBeInTheDocument();
|
|
||||||
expect(
|
|
||||||
within(ctaSlot).getByRole('link', { name: /Meet the hive/i }),
|
|
||||||
).toHaveAttribute('href', 'https://example.test/cta');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('hides filler tiles when showFillerTiles={false}', () => {
|
|
||||||
render(<BrandPersonasCard showFillerTiles={false} />);
|
|
||||||
|
|
||||||
expect(screen.queryAllByTestId('brand-personas-filler')).toHaveLength(0);
|
|
||||||
// Persona tiles remain intact — feature is filler-scoped.
|
|
||||||
expect(screen.getAllByTestId(/^persona-tile-/)).toHaveLength(13);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('flips to a placeholder when a persona asset fails to load', () => {
|
|
||||||
render(<BrandPersonasCard />);
|
|
||||||
|
|
||||||
const writerTile = screen.getByTestId('persona-tile-writer');
|
|
||||||
const img = within(writerTile).getByRole('img', {
|
|
||||||
name: /Waggle The Writer bee mascot/i,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Simulate the 404/onerror path that fires when an asset is missing
|
|
||||||
// (e.g., mid-regen Task #24 state before the new PNG lands).
|
|
||||||
fireEvent.error(img);
|
|
||||||
|
|
||||||
expect(writerTile).toHaveAttribute('data-placeholder', 'true');
|
|
||||||
expect(
|
|
||||||
screen.getByTestId('persona-placeholder-writer'),
|
|
||||||
).toBeInTheDocument();
|
|
||||||
// Role copy must stay readable even while the image degrades.
|
|
||||||
expect(
|
|
||||||
within(writerTile).getByText(
|
|
||||||
'Shapes the story the memory wants to tell.',
|
|
||||||
),
|
|
||||||
).toBeInTheDocument();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('supports keyboard activation (Enter + Space) when onPersonaClick is provided', () => {
|
|
||||||
const handler = vi.fn<(slug: PersonaSlug) => void>();
|
|
||||||
render(<BrandPersonasCard onPersonaClick={handler} />);
|
|
||||||
|
|
||||||
const teamTile = screen.getByTestId('persona-tile-team');
|
|
||||||
const button = within(teamTile).getByRole('button');
|
|
||||||
|
|
||||||
fireEvent.keyDown(button, { key: 'Enter' });
|
|
||||||
fireEvent.keyDown(button, { key: ' ' });
|
|
||||||
// A non-activation key must not fire the handler.
|
|
||||||
fireEvent.keyDown(button, { key: 'Tab' });
|
|
||||||
|
|
||||||
expect(handler).toHaveBeenCalledTimes(2);
|
|
||||||
expect(handler).toHaveBeenNthCalledWith(1, 'team');
|
|
||||||
expect(handler).toHaveBeenNthCalledWith(2, 'team');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('honours custom heading + subtitle overrides', () => {
|
|
||||||
render(
|
|
||||||
<BrandPersonasCard
|
|
||||||
heading="Internal reference"
|
|
||||||
subtitle="Brand canon for the team."
|
|
||||||
/>,
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(
|
|
||||||
screen.getByRole('heading', { name: 'Internal reference' }),
|
|
||||||
).toBeInTheDocument();
|
|
||||||
expect(screen.getByText('Brand canon for the team.')).toBeInTheDocument();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('BrandPersonasCard — compact variant', () => {
|
|
||||||
it('renders the compact stub without errors and exposes the data-variant hook', () => {
|
|
||||||
render(<BrandPersonasCard variant="compact" />);
|
|
||||||
|
|
||||||
const stub = screen.getByTestId('brand-personas-card-compact');
|
|
||||||
expect(stub).toBeInTheDocument();
|
|
||||||
expect(stub).toHaveAttribute('data-variant', 'compact');
|
|
||||||
// Landing DOM must not leak into compact path.
|
|
||||||
expect(
|
|
||||||
screen.queryByTestId('brand-personas-card'),
|
|
||||||
).not.toBeInTheDocument();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
import { afterEach, describe, expect, it } from 'vitest';
|
|
||||||
import { cleanup, fireEvent, render, screen } from '@testing-library/react';
|
|
||||||
import Pricing from '../app/_components/Pricing';
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
cleanup();
|
|
||||||
window.history.pushState({}, '', '/');
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Pricing', () => {
|
|
||||||
it('uses the canonical GET checkout URL for Team checkout', () => {
|
|
||||||
render(<Pricing />);
|
|
||||||
|
|
||||||
const monthlyCta = screen.getByRole('link', {
|
|
||||||
name: 'landing.pricing.tiers.teams.cta',
|
|
||||||
});
|
|
||||||
expect(monthlyCta).toHaveAttribute(
|
|
||||||
'href',
|
|
||||||
'/api/stripe/checkout?tier=teams&billing=monthly',
|
|
||||||
);
|
|
||||||
|
|
||||||
fireEvent.click(
|
|
||||||
screen.getByRole('button', { name: /landing\.pricing\.toggle\.annual/ }),
|
|
||||||
);
|
|
||||||
|
|
||||||
const annualCta = screen.getByRole('link', {
|
|
||||||
name: 'landing.pricing.tiers.teams.cta',
|
|
||||||
});
|
|
||||||
expect(annualCta).toHaveAttribute(
|
|
||||||
'href',
|
|
||||||
'/api/stripe/checkout?tier=teams&billing=annual',
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('shows a retry path after a cancelled checkout', async () => {
|
|
||||||
window.history.pushState({}, '', '/?checkout=cancelled#pricing');
|
|
||||||
|
|
||||||
render(<Pricing />);
|
|
||||||
|
|
||||||
const notice = await screen.findByRole('status');
|
|
||||||
expect(notice).toHaveTextContent('landing.pricing.notices.cancelled');
|
|
||||||
expect(
|
|
||||||
screen.getByRole('link', {
|
|
||||||
name: 'landing.pricing.notices.retry',
|
|
||||||
}),
|
|
||||||
).toHaveAttribute(
|
|
||||||
'href',
|
|
||||||
'/api/stripe/checkout?tier=teams&billing=monthly',
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
import { describe, expect, it } from 'vitest';
|
|
||||||
import { readFileSync } from 'node:fs';
|
|
||||||
import { join } from 'node:path';
|
|
||||||
|
|
||||||
const workflow = () =>
|
|
||||||
readFileSync(
|
|
||||||
join(process.cwd(), '..', '..', '.github', 'workflows', 'deploy-www.yml'),
|
|
||||||
'utf8',
|
|
||||||
);
|
|
||||||
|
|
||||||
describe('public-site deployment workflow', () => {
|
|
||||||
it('deploys the dynamic Next app with Vercel instead of GitHub Pages static artifacts', () => {
|
|
||||||
const source = workflow();
|
|
||||||
|
|
||||||
expect(source).toContain('vercel pull');
|
|
||||||
expect(source).toContain('vercel build');
|
|
||||||
expect(source).toContain('vercel deploy --prebuilt --prod');
|
|
||||||
expect(source).toContain('VERCEL_TOKEN');
|
|
||||||
expect(source).toContain('VERCEL_ORG_ID');
|
|
||||||
expect(source).toContain('VERCEL_PROJECT_ID');
|
|
||||||
expect(source).not.toContain('upload-pages-artifact');
|
|
||||||
expect(source).not.toContain('deploy-pages');
|
|
||||||
expect(source).not.toContain('apps/www/dist');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
import { afterEach, describe, expect, it } from 'vitest';
|
|
||||||
import { cleanup, render, screen } from '@testing-library/react';
|
|
||||||
import DownloadCTA from '../app/_components/DownloadCTA';
|
|
||||||
import DownloadPage from '../app/download/page';
|
|
||||||
import { detectOSFromUserAgent } from '../app/_lib/os-detection';
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
cleanup();
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('download path', () => {
|
|
||||||
it('routes public download CTAs to the controlled download page', () => {
|
|
||||||
render(<DownloadCTA section="hero" />);
|
|
||||||
|
|
||||||
expect(screen.getByRole('link')).toHaveAttribute('href', '/download');
|
|
||||||
expect(screen.getByRole('link')).not.toHaveAttribute('target');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('does not send visitors directly to an empty GitHub Releases page', () => {
|
|
||||||
render(<DownloadPage />);
|
|
||||||
|
|
||||||
expect(
|
|
||||||
screen.getByRole('heading', { name: 'Download Waggle' }),
|
|
||||||
).toBeInTheDocument();
|
|
||||||
expect(
|
|
||||||
screen.getByText('Windows and macOS installers are being prepared for the signed public release.'),
|
|
||||||
).toBeInTheDocument();
|
|
||||||
expect(
|
|
||||||
screen.getByRole('link', { name: 'View source on GitHub' }),
|
|
||||||
).toHaveAttribute('href', 'https://github.com/marolinik/waggle-os');
|
|
||||||
expect(
|
|
||||||
screen.queryByRole('link', { name: /releases/i }),
|
|
||||||
).not.toBeInTheDocument();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('does not label mobile visitors as desktop operating systems', () => {
|
|
||||||
expect(
|
|
||||||
detectOSFromUserAgent(
|
|
||||||
'Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 Mobile/15E148',
|
|
||||||
),
|
|
||||||
).toBeNull();
|
|
||||||
expect(
|
|
||||||
detectOSFromUserAgent(
|
|
||||||
'Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 Chrome/126.0.0.0 Mobile Safari/537.36',
|
|
||||||
),
|
|
||||||
).toBeNull();
|
|
||||||
expect(
|
|
||||||
detectOSFromUserAgent(
|
|
||||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) AppleWebKit/605.1.15 Safari/605.1.15',
|
|
||||||
),
|
|
||||||
).toBe('macOS');
|
|
||||||
expect(
|
|
||||||
detectOSFromUserAgent(
|
|
||||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/126.0.0.0 Safari/537.36',
|
|
||||||
),
|
|
||||||
).toBe('Windows');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
import { describe, expect, it, vi } from 'vitest';
|
|
||||||
import type { ReactElement, ReactNode } from 'react';
|
|
||||||
|
|
||||||
vi.mock('next/font/google', () => ({
|
|
||||||
Hanken_Grotesk: () => ({ variable: '__font_hanken' }),
|
|
||||||
JetBrains_Mono: () => ({ variable: '__font_mono' }),
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock('next-intl/server', () => ({
|
|
||||||
getLocale: vi.fn(async () => 'en'),
|
|
||||||
getMessages: vi.fn(async () => ({})),
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock('@clerk/nextjs', () => ({
|
|
||||||
ClerkProvider: ({ children }: { children: ReactNode }) => children,
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock('@clerk/themes', () => ({
|
|
||||||
dark: {},
|
|
||||||
}));
|
|
||||||
|
|
||||||
import RootLayout from '../app/layout';
|
|
||||||
|
|
||||||
describe('RootLayout', () => {
|
|
||||||
it('keeps the progressive-enhancement js class as an intentional hydration mismatch', async () => {
|
|
||||||
const tree = (await RootLayout({
|
|
||||||
children: <main>content</main>,
|
|
||||||
})) as ReactElement<{
|
|
||||||
className: string;
|
|
||||||
suppressHydrationWarning?: boolean;
|
|
||||||
children: ReactNode;
|
|
||||||
}>;
|
|
||||||
|
|
||||||
expect(tree.type).toBe('html');
|
|
||||||
expect(tree.props.className).toBe('scroll-smooth __font_hanken __font_mono');
|
|
||||||
expect(tree.props.className).not.toContain(' js');
|
|
||||||
expect(tree.props.suppressHydrationWarning).toBe(true);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
import { describe, expect, it } from 'vitest';
|
|
||||||
import { readFileSync } from 'node:fs';
|
|
||||||
import { join } from 'node:path';
|
|
||||||
|
|
||||||
const legalFiles = [
|
|
||||||
'terms/page.tsx',
|
|
||||||
'privacy/page.tsx',
|
|
||||||
'cookies/page.tsx',
|
|
||||||
'eu-ai-act/page.tsx',
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
const launchBlockingCopy = [
|
|
||||||
/Day-0 placeholder text/i,
|
|
||||||
/\[Day-0 launch date\]/i,
|
|
||||||
/to be filled before public launch/i,
|
|
||||||
/Pro or Teams/i,
|
|
||||||
/\[to be designated/i,
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
describe('legal pages', () => {
|
|
||||||
it('do not expose launch placeholders or retired tier copy', () => {
|
|
||||||
for (const file of legalFiles) {
|
|
||||||
const source = readFileSync(
|
|
||||||
join(process.cwd(), 'app', '(legal)', file),
|
|
||||||
'utf8',
|
|
||||||
);
|
|
||||||
|
|
||||||
for (const pattern of launchBlockingCopy) {
|
|
||||||
expect(source, `${file} should not match ${pattern}`).not.toMatch(
|
|
||||||
pattern,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
import { describe, expect, it } from 'vitest';
|
|
||||||
import { config } from '../proxy';
|
|
||||||
|
|
||||||
describe('www Clerk proxy boundary', () => {
|
|
||||||
it('protects only identity and server-owned flows', () => {
|
|
||||||
expect(config.matcher).toEqual([
|
|
||||||
'/account(.*)',
|
|
||||||
'/sign-in(.*)',
|
|
||||||
'/sign-up(.*)',
|
|
||||||
'/(api|trpc)(.*)',
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
import '@testing-library/jest-dom';
|
|
||||||
import { vi } from 'vitest';
|
|
||||||
import type { ReactNode } from 'react';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* jsdom does not implement `matchMedia`; our component queries
|
|
||||||
* `prefers-reduced-motion` via plain CSS, but consumer code using matchMedia
|
|
||||||
* (existing `Pricing` component paths, etc.) still needs a shim during tests.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(window, 'matchMedia', {
|
|
||||||
writable: true,
|
|
||||||
value: (query: string) => ({
|
|
||||||
matches: false,
|
|
||||||
media: query,
|
|
||||||
onchange: null,
|
|
||||||
addListener: () => {},
|
|
||||||
removeListener: () => {},
|
|
||||||
addEventListener: () => {},
|
|
||||||
removeEventListener: () => {},
|
|
||||||
dispatchEvent: () => false,
|
|
||||||
}),
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Mock next-intl for unit tests. The `t()` function returns the namespaced
|
|
||||||
* key (with ICU `{var}` placeholders interpolated), so tests can assert on
|
|
||||||
* deterministic strings without needing a real `messages/en.json` round-trip.
|
|
||||||
*
|
|
||||||
* BrandPersonasCard tests check persona-data text (from `_data/personas.ts`,
|
|
||||||
* not i18n) and passed-in prop overrides — never the default heading/
|
|
||||||
* subtitle from i18n — so this mock is safe.
|
|
||||||
*/
|
|
||||||
vi.mock('next-intl', () => ({
|
|
||||||
useTranslations: (namespace?: string) => {
|
|
||||||
return (key: string, params?: Record<string, string | number>) => {
|
|
||||||
const fullKey = namespace ? `${namespace}.${key}` : key;
|
|
||||||
if (!params) return fullKey;
|
|
||||||
return Object.entries(params).reduce(
|
|
||||||
(acc, [k, v]) => acc.replace(`{${k}}`, String(v)),
|
|
||||||
fullKey,
|
|
||||||
);
|
|
||||||
};
|
|
||||||
},
|
|
||||||
NextIntlClientProvider: ({ children }: { children: ReactNode }) => children,
|
|
||||||
}));
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
||||||
|
|
||||||
const clerkMocks = vi.hoisted(() => ({
|
|
||||||
auth: vi.fn(),
|
|
||||||
getUser: vi.fn(),
|
|
||||||
updateUserMetadata: vi.fn(),
|
|
||||||
}));
|
|
||||||
|
|
||||||
const stripeMocks = vi.hoisted(() => ({
|
|
||||||
checkoutSessionsCreate: vi.fn(),
|
|
||||||
customersCreate: vi.fn(),
|
|
||||||
pricesList: vi.fn(),
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock('@clerk/nextjs/server', () => ({
|
|
||||||
auth: clerkMocks.auth,
|
|
||||||
clerkClient: vi.fn(async () => ({
|
|
||||||
users: {
|
|
||||||
getUser: clerkMocks.getUser,
|
|
||||||
updateUserMetadata: clerkMocks.updateUserMetadata,
|
|
||||||
},
|
|
||||||
})),
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock('stripe', () => ({
|
|
||||||
default: vi.fn().mockImplementation(() => ({
|
|
||||||
checkout: {
|
|
||||||
sessions: {
|
|
||||||
create: stripeMocks.checkoutSessionsCreate,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
customers: {
|
|
||||||
create: stripeMocks.customersCreate,
|
|
||||||
},
|
|
||||||
prices: {
|
|
||||||
list: stripeMocks.pricesList,
|
|
||||||
},
|
|
||||||
})),
|
|
||||||
}));
|
|
||||||
|
|
||||||
import { GET } from '../app/api/stripe/checkout/route';
|
|
||||||
|
|
||||||
describe('/api/stripe/checkout', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
process.env.STRIPE_SECRET_KEY = 'sk_test_checkout';
|
|
||||||
process.env.STRIPE_PRICE_TEAMS_ANNUAL = 'price_team_annual';
|
|
||||||
clerkMocks.auth.mockResolvedValue({ userId: 'user_123' });
|
|
||||||
clerkMocks.getUser.mockResolvedValue({
|
|
||||||
publicMetadata: { stripeCustomerId: 'cus_existing' },
|
|
||||||
primaryEmailAddress: { emailAddress: 'team@example.test' },
|
|
||||||
});
|
|
||||||
stripeMocks.checkoutSessionsCreate.mockResolvedValue({
|
|
||||||
url: 'https://checkout.stripe.test/session',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
vi.clearAllMocks();
|
|
||||||
delete process.env.STRIPE_SECRET_KEY;
|
|
||||||
delete process.env.STRIPE_PRICE_TEAMS_ANNUAL;
|
|
||||||
});
|
|
||||||
|
|
||||||
it('sends cancelled checkouts back to the homepage pricing section', async () => {
|
|
||||||
const res = await GET(
|
|
||||||
new Request(
|
|
||||||
'https://waggle.example/api/stripe/checkout?tier=teams&billing=annual',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(res.status).toBe(303);
|
|
||||||
expect(stripeMocks.checkoutSessionsCreate).toHaveBeenCalledWith(
|
|
||||||
expect.objectContaining({
|
|
||||||
cancel_url: 'https://waggle.example/?checkout=cancelled#pricing',
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('sends signed-out users to sign-in and preserves the checkout target', async () => {
|
|
||||||
clerkMocks.auth.mockResolvedValueOnce({ userId: null });
|
|
||||||
|
|
||||||
const res = await GET(
|
|
||||||
new Request(
|
|
||||||
'https://waggle.example/api/stripe/checkout?tier=teams&billing=monthly',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(res.status).toBe(303);
|
|
||||||
expect(res.headers.get('location')).toBe(
|
|
||||||
'https://waggle.example/sign-in?redirect_url=%2Fapi%2Fstripe%2Fcheckout%3Ftier%3Dteams%26billing%3Dmonthly',
|
|
||||||
);
|
|
||||||
expect(stripeMocks.checkoutSessionsCreate).not.toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,138 +0,0 @@
|
|||||||
import type { Metadata } from 'next';
|
|
||||||
import type { CSSProperties } from 'react';
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
|
||||||
title: 'Cookie Policy — Waggle',
|
|
||||||
description:
|
|
||||||
'Cookie policy for Waggle OS by Egzakta Group d.o.o.',
|
|
||||||
robots: { index: false, follow: false },
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function CookiesPage() {
|
|
||||||
return (
|
|
||||||
<article>
|
|
||||||
<h1 style={h1Style}>Cookie Policy</h1>
|
|
||||||
<p style={metaLineStyle}>
|
|
||||||
<strong>Effective date:</strong> July 8, 2026 · <strong>Last updated:</strong> July 8, 2026
|
|
||||||
</p>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
This Cookie Policy explains how Waggle OS uses cookies and similar
|
|
||||||
technologies on its web properties (the marketing site at
|
|
||||||
waggle-os.ai and any in-product web views).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>1. What cookies are</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Cookies are small text files stored by your browser when you visit a
|
|
||||||
website. They allow the site to remember information about your
|
|
||||||
visit (e.g., your login state). Similar technologies include local
|
|
||||||
storage, session storage, and pixels.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>2. Cookies we use</h2>
|
|
||||||
|
|
||||||
<h3 style={h3Style}>Strictly necessary</h3>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
These cookies are required for the Service to function and cannot be
|
|
||||||
disabled.
|
|
||||||
</p>
|
|
||||||
<ul style={listStyle}>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
<strong>Clerk session cookies</strong> — keep you logged in. Set by{' '}
|
|
||||||
<code>clerk.waggle-os.ai</code>. Cleared on logout.
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
<strong>CSRF protection</strong> — prevents cross-site request
|
|
||||||
forgery. Cleared on tab close.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3 style={h3Style}>Analytics (opt-in)</h3>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
These cookies are loaded only if you opt in via Settings → Privacy →
|
|
||||||
“Allow anonymous product analytics.” Default is opt-out.
|
|
||||||
</p>
|
|
||||||
<ul style={listStyle}>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
<strong>PostHog cookies</strong> (<code>ph_*</code>) — capture
|
|
||||||
anonymous usage events for product improvement. We do not use
|
|
||||||
PostHog session recordings, do not capture form inputs, and do not
|
|
||||||
link analytics to your account email.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>3. No advertising or social-media tracking</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
We do not use third-party advertising networks, social-media pixels
|
|
||||||
(Meta, TikTok, X), or cross-site tracking. We do not sell or share
|
|
||||||
data with advertisers.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>4. Managing cookies</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
You can clear cookies through your browser settings. For granular
|
|
||||||
control of the analytics cookie, use Settings → Privacy in the
|
|
||||||
Waggle product.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>5. Changes to this policy</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
We may update this Cookie Policy. Material changes will be announced
|
|
||||||
via the product and email.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>6. Contact</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Email: <strong>privacy@egzakta.com</strong>
|
|
||||||
</p>
|
|
||||||
</article>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const h1Style: CSSProperties = {
|
|
||||||
fontSize: 'clamp(28px, 4vw, 36px)',
|
|
||||||
fontWeight: 700,
|
|
||||||
marginBottom: 24,
|
|
||||||
color: 'var(--hive-50, #f6f1e4)',
|
|
||||||
};
|
|
||||||
|
|
||||||
const h2Style: CSSProperties = {
|
|
||||||
fontSize: 'clamp(18px, 2.4vw, 22px)',
|
|
||||||
fontWeight: 600,
|
|
||||||
marginTop: 32,
|
|
||||||
marginBottom: 12,
|
|
||||||
color: 'var(--hive-50, #f6f1e4)',
|
|
||||||
};
|
|
||||||
|
|
||||||
const h3Style: CSSProperties = {
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: 600,
|
|
||||||
marginTop: 16,
|
|
||||||
marginBottom: 8,
|
|
||||||
color: 'var(--hive-100, #d8cfba)',
|
|
||||||
};
|
|
||||||
|
|
||||||
const metaLineStyle: CSSProperties = {
|
|
||||||
fontSize: 13,
|
|
||||||
color: 'var(--hive-300, #948a73)',
|
|
||||||
marginBottom: 24,
|
|
||||||
};
|
|
||||||
|
|
||||||
const paragraphStyle: CSSProperties = {
|
|
||||||
fontSize: 15,
|
|
||||||
lineHeight: 1.7,
|
|
||||||
color: 'var(--hive-200, #d8cfba)',
|
|
||||||
marginBottom: 16,
|
|
||||||
};
|
|
||||||
|
|
||||||
const listStyle: CSSProperties = {
|
|
||||||
paddingLeft: 24,
|
|
||||||
marginBottom: 16,
|
|
||||||
color: 'var(--hive-200, #d8cfba)',
|
|
||||||
};
|
|
||||||
|
|
||||||
const listItemStyle: CSSProperties = {
|
|
||||||
fontSize: 15,
|
|
||||||
lineHeight: 1.7,
|
|
||||||
marginBottom: 8,
|
|
||||||
};
|
|
||||||
@@ -1,208 +0,0 @@
|
|||||||
import type { Metadata } from 'next';
|
|
||||||
import type { CSSProperties } from 'react';
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
|
||||||
title: 'EU AI Act Statement — Waggle',
|
|
||||||
description:
|
|
||||||
'EU AI Act compliance statement for Waggle OS by Egzakta Group d.o.o.',
|
|
||||||
robots: { index: false, follow: false },
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function EuAiActPage() {
|
|
||||||
return (
|
|
||||||
<article>
|
|
||||||
<h1 style={h1Style}>EU AI Act Statement</h1>
|
|
||||||
<p style={metaLineStyle}>
|
|
||||||
<strong>Effective date:</strong> July 8, 2026 · <strong>Last updated:</strong> July 8, 2026
|
|
||||||
</p>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Egzakta Group d.o.o. (“we”) publishes this statement to
|
|
||||||
describe how Waggle OS relates to Regulation (EU) 2024/1689
|
|
||||||
(“EU AI Act”). Our intent is to be a transparent
|
|
||||||
participant in the AI value chain, even as the EU AI Act’s
|
|
||||||
provisions phase in through 2026.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>1. Our role in the AI value chain</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Waggle OS is a <strong>deployer</strong> (sometimes called
|
|
||||||
“deployer of AI systems”) under EU AI Act terminology
|
|
||||||
when end-users install the Waggle desktop application and use it
|
|
||||||
for their own purposes. Egzakta is <strong>not</strong> a provider
|
|
||||||
of general-purpose AI models (GPAI providers — defined in Article
|
|
||||||
51). Waggle OS routes user requests to third-party AI providers
|
|
||||||
(Anthropic, OpenAI, Mistral, and others). The underlying GPAI
|
|
||||||
providers fulfill the obligations applicable to them.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>2. Article 50 — transparency obligations</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
We comply with the transparency obligations of Article 50 by:
|
|
||||||
</p>
|
|
||||||
<ul style={listStyle}>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
<strong>Clearly labeling AI-generated output</strong>: the Waggle
|
|
||||||
UI marks AI-generated responses as such; the user always knows
|
|
||||||
they are interacting with an AI system.
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
<strong>Disclosing system prompts on request</strong>: users can
|
|
||||||
view the active persona’s system prompt in Settings →
|
|
||||||
Personas → selected persona → System Prompt.
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
<strong>No deepfake generation</strong>: Waggle OS does not
|
|
||||||
generate synthetic images, audio, or video that could be confused
|
|
||||||
with authentic media.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>3. Article 5 — prohibited practices</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Waggle OS does not implement, encourage, or facilitate any
|
|
||||||
prohibited AI practice under Article 5, including:
|
|
||||||
</p>
|
|
||||||
<ul style={listStyle}>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Subliminal manipulation or exploitation of vulnerabilities.
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Social scoring of natural persons.
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Real-time remote biometric identification in publicly accessible
|
|
||||||
spaces.
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Emotion inference in workplace or education contexts.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>4. High-risk AI systems</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Waggle OS in its default consumer configuration is not a high-risk
|
|
||||||
AI system under Annex III. If users deploy Waggle OS for high-risk
|
|
||||||
purposes (e.g., employment screening, credit scoring), the deployer
|
|
||||||
is responsible for fulfilling the obligations applicable to that
|
|
||||||
high-risk system.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>5. General-purpose AI (GPAI) considerations</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Waggle OS depends on GPAI models provided by third parties. Those
|
|
||||||
providers publish their own EU AI Act compliance information:
|
|
||||||
</p>
|
|
||||||
<ul style={listStyle}>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Anthropic:{' '}
|
|
||||||
<a href="https://www.anthropic.com/eu-ai-act" style={linkStyle}>
|
|
||||||
anthropic.com/eu-ai-act
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
OpenAI:{' '}
|
|
||||||
<a href="https://openai.com/eu-ai-act" style={linkStyle}>
|
|
||||||
openai.com/eu-ai-act
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Mistral:{' '}
|
|
||||||
<a href="https://mistral.ai/eu-ai-act" style={linkStyle}>
|
|
||||||
mistral.ai/eu-ai-act
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>6. Risk management and documentation</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Egzakta maintains internal documentation of:
|
|
||||||
</p>
|
|
||||||
<ul style={listStyle}>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Models routed to and their provenance.
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Safety testing for the persona system and behavioral spec.
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
The evolution subsystem (see arxiv paper, pending submission).
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
User-facing transparency mechanisms.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
We will publish a public AI risk management summary by Article
|
|
||||||
50’s effective date (2026-08-02 for Article 50 obligations).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>7. Data protection alignment</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Personal data handling is governed by our{' '}
|
|
||||||
<a href="/privacy" style={linkStyle}>
|
|
||||||
Privacy Policy
|
|
||||||
</a>{' '}
|
|
||||||
and the GDPR. We do not train AI models on user data without
|
|
||||||
explicit consent. Local memory data never leaves the user’s
|
|
||||||
device unless they explicitly enable team sharing (Teams tier).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>
|
|
||||||
8. Contact for data subject and EU AI Act inquiries
|
|
||||||
</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Email: <strong>ai-compliance@egzakta.com</strong>
|
|
||||||
<br />
|
|
||||||
Data Protection Officer: <strong>dpo@egzakta.com</strong>
|
|
||||||
<br />
|
|
||||||
Representative inquiries under Article 25:{' '}
|
|
||||||
<strong>ai-compliance@egzakta.com</strong>
|
|
||||||
</p>
|
|
||||||
</article>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const h1Style: CSSProperties = {
|
|
||||||
fontSize: 'clamp(28px, 4vw, 36px)',
|
|
||||||
fontWeight: 700,
|
|
||||||
marginBottom: 24,
|
|
||||||
color: 'var(--hive-50, #f6f1e4)',
|
|
||||||
};
|
|
||||||
|
|
||||||
const h2Style: CSSProperties = {
|
|
||||||
fontSize: 'clamp(18px, 2.4vw, 22px)',
|
|
||||||
fontWeight: 600,
|
|
||||||
marginTop: 32,
|
|
||||||
marginBottom: 12,
|
|
||||||
color: 'var(--hive-50, #f6f1e4)',
|
|
||||||
};
|
|
||||||
|
|
||||||
const metaLineStyle: CSSProperties = {
|
|
||||||
fontSize: 13,
|
|
||||||
color: 'var(--hive-300, #948a73)',
|
|
||||||
marginBottom: 24,
|
|
||||||
};
|
|
||||||
|
|
||||||
const paragraphStyle: CSSProperties = {
|
|
||||||
fontSize: 15,
|
|
||||||
lineHeight: 1.7,
|
|
||||||
color: 'var(--hive-200, #d8cfba)',
|
|
||||||
marginBottom: 16,
|
|
||||||
};
|
|
||||||
|
|
||||||
const listStyle: CSSProperties = {
|
|
||||||
paddingLeft: 24,
|
|
||||||
marginBottom: 16,
|
|
||||||
color: 'var(--hive-200, #d8cfba)',
|
|
||||||
};
|
|
||||||
|
|
||||||
const listItemStyle: CSSProperties = {
|
|
||||||
fontSize: 15,
|
|
||||||
lineHeight: 1.7,
|
|
||||||
marginBottom: 8,
|
|
||||||
};
|
|
||||||
|
|
||||||
const linkStyle: CSSProperties = {
|
|
||||||
color: 'var(--honey-400, #f6c45a)',
|
|
||||||
textDecoration: 'underline',
|
|
||||||
};
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
import type { CSSProperties, ReactNode } from 'react';
|
|
||||||
import Navbar from '../_components/Navbar';
|
|
||||||
import Footer from '../_components/Footer';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Layout for the legal route group: /privacy, /terms, /cookies, /eu-ai-act.
|
|
||||||
*
|
|
||||||
* Wraps each legal page with the same Navbar + Footer chrome as the landing
|
|
||||||
* page so the legal pages don't feel like a separate microsite. The route
|
|
||||||
* group `(legal)` is invisible in the URL — pages are reachable at their
|
|
||||||
* top-level paths.
|
|
||||||
*/
|
|
||||||
export default function LegalLayout({ children }: { children: ReactNode }) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Navbar />
|
|
||||||
<main style={mainStyle}>{children}</main>
|
|
||||||
<Footer />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const mainStyle: CSSProperties = {
|
|
||||||
maxWidth: 760,
|
|
||||||
margin: '120px auto 96px',
|
|
||||||
padding: '0 24px',
|
|
||||||
fontFamily: "var(--sans)",
|
|
||||||
color: 'var(--hive-100, #ece3d0)',
|
|
||||||
};
|
|
||||||
@@ -1,208 +0,0 @@
|
|||||||
import type { Metadata } from 'next';
|
|
||||||
import type { CSSProperties } from 'react';
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
|
||||||
title: 'Privacy Policy — Waggle',
|
|
||||||
description:
|
|
||||||
'Privacy policy for Waggle OS by Egzakta Group d.o.o.',
|
|
||||||
robots: { index: false, follow: false },
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function PrivacyPage() {
|
|
||||||
return (
|
|
||||||
<article>
|
|
||||||
<h1 style={h1Style}>Privacy Policy</h1>
|
|
||||||
<p style={metaLineStyle}>
|
|
||||||
<strong>Effective date:</strong> July 8, 2026 · <strong>Last updated:</strong> July 8, 2026
|
|
||||||
</p>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Waggle OS is provided by Egzakta Group d.o.o. (“Egzakta”,
|
|
||||||
“we”, “us”), a company registered in the
|
|
||||||
Republic of Serbia. This Privacy Policy explains what personal data
|
|
||||||
we collect, how we use it, and your rights.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>1. Data we collect</h2>
|
|
||||||
<ul style={listStyle}>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
<strong>Account data</strong>: when you sign up via Clerk, we collect
|
|
||||||
your email address, display name, and optional profile information.
|
|
||||||
Clerk Inc. processes this data as an authentication sub-processor
|
|
||||||
under their own privacy policy (
|
|
||||||
<a href="https://clerk.com/privacy" style={linkStyle}>
|
|
||||||
clerk.com/privacy
|
|
||||||
</a>
|
|
||||||
).
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
<strong>Subscription data</strong>: when you upgrade to Team,
|
|
||||||
Stripe Inc. processes your payment information. We never see or
|
|
||||||
store your card details — Stripe returns only a customer ID and
|
|
||||||
subscription status to us (
|
|
||||||
<a href="https://stripe.com/privacy" style={linkStyle}>
|
|
||||||
stripe.com/privacy
|
|
||||||
</a>
|
|
||||||
).
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
<strong>Product analytics</strong>: with your opt-in (default off),
|
|
||||||
we collect anonymous usage events (onboarding completion, feature
|
|
||||||
interactions) via PostHog Inc. to improve the product. You can opt
|
|
||||||
out at any time in Settings → Privacy (
|
|
||||||
<a href="https://posthog.com/privacy" style={linkStyle}>
|
|
||||||
posthog.com/privacy
|
|
||||||
</a>
|
|
||||||
).
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
<strong>Local memory</strong>: Waggle OS stores your conversations,
|
|
||||||
memories, and harvested content <strong>locally on your device</strong>{' '}
|
|
||||||
in a SQLite database (the <code>.waggle/</code> directory). We do
|
|
||||||
not transmit this data to our servers. If you choose to enable
|
|
||||||
shared team workspaces (Teams tier), encrypted memory bundles are
|
|
||||||
stored on our infrastructure for synchronization; you control which
|
|
||||||
workspaces sync.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>2. How we use your data</h2>
|
|
||||||
<ul style={listStyle}>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Provide the Service (authentication, subscription management, support).
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Improve the Service (analytics where you’ve opted in).
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Comply with legal obligations (tax records, fraud prevention).
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
We do not sell your personal data and do not use it for advertising.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>3. Where your data lives</h2>
|
|
||||||
<ul style={listStyle}>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Account and subscription data: Clerk and Stripe (US- and EU-region
|
|
||||||
processors).
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Analytics (opt-in only): PostHog (US-region).
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Memory and conversations: your device. Optionally your Teams
|
|
||||||
workspace bundle.
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Egzakta’s own systems: minimal account and billing metadata in
|
|
||||||
encrypted storage.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>4. Your rights (GDPR and similar regimes)</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
You have the right to access, rectify, port, restrict, or delete your
|
|
||||||
personal data, and to object to processing. To exercise these rights,
|
|
||||||
email <strong>privacy@egzakta.com</strong>. We aim to respond within
|
|
||||||
30 days.
|
|
||||||
</p>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Local memory data: you can erase all locally-stored data at any time
|
|
||||||
via Settings → Privacy → Erase All Data. This is irreversible and
|
|
||||||
does not require contacting us.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>5. Retention</h2>
|
|
||||||
<ul style={listStyle}>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Account data: retained while your account is active plus 90 days
|
|
||||||
after deletion for billing reconciliation.
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Subscription data: retained per Stripe’s record-keeping
|
|
||||||
requirements (typically 7 years for accounting).
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Analytics (opt-in only): retained 12 months.
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Local memory: retained until you delete it. Egzakta has no access.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>6. Cookies and tracking</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
We use strictly-necessary cookies for authentication (Clerk session)
|
|
||||||
and, with your opt-in, analytics cookies (PostHog). See our{' '}
|
|
||||||
<a href="/cookies" style={linkStyle}>
|
|
||||||
Cookie Policy
|
|
||||||
</a>
|
|
||||||
.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>7. Changes to this policy</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
We may update this policy. Material changes will be announced via the
|
|
||||||
product and email. Continued use after a change means you accept the
|
|
||||||
updated terms.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>8. Contact</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Egzakta Group d.o.o.
|
|
||||||
<br />
|
|
||||||
Registered office: Belgrade, Republic of Serbia
|
|
||||||
<br />
|
|
||||||
Email: <strong>privacy@egzakta.com</strong>
|
|
||||||
<br />
|
|
||||||
Data Protection Officer: <strong>dpo@egzakta.com</strong>
|
|
||||||
</p>
|
|
||||||
</article>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const h1Style: CSSProperties = {
|
|
||||||
fontSize: 'clamp(28px, 4vw, 36px)',
|
|
||||||
fontWeight: 700,
|
|
||||||
marginBottom: 24,
|
|
||||||
color: 'var(--hive-50, #f6f1e4)',
|
|
||||||
};
|
|
||||||
|
|
||||||
const h2Style: CSSProperties = {
|
|
||||||
fontSize: 'clamp(18px, 2.4vw, 22px)',
|
|
||||||
fontWeight: 600,
|
|
||||||
marginTop: 32,
|
|
||||||
marginBottom: 12,
|
|
||||||
color: 'var(--hive-50, #f6f1e4)',
|
|
||||||
};
|
|
||||||
|
|
||||||
const metaLineStyle: CSSProperties = {
|
|
||||||
fontSize: 13,
|
|
||||||
color: 'var(--hive-300, #948a73)',
|
|
||||||
marginBottom: 24,
|
|
||||||
};
|
|
||||||
|
|
||||||
const paragraphStyle: CSSProperties = {
|
|
||||||
fontSize: 15,
|
|
||||||
lineHeight: 1.7,
|
|
||||||
color: 'var(--hive-200, #d8cfba)',
|
|
||||||
marginBottom: 16,
|
|
||||||
};
|
|
||||||
|
|
||||||
const listStyle: CSSProperties = {
|
|
||||||
paddingLeft: 24,
|
|
||||||
marginBottom: 16,
|
|
||||||
color: 'var(--hive-200, #d8cfba)',
|
|
||||||
};
|
|
||||||
|
|
||||||
const listItemStyle: CSSProperties = {
|
|
||||||
fontSize: 15,
|
|
||||||
lineHeight: 1.7,
|
|
||||||
marginBottom: 8,
|
|
||||||
};
|
|
||||||
|
|
||||||
const linkStyle: CSSProperties = {
|
|
||||||
color: 'var(--honey-400, #f6c45a)',
|
|
||||||
textDecoration: 'underline',
|
|
||||||
};
|
|
||||||
@@ -1,198 +0,0 @@
|
|||||||
import type { Metadata } from 'next';
|
|
||||||
import type { CSSProperties } from 'react';
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
|
||||||
title: 'Terms of Service — Waggle',
|
|
||||||
description:
|
|
||||||
'Terms of Service for Waggle OS by Egzakta Group d.o.o.',
|
|
||||||
robots: { index: false, follow: false },
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function TermsPage() {
|
|
||||||
return (
|
|
||||||
<article>
|
|
||||||
<h1 style={h1Style}>Terms of Service</h1>
|
|
||||||
<p style={metaLineStyle}>
|
|
||||||
<strong>Effective date:</strong> July 8, 2026 · <strong>Last updated:</strong> July 8, 2026
|
|
||||||
</p>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
These Terms of Service (“Terms”) govern your use of Waggle
|
|
||||||
OS (the “Service”), provided by Egzakta Group d.o.o.
|
|
||||||
(“Egzakta”, “we”, “us”). By
|
|
||||||
creating an account or installing the Waggle desktop application, you
|
|
||||||
agree to these Terms.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>1. The Service</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Waggle OS is a desktop AI agent platform with persistent local memory.
|
|
||||||
The Service includes the Waggle desktop application, the cloud-hosted
|
|
||||||
account infrastructure, and optional team collaboration features.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>2. Account</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
You must be at least 16 years old to use the Service. You are
|
|
||||||
responsible for maintaining the confidentiality of your account
|
|
||||||
credentials. You agree to provide accurate and current information
|
|
||||||
when creating an account.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>3. Acceptable use</h2>
|
|
||||||
<p style={paragraphStyle}>You agree not to:</p>
|
|
||||||
<ul style={listStyle}>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Use the Service to violate any law or third-party rights.
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Attempt to reverse-engineer, modify, or interfere with the
|
|
||||||
Service’s protections.
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Use the Service to generate content that infringes intellectual
|
|
||||||
property, defames individuals, or violates privacy.
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Submit data you do not have the right to submit (including
|
|
||||||
confidential or copyrighted third-party content).
|
|
||||||
</li>
|
|
||||||
<li style={listItemStyle}>
|
|
||||||
Use the Service to develop or train competing AI products.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>4. Subscription and billing</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Solo tier: free, forever, for all personal use — full memory,
|
|
||||||
Harvest import, unlimited workspaces, and any model with your own
|
|
||||||
keys. Team tier (USD 49/seat/month): adds shared workspaces and team
|
|
||||||
collaboration.
|
|
||||||
</p>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Subscriptions are billed in advance through Stripe. Auto-renewal is
|
|
||||||
on by default; you can cancel at any time in account settings.
|
|
||||||
Cancellations take effect at the end of the current billing period.
|
|
||||||
We do not refund partial periods except where required by law.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>5. Trial</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
A free 15-day trial of all features is available to new accounts. If
|
|
||||||
you do not subscribe at trial end, your account converts to the Solo
|
|
||||||
tier and trial features become inaccessible. Trial data is retained
|
|
||||||
per the{' '}
|
|
||||||
<a href="/privacy" style={linkStyle}>
|
|
||||||
Privacy Policy
|
|
||||||
</a>
|
|
||||||
.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>6. Intellectual property</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
You retain ownership of content you create, store, or process via the
|
|
||||||
Service. You grant Egzakta a limited license to host and process your
|
|
||||||
content solely to provide the Service.
|
|
||||||
</p>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Egzakta retains all rights in the Service, including source code,
|
|
||||||
documentation, and marketing materials. Open-source components are
|
|
||||||
governed by their respective licenses (notably Apache 2.0 for the
|
|
||||||
hive-mind substrate).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>7. Disclaimer of warranties</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
The Service is provided “as is” without warranties of any
|
|
||||||
kind. We do not warrant that the Service will be uninterrupted,
|
|
||||||
error-free, or that AI-generated outputs will be accurate, complete,
|
|
||||||
or fit for any particular purpose. You are responsible for verifying
|
|
||||||
AI-generated content before acting on it.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>8. Limitation of liability</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
To the maximum extent permitted by law, Egzakta’s total
|
|
||||||
liability for any claim arising from the Service is limited to the
|
|
||||||
fees you paid Egzakta in the 12 months preceding the claim. We are
|
|
||||||
not liable for indirect, incidental, or consequential damages.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>9. Termination</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Either party may terminate at any time. We may suspend or terminate
|
|
||||||
your account for material breach of these Terms. Upon termination,
|
|
||||||
you may export your data for 30 days; after that, we may delete your
|
|
||||||
account data in accordance with the Privacy Policy.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>10. Governing law</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
These Terms are governed by the laws of the Republic of Serbia.
|
|
||||||
Disputes shall be resolved in the competent courts of Belgrade,
|
|
||||||
Serbia, except where mandatory consumer protection laws in your
|
|
||||||
jurisdiction provide otherwise.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>11. Changes to the Terms</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
We may update these Terms. Material changes will be announced at
|
|
||||||
least 30 days in advance via the product and email. Continued use
|
|
||||||
after the change means you accept the updated Terms.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2 style={h2Style}>12. Contact</h2>
|
|
||||||
<p style={paragraphStyle}>
|
|
||||||
Egzakta Group d.o.o.
|
|
||||||
<br />
|
|
||||||
Registered office: Belgrade, Republic of Serbia
|
|
||||||
<br />
|
|
||||||
Email: <strong>legal@egzakta.com</strong>
|
|
||||||
</p>
|
|
||||||
</article>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const h1Style: CSSProperties = {
|
|
||||||
fontSize: 'clamp(28px, 4vw, 36px)',
|
|
||||||
fontWeight: 700,
|
|
||||||
marginBottom: 24,
|
|
||||||
color: 'var(--hive-50, #f6f1e4)',
|
|
||||||
};
|
|
||||||
|
|
||||||
const h2Style: CSSProperties = {
|
|
||||||
fontSize: 'clamp(18px, 2.4vw, 22px)',
|
|
||||||
fontWeight: 600,
|
|
||||||
marginTop: 32,
|
|
||||||
marginBottom: 12,
|
|
||||||
color: 'var(--hive-50, #f6f1e4)',
|
|
||||||
};
|
|
||||||
|
|
||||||
const metaLineStyle: CSSProperties = {
|
|
||||||
fontSize: 13,
|
|
||||||
color: 'var(--hive-300, #948a73)',
|
|
||||||
marginBottom: 24,
|
|
||||||
};
|
|
||||||
|
|
||||||
const paragraphStyle: CSSProperties = {
|
|
||||||
fontSize: 15,
|
|
||||||
lineHeight: 1.7,
|
|
||||||
color: 'var(--hive-200, #d8cfba)',
|
|
||||||
marginBottom: 16,
|
|
||||||
};
|
|
||||||
|
|
||||||
const listStyle: CSSProperties = {
|
|
||||||
paddingLeft: 24,
|
|
||||||
marginBottom: 16,
|
|
||||||
color: 'var(--hive-200, #d8cfba)',
|
|
||||||
};
|
|
||||||
|
|
||||||
const listItemStyle: CSSProperties = {
|
|
||||||
fontSize: 15,
|
|
||||||
lineHeight: 1.7,
|
|
||||||
marginBottom: 8,
|
|
||||||
};
|
|
||||||
|
|
||||||
const linkStyle: CSSProperties = {
|
|
||||||
color: 'var(--honey-400, #f6c45a)',
|
|
||||||
textDecoration: 'underline',
|
|
||||||
};
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
interface BrandMarkProps {
|
|
||||||
readonly size?: number;
|
|
||||||
readonly withWordmark?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Waggle brand mark: a hive cell (pointy-top hexagon) holding a honey core —
|
|
||||||
* one memory node in the graph. Pure SVG so it stays crisp at every density
|
|
||||||
* and inherits no JPEG artifacts (replaces the legacy logo.jpeg raster).
|
|
||||||
*/
|
|
||||||
export default function BrandMark({ size = 28, withWordmark = false }: BrandMarkProps) {
|
|
||||||
const mark = (
|
|
||||||
<svg
|
|
||||||
width={size}
|
|
||||||
height={size}
|
|
||||||
viewBox="0 0 32 32"
|
|
||||||
fill="none"
|
|
||||||
role="img"
|
|
||||||
aria-label="Waggle"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M16 3 L27.26 9.5 L27.26 22.5 L16 29 L4.74 22.5 L4.74 9.5 Z"
|
|
||||||
stroke="var(--honey-500, #e9a52c)"
|
|
||||||
strokeWidth="2.4"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
fill="none"
|
|
||||||
/>
|
|
||||||
<path
|
|
||||||
d="M16 10.8 L20.5 13.4 L20.5 18.6 L16 21.2 L11.5 18.6 L11.5 13.4 Z"
|
|
||||||
fill="var(--honey-400, #f6c45a)"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!withWordmark) return mark;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<span
|
|
||||||
style={{
|
|
||||||
display: 'inline-flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
gap: 10,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{mark}
|
|
||||||
<span
|
|
||||||
style={{
|
|
||||||
fontSize: 17,
|
|
||||||
fontWeight: 700,
|
|
||||||
letterSpacing: '-0.02em',
|
|
||||||
color: 'var(--hive-50, #f6f1e4)',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Waggle
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,537 +0,0 @@
|
|||||||
'use client';
|
|
||||||
|
|
||||||
import {
|
|
||||||
useCallback,
|
|
||||||
useState,
|
|
||||||
type CSSProperties,
|
|
||||||
type KeyboardEvent,
|
|
||||||
type ReactNode,
|
|
||||||
} from 'react';
|
|
||||||
import Image from 'next/image';
|
|
||||||
import { useTranslations } from 'next-intl';
|
|
||||||
import {
|
|
||||||
HEX_TEXTURE_PATH,
|
|
||||||
personas,
|
|
||||||
type Persona,
|
|
||||||
type PersonaSlug,
|
|
||||||
} from '../_data/personas';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 4x4 grid sequence in row-major order. `'filler'` slots occupy top-left,
|
|
||||||
* top-right, and bottom-right corners. Numbers reference `Persona.order`.
|
|
||||||
*/
|
|
||||||
const LANDING_GRID_SEQUENCE: ReadonlyArray<'filler' | number> = [
|
|
||||||
'filler', 1, 2, 'filler',
|
|
||||||
3, 4, 5, 6,
|
|
||||||
7, 8, 9, 10,
|
|
||||||
11, 12, 13, 'filler',
|
|
||||||
];
|
|
||||||
|
|
||||||
const personaByOrder = new Map<number, Persona>(
|
|
||||||
personas.map((p) => [p.order, p]),
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Per-persona accent — a curated warm ramp (honey / amber / copper / bronze /
|
|
||||||
* terracotta family; no purple, no gradients). Round-6 palette discipline:
|
|
||||||
* exactly ONE muted cool note survives (sleeping → night blue, where the hue
|
|
||||||
* IS the meaning); everything else stays in the warm-Hive family. Each tile
|
|
||||||
* gets its hue on the title, top hairline, and hover border/glow so the grid
|
|
||||||
* reads as a cast of characters, not a spreadsheet. Hues are chosen so
|
|
||||||
* horizontally/vertically adjacent tiles (4-col landing grid) never repeat,
|
|
||||||
* and a few map to meaning (confused → terracotta flag, researcher/team →
|
|
||||||
* deep bronze, analyst/architect → copper).
|
|
||||||
*/
|
|
||||||
const PERSONA_ACCENTS: Readonly<Record<PersonaSlug, string>> = {
|
|
||||||
hunter: '#f6c45a',
|
|
||||||
researcher: '#c07e16',
|
|
||||||
analyst: '#d98a3d',
|
|
||||||
connector: '#f2b950',
|
|
||||||
architect: '#d98a3d',
|
|
||||||
builder: '#e9a52c',
|
|
||||||
writer: '#e0916f',
|
|
||||||
orchestrator: '#e9a52c',
|
|
||||||
marketer: '#f6c45a',
|
|
||||||
team: '#c07e16',
|
|
||||||
celebrating: '#f9d27e',
|
|
||||||
confused: '#db8068',
|
|
||||||
sleeping: '#86a9d1',
|
|
||||||
};
|
|
||||||
|
|
||||||
export interface BrandPersonasCardProps {
|
|
||||||
/** Optional uppercase kicker rendered above the heading (e.g. "Built for"). */
|
|
||||||
eyebrow?: string;
|
|
||||||
heading?: string;
|
|
||||||
subtitle?: string;
|
|
||||||
showFillerTiles?: boolean;
|
|
||||||
variant?: 'landing' | 'compact';
|
|
||||||
onTileHover?: (slug: PersonaSlug) => void;
|
|
||||||
onPersonaClick?: (slug: PersonaSlug) => void;
|
|
||||||
cta?: ReactNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Single-surface canon of the 13 Waggle bee personas.
|
|
||||||
*
|
|
||||||
* @remarks
|
|
||||||
* Copy is imported verbatim from `_data/personas.ts` — do not override in-place.
|
|
||||||
* Assets are loaded eagerly via `next/image` (optimizer serves ~256px
|
|
||||||
* AVIF/WebP of the 2048px source PNGs) with an `onError` fallback that flips
|
|
||||||
* the tile to a hex-texture placeholder. The placeholder auto-disables when an
|
|
||||||
* asset loads successfully, so shipping new PNGs requires no code change.
|
|
||||||
*
|
|
||||||
* @todo compact variant scaffolding — implement in future sprint
|
|
||||||
*/
|
|
||||||
export default function BrandPersonasCard({
|
|
||||||
eyebrow,
|
|
||||||
heading,
|
|
||||||
subtitle,
|
|
||||||
showFillerTiles = true,
|
|
||||||
variant = 'landing',
|
|
||||||
onTileHover,
|
|
||||||
onPersonaClick,
|
|
||||||
cta,
|
|
||||||
}: BrandPersonasCardProps) {
|
|
||||||
const t = useTranslations('landing.brand_personas');
|
|
||||||
const resolvedHeading = heading ?? t('default_heading');
|
|
||||||
const resolvedSubtitle = subtitle ?? t('default_subtitle');
|
|
||||||
const [erroredSlugs, setErroredSlugs] = useState<ReadonlySet<PersonaSlug>>(
|
|
||||||
() => new Set(),
|
|
||||||
);
|
|
||||||
|
|
||||||
const handleAssetError = useCallback((slug: PersonaSlug) => {
|
|
||||||
setErroredSlugs((prev) => {
|
|
||||||
if (prev.has(slug)) return prev;
|
|
||||||
const next = new Set(prev);
|
|
||||||
next.add(slug);
|
|
||||||
return next;
|
|
||||||
});
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
if (variant === 'compact') {
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
data-testid="brand-personas-card-compact"
|
|
||||||
data-variant="compact"
|
|
||||||
aria-label={t('compact_aria')}
|
|
||||||
>
|
|
||||||
{/* Compact variant scaffolding — intentional stub.
|
|
||||||
TypeScript interface is stable; parent pages may wire props today
|
|
||||||
and receive a fuller layout in a future sprint without refactor. */}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<section
|
|
||||||
data-testid="brand-personas-card"
|
|
||||||
data-variant="landing"
|
|
||||||
aria-labelledby="waggle-hive-heading"
|
|
||||||
style={sectionStyle}
|
|
||||||
>
|
|
||||||
<header style={headerStyle}>
|
|
||||||
{eyebrow ? <p style={eyebrowStyle}>{eyebrow}</p> : null}
|
|
||||||
<h2 id="waggle-hive-heading" style={headingStyle}>
|
|
||||||
{resolvedHeading}
|
|
||||||
</h2>
|
|
||||||
<p style={subtitleStyle}>{resolvedSubtitle}</p>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<ul
|
|
||||||
role="list"
|
|
||||||
data-testid="brand-personas-grid"
|
|
||||||
className="waggle-persona-grid"
|
|
||||||
>
|
|
||||||
{LANDING_GRID_SEQUENCE.map((entry, index) => {
|
|
||||||
if (entry === 'filler') {
|
|
||||||
if (!showFillerTiles) return null;
|
|
||||||
return (
|
|
||||||
<li
|
|
||||||
key={`filler-${index}`}
|
|
||||||
aria-hidden="true"
|
|
||||||
data-testid="brand-personas-filler"
|
|
||||||
className="waggle-persona-filler"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const persona = personaByOrder.get(entry);
|
|
||||||
if (!persona) {
|
|
||||||
// Guard: should never happen — sequence mirrors canonical order.
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<PersonaTile
|
|
||||||
key={persona.slug}
|
|
||||||
persona={persona}
|
|
||||||
hasError={erroredSlugs.has(persona.slug)}
|
|
||||||
onAssetError={handleAssetError}
|
|
||||||
onPersonaClick={onPersonaClick}
|
|
||||||
onTileHover={onTileHover}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
{cta ? (
|
|
||||||
<div data-testid="brand-personas-cta" style={ctaWrapperStyle}>
|
|
||||||
{cta}
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
|
|
||||||
<style>{scopedCss}</style>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PersonaTileProps {
|
|
||||||
persona: Persona;
|
|
||||||
hasError: boolean;
|
|
||||||
onAssetError: (slug: PersonaSlug) => void;
|
|
||||||
onPersonaClick?: (slug: PersonaSlug) => void;
|
|
||||||
onTileHover?: (slug: PersonaSlug) => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
function PersonaTile({
|
|
||||||
persona,
|
|
||||||
hasError,
|
|
||||||
onAssetError,
|
|
||||||
onPersonaClick,
|
|
||||||
onTileHover,
|
|
||||||
}: PersonaTileProps) {
|
|
||||||
const handleClick = useCallback(() => {
|
|
||||||
onPersonaClick?.(persona.slug);
|
|
||||||
}, [onPersonaClick, persona.slug]);
|
|
||||||
|
|
||||||
const handleKey = useCallback(
|
|
||||||
(event: KeyboardEvent<HTMLElement>) => {
|
|
||||||
if (!onPersonaClick) return;
|
|
||||||
if (event.key === 'Enter' || event.key === ' ') {
|
|
||||||
event.preventDefault();
|
|
||||||
onPersonaClick(persona.slug);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[onPersonaClick, persona.slug],
|
|
||||||
);
|
|
||||||
|
|
||||||
const handleHover = useCallback(() => {
|
|
||||||
onTileHover?.(persona.slug);
|
|
||||||
}, [onTileHover, persona.slug]);
|
|
||||||
|
|
||||||
const handleFocus = useCallback(() => {
|
|
||||||
// Keyboard-only "hover" equivalent so a11y consumers get the same signal.
|
|
||||||
onTileHover?.(persona.slug);
|
|
||||||
}, [onTileHover, persona.slug]);
|
|
||||||
|
|
||||||
const isInteractive = Boolean(onPersonaClick);
|
|
||||||
|
|
||||||
const figure = (
|
|
||||||
<figure className="waggle-persona-figure">
|
|
||||||
<div className="waggle-persona-asset-frame">
|
|
||||||
{hasError ? (
|
|
||||||
<div
|
|
||||||
data-testid={`persona-placeholder-${persona.slug}`}
|
|
||||||
data-placeholder="true"
|
|
||||||
className="waggle-persona-placeholder"
|
|
||||||
aria-hidden="true"
|
|
||||||
>
|
|
||||||
<span className="waggle-persona-placeholder-dot" />
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
/* next/image (optimizer → ~256px AVIF/WebP) makes eager loading
|
|
||||||
affordable; the raw 2048px PNGs are ~2.5 MB each. Eager so a
|
|
||||||
tile never paints as an empty frame while lazy IO waits. */
|
|
||||||
<Image
|
|
||||||
src={persona.imagePath}
|
|
||||||
alt={persona.alt}
|
|
||||||
loading="eager"
|
|
||||||
width={256}
|
|
||||||
height={256}
|
|
||||||
className="waggle-persona-asset"
|
|
||||||
onError={() => onAssetError(persona.slug)}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<figcaption className="waggle-persona-caption">
|
|
||||||
<strong className="waggle-persona-title">{persona.title}</strong>
|
|
||||||
<span className="waggle-persona-role">{persona.role}</span>
|
|
||||||
</figcaption>
|
|
||||||
</figure>
|
|
||||||
);
|
|
||||||
|
|
||||||
const tileStyle = {
|
|
||||||
'--accent': PERSONA_ACCENTS[persona.slug],
|
|
||||||
} as CSSProperties;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<li
|
|
||||||
data-testid={`persona-tile-${persona.slug}`}
|
|
||||||
data-slug={persona.slug}
|
|
||||||
data-placeholder={hasError ? 'true' : undefined}
|
|
||||||
className="waggle-persona-tile"
|
|
||||||
style={tileStyle}
|
|
||||||
onMouseEnter={handleHover}
|
|
||||||
onFocus={handleFocus}
|
|
||||||
>
|
|
||||||
{isInteractive ? (
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="waggle-persona-button"
|
|
||||||
aria-label={persona.alt}
|
|
||||||
onClick={handleClick}
|
|
||||||
onKeyDown={handleKey}
|
|
||||||
>
|
|
||||||
{figure}
|
|
||||||
</button>
|
|
||||||
) : (
|
|
||||||
figure
|
|
||||||
)}
|
|
||||||
</li>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------ */
|
|
||||||
/* Inline styles (match existing apps/www convention — no Tailwind) */
|
|
||||||
/* ------------------------------------------------------------------ */
|
|
||||||
|
|
||||||
const sectionStyle: CSSProperties = {
|
|
||||||
background: 'var(--hive-950, #0e0c07)',
|
|
||||||
padding: '96px 24px',
|
|
||||||
width: '100%',
|
|
||||||
boxSizing: 'border-box',
|
|
||||||
};
|
|
||||||
|
|
||||||
const headerStyle: CSSProperties = {
|
|
||||||
maxWidth: 1200,
|
|
||||||
margin: '0 auto 48px',
|
|
||||||
textAlign: 'center',
|
|
||||||
};
|
|
||||||
|
|
||||||
const eyebrowStyle: CSSProperties = {
|
|
||||||
fontFamily: "var(--sans)",
|
|
||||||
fontSize: 11,
|
|
||||||
fontWeight: 600,
|
|
||||||
textTransform: 'uppercase',
|
|
||||||
letterSpacing: '0.12em',
|
|
||||||
color: 'var(--honey-500, #e9a52c)',
|
|
||||||
margin: 0,
|
|
||||||
marginBottom: 12,
|
|
||||||
};
|
|
||||||
|
|
||||||
const headingStyle: CSSProperties = {
|
|
||||||
fontFamily: "var(--sans)",
|
|
||||||
fontSize: 'clamp(28px, 4vw, 32px)',
|
|
||||||
fontWeight: 700,
|
|
||||||
color: 'var(--hive-50, #f6f1e4)',
|
|
||||||
margin: 0,
|
|
||||||
marginBottom: 12,
|
|
||||||
};
|
|
||||||
|
|
||||||
const subtitleStyle: CSSProperties = {
|
|
||||||
fontFamily: "var(--sans)",
|
|
||||||
fontSize: 'clamp(16px, 2vw, 18px)',
|
|
||||||
fontWeight: 400,
|
|
||||||
color: 'var(--hive-300, #c8bfa9)',
|
|
||||||
margin: 0,
|
|
||||||
};
|
|
||||||
|
|
||||||
const ctaWrapperStyle: CSSProperties = {
|
|
||||||
maxWidth: 1200,
|
|
||||||
margin: '48px auto 0',
|
|
||||||
display: 'flex',
|
|
||||||
justifyContent: 'center',
|
|
||||||
};
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------ */
|
|
||||||
/* Scoped CSS — component-local selectors to avoid global collisions */
|
|
||||||
/* ------------------------------------------------------------------ */
|
|
||||||
|
|
||||||
const scopedCss = `
|
|
||||||
.waggle-persona-grid {
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 auto;
|
|
||||||
max-width: 1200px;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
||||||
gap: 16px;
|
|
||||||
}
|
|
||||||
@media (max-width: 1023px) {
|
|
||||||
.waggle-persona-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
||||||
.waggle-persona-filler { display: none; }
|
|
||||||
}
|
|
||||||
@media (max-width: 640px) {
|
|
||||||
.waggle-persona-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
||||||
}
|
|
||||||
.waggle-persona-tile {
|
|
||||||
position: relative;
|
|
||||||
list-style: none;
|
|
||||||
overflow: hidden;
|
|
||||||
background: linear-gradient(180deg, #14110b 0%, #0e0c07 100%);
|
|
||||||
border: 1px solid #1f1a12;
|
|
||||||
border-radius: 16px;
|
|
||||||
padding: 20px;
|
|
||||||
min-height: 260px;
|
|
||||||
transition: border-color 200ms ease-out, transform 200ms ease-out,
|
|
||||||
box-shadow 200ms ease-out;
|
|
||||||
}
|
|
||||||
/* Per-role accent hairline across the top edge of each tile. */
|
|
||||||
.waggle-persona-tile::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
height: 2px;
|
|
||||||
background: var(--accent, #e9a52c);
|
|
||||||
opacity: 0.5;
|
|
||||||
transition: opacity 200ms ease-out;
|
|
||||||
}
|
|
||||||
.waggle-persona-tile:hover,
|
|
||||||
.waggle-persona-tile:focus-within {
|
|
||||||
border-color: var(--accent, #e9a52c);
|
|
||||||
transform: translateY(-3px);
|
|
||||||
box-shadow: 0 12px 34px -16px color-mix(in srgb, var(--accent, #e9a52c) 55%, transparent);
|
|
||||||
}
|
|
||||||
.waggle-persona-tile:hover::before,
|
|
||||||
.waggle-persona-tile:focus-within::before {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
.waggle-persona-tile,
|
|
||||||
.waggle-persona-tile:hover,
|
|
||||||
.waggle-persona-tile:focus-within {
|
|
||||||
transition: none;
|
|
||||||
transform: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.waggle-persona-button {
|
|
||||||
all: unset;
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
cursor: pointer;
|
|
||||||
border-radius: 12px;
|
|
||||||
}
|
|
||||||
.waggle-persona-button:focus-visible {
|
|
||||||
outline: 2px solid var(--accent, #e9a52c);
|
|
||||||
outline-offset: 2px;
|
|
||||||
}
|
|
||||||
.waggle-persona-figure {
|
|
||||||
margin: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
gap: 16px;
|
|
||||||
}
|
|
||||||
.waggle-persona-asset-frame {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
aspect-ratio: 1 / 1;
|
|
||||||
max-width: 256px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
.waggle-persona-asset {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: contain;
|
|
||||||
display: block;
|
|
||||||
/* The mascot PNGs are background-transparent (2026-07-06 flood-fill) —
|
|
||||||
they sit directly on the card gradient. The old dark vignette +
|
|
||||||
edge-fade masks compensated for baked-black squares and are gone:
|
|
||||||
with real alpha they READ as a dark box behind the art. */
|
|
||||||
filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
|
|
||||||
}
|
|
||||||
.waggle-persona-placeholder {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background-image: url("${HEX_TEXTURE_PATH}");
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
background-color: #14110b;
|
|
||||||
opacity: 0.6;
|
|
||||||
border-radius: 12px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
.waggle-persona-placeholder-dot {
|
|
||||||
display: block;
|
|
||||||
width: 48px;
|
|
||||||
height: 48px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: #f6c45a;
|
|
||||||
box-shadow: 0 0 24px rgba(246, 196, 90, 0.4);
|
|
||||||
}
|
|
||||||
.waggle-persona-caption {
|
|
||||||
text-align: center;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 6px;
|
|
||||||
}
|
|
||||||
.waggle-persona-title {
|
|
||||||
font-family: var(--sans);
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--accent, #f6c45a);
|
|
||||||
letter-spacing: 0.01em;
|
|
||||||
}
|
|
||||||
.waggle-persona-role {
|
|
||||||
font-family: var(--sans);
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #c8bfa9;
|
|
||||||
line-height: 1.45;
|
|
||||||
}
|
|
||||||
/* Filler slots keep the staggered grid rhythm without reading as broken
|
|
||||||
cards: no border, no card surface — an outlined-but-hollow frame looks
|
|
||||||
like missing content. Instead: ambient comb texture that fades out
|
|
||||||
radially, so the corners read as intentional negative space.
|
|
||||||
Decorative only (aria-hidden on the element). */
|
|
||||||
.waggle-persona-filler {
|
|
||||||
position: relative;
|
|
||||||
list-style: none;
|
|
||||||
min-height: 260px;
|
|
||||||
border-radius: 16px;
|
|
||||||
overflow: hidden;
|
|
||||||
/* Round-7: complete the falloff — the texture dissolves toward the grid's
|
|
||||||
outer edge so the ghost reads as intentional ambience, never as an
|
|
||||||
unloaded card. */
|
|
||||||
-webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0.8), rgba(0,0,0,0.15));
|
|
||||||
mask-image: linear-gradient(to right, rgba(0,0,0,0.8), rgba(0,0,0,0.15));
|
|
||||||
}
|
|
||||||
.waggle-persona-filler:nth-of-type(1),
|
|
||||||
li.waggle-persona-filler:first-child {
|
|
||||||
-webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.8), rgba(0,0,0,0.15));
|
|
||||||
mask-image: linear-gradient(to left, rgba(0,0,0,0.8), rgba(0,0,0,0.15));
|
|
||||||
}
|
|
||||||
/* Round-6: fainter + slightly shrunken so the ghosts can't be mistaken for
|
|
||||||
unloaded cards — clearly ambient texture, not content-in-waiting. */
|
|
||||||
.waggle-persona-filler::before {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
inset: 0;
|
|
||||||
background:
|
|
||||||
radial-gradient(circle at 50% 46%, rgba(233, 165, 44, 0.10), rgba(233, 165, 44, 0) 62%),
|
|
||||||
url("${HEX_TEXTURE_PATH}") center / cover no-repeat;
|
|
||||||
opacity: 0.2;
|
|
||||||
transform: scale(0.88);
|
|
||||||
-webkit-mask-image: radial-gradient(circle at 50% 50%, #000 22%, transparent 74%);
|
|
||||||
mask-image: radial-gradient(circle at 50% 50%, #000 22%, transparent 74%);
|
|
||||||
}
|
|
||||||
.waggle-persona-filler::after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
top: 50%;
|
|
||||||
width: 34px;
|
|
||||||
height: 38px;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
background: no-repeat center / contain
|
|
||||||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='46' viewBox='0 0 42 46' fill='none'%3E%3Cpath d='M21 2 L39 12.5 V33.5 L21 44 L3 33.5 V12.5 Z' stroke='%23e9a52c' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
||||||
opacity: 0.18;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
'use client';
|
|
||||||
|
|
||||||
import { useSyncExternalStore, type CSSProperties, type ReactNode } from 'react';
|
|
||||||
import { useTranslations } from 'next-intl';
|
|
||||||
import { detectOSFromUserAgent, type OSId } from '../_lib/os-detection';
|
|
||||||
import { emit, events } from '../_lib/event-taxonomy';
|
|
||||||
|
|
||||||
interface DownloadCTAProps {
|
|
||||||
readonly variant?: 'primary' | 'ghost';
|
|
||||||
readonly size?: 'default' | 'small';
|
|
||||||
readonly section: 'hero' | 'navbar' | 'solo-tier' | 'final-cta';
|
|
||||||
readonly children?: ReactNode;
|
|
||||||
readonly style?: CSSProperties;
|
|
||||||
}
|
|
||||||
|
|
||||||
const DOWNLOAD_URL = '/download';
|
|
||||||
|
|
||||||
const subscribeToClientEnvironment = () => () => {};
|
|
||||||
const getClientOS = () => detectOSFromUserAgent(navigator.userAgent);
|
|
||||||
const getServerOS = (): null => null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* OS-aware download CTA. Renders a generic "Download" label at SSR + first
|
|
||||||
* paint, then swaps to "Download for {os}" after hydration via
|
|
||||||
* `navigator.userAgent` detection.
|
|
||||||
*
|
|
||||||
* Styling comes from the shared `.btn` primitives in globals.css so every
|
|
||||||
* download button on the page is pixel-identical. Strings live in
|
|
||||||
* `messages/en.json` under `landing.download_cta.*` with an ICU placeholder
|
|
||||||
* for the OS name.
|
|
||||||
*/
|
|
||||||
export default function DownloadCTA({
|
|
||||||
variant = 'primary',
|
|
||||||
size = 'default',
|
|
||||||
section,
|
|
||||||
children,
|
|
||||||
style,
|
|
||||||
}: DownloadCTAProps) {
|
|
||||||
const t = useTranslations('landing.download_cta');
|
|
||||||
const os = useSyncExternalStore<OSId | null>(
|
|
||||||
subscribeToClientEnvironment,
|
|
||||||
getClientOS,
|
|
||||||
getServerOS,
|
|
||||||
);
|
|
||||||
|
|
||||||
const label = children ?? (os ? t('with_os', { os }) : t('default'));
|
|
||||||
|
|
||||||
const className = [
|
|
||||||
'btn',
|
|
||||||
variant === 'primary' ? 'btn-primary' : 'btn-ghost',
|
|
||||||
size === 'small' ? 'btn-small' : '',
|
|
||||||
]
|
|
||||||
.filter(Boolean)
|
|
||||||
.join(' ');
|
|
||||||
|
|
||||||
const handleClick = () => {
|
|
||||||
emit({
|
|
||||||
name: events.ctaClick,
|
|
||||||
properties: { section, os: os ?? 'unknown' },
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<a
|
|
||||||
href={DOWNLOAD_URL}
|
|
||||||
className={className}
|
|
||||||
onClick={handleClick}
|
|
||||||
style={style}
|
|
||||||
>
|
|
||||||
{label}
|
|
||||||
</a>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
.header {
|
|
||||||
max-width: 720px;
|
|
||||||
margin: 0 auto 64px;
|
|
||||||
text-align: center;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
gap: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item {
|
|
||||||
padding: 28px 26px 30px;
|
|
||||||
border-radius: var(--r-lg);
|
|
||||||
background: var(--hive-900);
|
|
||||||
border: 1px solid var(--line-soft);
|
|
||||||
transition: border-color 0.2s ease, transform 0.2s ease,
|
|
||||||
box-shadow 0.2s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item:hover {
|
|
||||||
border-color: var(--honey-line);
|
|
||||||
box-shadow: var(--shadow-honey);
|
|
||||||
transform: translateY(-2px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 38px;
|
|
||||||
height: 38px;
|
|
||||||
border-radius: 11px;
|
|
||||||
border: 1px solid var(--honey-line);
|
|
||||||
background: var(--honey-wash);
|
|
||||||
color: var(--honey-400);
|
|
||||||
margin-bottom: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--hive-50);
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.body {
|
|
||||||
font-size: var(--text-small);
|
|
||||||
line-height: 1.6;
|
|
||||||
color: var(--hive-300);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1023px) {
|
|
||||||
.grid {
|
|
||||||
grid-template-columns: repeat(2, 1fr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 640px) {
|
|
||||||
.grid {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
import { getTranslations } from 'next-intl/server';
|
|
||||||
import Reveal from './Reveal';
|
|
||||||
import styles from './FeatureGrid.module.css';
|
|
||||||
|
|
||||||
type FeatureKey =
|
|
||||||
| 'personas'
|
|
||||||
| 'models'
|
|
||||||
| 'harvest'
|
|
||||||
| 'loops'
|
|
||||||
| 'skills'
|
|
||||||
| 'memory_center';
|
|
||||||
|
|
||||||
const FEATURES: readonly FeatureKey[] = [
|
|
||||||
'personas',
|
|
||||||
'models',
|
|
||||||
'harvest',
|
|
||||||
'loops',
|
|
||||||
'skills',
|
|
||||||
'memory_center',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Six feature cards, each naming a real subsystem (persona roster, LiteLLM
|
|
||||||
* routing, Harvest, Loops + approval queue, skills/connectors/MCP catalog,
|
|
||||||
* Memory Center). Strings under `landing.features.*`.
|
|
||||||
*/
|
|
||||||
export default async function FeatureGrid() {
|
|
||||||
const t = await getTranslations('landing.features');
|
|
||||||
|
|
||||||
return (
|
|
||||||
<section
|
|
||||||
id="features"
|
|
||||||
className="section"
|
|
||||||
aria-labelledby="features-heading"
|
|
||||||
>
|
|
||||||
<div className="container-wide">
|
|
||||||
<header className={styles.header}>
|
|
||||||
<p className="eyebrow">{t('eyebrow')}</p>
|
|
||||||
<h2 id="features-heading" className="section-headline">
|
|
||||||
{t('headline')}
|
|
||||||
</h2>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div className={styles.grid}>
|
|
||||||
{FEATURES.map((key, i) => (
|
|
||||||
<Reveal key={key} delay={((i % 3) + 1) as 1 | 2 | 3}>
|
|
||||||
<div className={styles.item}>
|
|
||||||
<span className={styles.icon} aria-hidden="true">
|
|
||||||
<FeatureIcon feature={key} />
|
|
||||||
</span>
|
|
||||||
<h3 className={styles.title}>{t(`items.${key}.title`)}</h3>
|
|
||||||
<p className={styles.body}>{t(`items.${key}.body`)}</p>
|
|
||||||
</div>
|
|
||||||
</Reveal>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Minimal 18px line icons — one per subsystem, stroke inherits currentColor. */
|
|
||||||
function FeatureIcon({ feature }: { readonly feature: FeatureKey }) {
|
|
||||||
const common = {
|
|
||||||
width: 18,
|
|
||||||
height: 18,
|
|
||||||
viewBox: '0 0 18 18',
|
|
||||||
fill: 'none',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
strokeWidth: 1.5,
|
|
||||||
strokeLinecap: 'round',
|
|
||||||
strokeLinejoin: 'round',
|
|
||||||
} as const;
|
|
||||||
|
|
||||||
switch (feature) {
|
|
||||||
case 'personas':
|
|
||||||
return (
|
|
||||||
<svg {...common} aria-hidden="true">
|
|
||||||
<circle cx="6" cy="6.5" r="2.6" />
|
|
||||||
<path d="M1.8 14.8 C2.4 11.8 4.4 10.6 6 10.6 C7.6 10.6 9.6 11.8 10.2 14.8" />
|
|
||||||
<circle cx="12.8" cy="5.4" r="2" />
|
|
||||||
<path d="M10.9 9.4 C12 8.8 14.6 9 16.2 12.4" />
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
case 'models':
|
|
||||||
return (
|
|
||||||
<svg {...common} aria-hidden="true">
|
|
||||||
<circle cx="9" cy="9" r="2.2" />
|
|
||||||
<path d="M9 6.8 V2.2 M9 11.2 V15.8 M6.8 9 H2.2 M11.2 9 H15.8" />
|
|
||||||
<circle cx="9" cy="2.2" r="1.2" />
|
|
||||||
<circle cx="9" cy="15.8" r="1.2" />
|
|
||||||
<circle cx="2.2" cy="9" r="1.2" />
|
|
||||||
<circle cx="15.8" cy="9" r="1.2" />
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
case 'harvest':
|
|
||||||
return (
|
|
||||||
<svg {...common} aria-hidden="true">
|
|
||||||
<path d="M9 2 V11 M5.4 7.6 L9 11.2 L12.6 7.6" />
|
|
||||||
<path d="M2.5 12.5 V14.5 C2.5 15.3 3.2 16 4 16 H14 C14.8 16 15.5 15.3 15.5 14.5 V12.5" />
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
case 'loops':
|
|
||||||
return (
|
|
||||||
<svg {...common} aria-hidden="true">
|
|
||||||
<path d="M14.5 7 A6 6 0 1 0 15.5 10.5" />
|
|
||||||
<path d="M15.8 3.4 L15.8 7.2 L12 7.2" />
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
case 'skills':
|
|
||||||
return (
|
|
||||||
<svg {...common} aria-hidden="true">
|
|
||||||
<rect x="2.4" y="2.4" width="5.6" height="5.6" rx="1.4" />
|
|
||||||
<rect x="10" y="2.4" width="5.6" height="5.6" rx="1.4" />
|
|
||||||
<rect x="2.4" y="10" width="5.6" height="5.6" rx="1.4" />
|
|
||||||
<path d="M12.8 10.4 V15.2 M10.4 12.8 H15.2" />
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
case 'memory_center':
|
|
||||||
return (
|
|
||||||
<svg {...common} aria-hidden="true">
|
|
||||||
<path d="M9 1.8 L15.2 5.4 L15.2 12.6 L9 16.2 L2.8 12.6 L2.8 5.4 Z" />
|
|
||||||
<circle cx="9" cy="9" r="2.4" />
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
.section {
|
|
||||||
position: relative;
|
|
||||||
padding: var(--section-pad) var(--gutter);
|
|
||||||
text-align: center;
|
|
||||||
overflow: hidden;
|
|
||||||
border-top: 1px solid var(--line-soft);
|
|
||||||
}
|
|
||||||
|
|
||||||
.glow {
|
|
||||||
position: absolute;
|
|
||||||
bottom: -300px;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
width: 900px;
|
|
||||||
height: 520px;
|
|
||||||
background: radial-gradient(
|
|
||||||
ellipse at center,
|
|
||||||
rgba(233, 165, 44, 0.1) 0%,
|
|
||||||
rgba(233, 165, 44, 0.03) 45%,
|
|
||||||
transparent 70%
|
|
||||||
);
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.inner {
|
|
||||||
position: relative;
|
|
||||||
max-width: 640px;
|
|
||||||
margin: 0 auto;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.headline {
|
|
||||||
font-size: clamp(2.125rem, 4.5vw, 3.25rem);
|
|
||||||
font-weight: 800;
|
|
||||||
letter-spacing: -0.03em;
|
|
||||||
color: var(--hive-50);
|
|
||||||
margin-bottom: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subhead {
|
|
||||||
font-size: var(--text-lead);
|
|
||||||
line-height: 1.6;
|
|
||||||
color: var(--hive-300);
|
|
||||||
margin-bottom: 36px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ctaRow {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 14px;
|
|
||||||
margin-bottom: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.kvark {
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--text-muted);
|
|
||||||
}
|
|
||||||
|
|
||||||
.kvarkLink {
|
|
||||||
color: var(--honey-400);
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: 600;
|
|
||||||
margin-left: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.kvarkLink:hover {
|
|
||||||
color: var(--honey-300);
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
import { getTranslations } from 'next-intl/server';
|
|
||||||
import DownloadCTA from './DownloadCTA';
|
|
||||||
import styles from './FinalCTA.module.css';
|
|
||||||
|
|
||||||
const WAGGLE_REPO_URL = 'https://github.com/marolinik/waggle-os';
|
|
||||||
const KVARK_CONTACT =
|
|
||||||
'mailto:kvark@egzakta.com?subject=Waggle%20%E2%86%92%20KVARK%20sovereign%20deployment';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Closing CTA — echoes the hero promise, then routes to Download or GitHub,
|
|
||||||
* with the KVARK sovereign-deployment escape hatch underneath. Strings
|
|
||||||
* under `landing.final_cta.*`.
|
|
||||||
*/
|
|
||||||
export default async function FinalCTA() {
|
|
||||||
const t = await getTranslations('landing.final_cta');
|
|
||||||
|
|
||||||
return (
|
|
||||||
<section
|
|
||||||
id="final-cta"
|
|
||||||
className={`${styles.section} honeycomb-bg`}
|
|
||||||
aria-labelledby="final-heading"
|
|
||||||
>
|
|
||||||
<div className={styles.glow} aria-hidden="true" />
|
|
||||||
<div className={styles.inner}>
|
|
||||||
<h2 id="final-heading" className={styles.headline}>
|
|
||||||
{t('headline')}
|
|
||||||
</h2>
|
|
||||||
<p className={styles.subhead}>{t('subhead')}</p>
|
|
||||||
|
|
||||||
<div className={styles.ctaRow}>
|
|
||||||
<DownloadCTA section="final-cta" variant="primary" />
|
|
||||||
<a
|
|
||||||
href={WAGGLE_REPO_URL}
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
className="btn btn-ghost"
|
|
||||||
>
|
|
||||||
{t('cta_github')}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p className={styles.kvark}>
|
|
||||||
{t('kvark_text')}
|
|
||||||
<a href={KVARK_CONTACT} className={styles.kvarkLink}>
|
|
||||||
{t('kvark_cta')} →
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
.footer {
|
|
||||||
padding: 72px var(--gutter) 32px;
|
|
||||||
background: var(--hive-950);
|
|
||||||
border-top: 1px solid var(--line-soft);
|
|
||||||
}
|
|
||||||
|
|
||||||
.grid {
|
|
||||||
max-width: var(--container-wide);
|
|
||||||
margin: 0 auto 56px;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
|
|
||||||
gap: 48px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brandBlock {
|
|
||||||
max-width: 320px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brandDescription {
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 1.6;
|
|
||||||
color: var(--hive-300);
|
|
||||||
margin-top: 14px;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.attribution {
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--text-muted);
|
|
||||||
}
|
|
||||||
|
|
||||||
.columnTitle {
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 600;
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.1em;
|
|
||||||
color: var(--hive-200);
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.columnList {
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.columnList li {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.columnLink {
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--hive-300);
|
|
||||||
text-decoration: none;
|
|
||||||
transition: color 0.15s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.columnLink:hover {
|
|
||||||
color: var(--hive-50);
|
|
||||||
}
|
|
||||||
|
|
||||||
.baseline {
|
|
||||||
max-width: var(--container-wide);
|
|
||||||
margin: 0 auto;
|
|
||||||
padding-top: 24px;
|
|
||||||
border-top: 1px solid var(--hive-800);
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 12px;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--text-muted);
|
|
||||||
}
|
|
||||||
|
|
||||||
.baselineRight {
|
|
||||||
font-family: var(--mono);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1023px) {
|
|
||||||
.grid {
|
|
||||||
grid-template-columns: 1fr 1fr 1fr;
|
|
||||||
gap: 32px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 640px) {
|
|
||||||
.grid {
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
.baseline {
|
|
||||||
justify-content: flex-start;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
import { getTranslations } from 'next-intl/server';
|
|
||||||
import BrandMark from './BrandMark';
|
|
||||||
import styles from './Footer.module.css';
|
|
||||||
|
|
||||||
interface FooterLink {
|
|
||||||
readonly key: string;
|
|
||||||
readonly href: string;
|
|
||||||
readonly external?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Footer link map. Rule: every link must resolve to a real destination —
|
|
||||||
* no `#` placeholders. Columns whose content does not exist yet (blog,
|
|
||||||
* press, changelog) are omitted until they do.
|
|
||||||
*/
|
|
||||||
const PRODUCT_LINKS: readonly FooterLink[] = [
|
|
||||||
{
|
|
||||||
key: 'download',
|
|
||||||
href: '/download',
|
|
||||||
},
|
|
||||||
{ key: 'pricing', href: '/#pricing' },
|
|
||||||
{ key: 'how_it_works', href: '/#how-it-works' },
|
|
||||||
{ key: 'memory', href: '/#memory' },
|
|
||||||
];
|
|
||||||
|
|
||||||
const RESEARCH_LINKS: readonly FooterLink[] = [
|
|
||||||
{ key: 'methodology', href: '/docs/methodology' },
|
|
||||||
{
|
|
||||||
key: 'benchmarks',
|
|
||||||
href: 'https://github.com/marolinik/hive-mind',
|
|
||||||
external: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'hive_mind',
|
|
||||||
href: 'https://github.com/marolinik/hive-mind',
|
|
||||||
external: true,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const COMPANY_LINKS: readonly FooterLink[] = [
|
|
||||||
{ key: 'about_egzakta', href: 'https://egzakta.com', external: true },
|
|
||||||
{ key: 'kvark', href: 'https://www.kvark.ai', external: true },
|
|
||||||
{ key: 'contact', href: 'mailto:hello@egzakta.com' },
|
|
||||||
];
|
|
||||||
|
|
||||||
const LEGAL_LINKS: readonly FooterLink[] = [
|
|
||||||
{ key: 'terms', href: '/terms' },
|
|
||||||
{ key: 'privacy', href: '/privacy' },
|
|
||||||
{ key: 'cookies', href: '/cookies' },
|
|
||||||
{ key: 'eu_ai_act', href: '/eu-ai-act' },
|
|
||||||
{
|
|
||||||
key: 'apache',
|
|
||||||
href: 'https://github.com/marolinik/hive-mind/blob/master/LICENSE',
|
|
||||||
external: true,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const COLUMN_DEFS = [
|
|
||||||
{ ns: 'product', links: PRODUCT_LINKS },
|
|
||||||
{ ns: 'research', links: RESEARCH_LINKS },
|
|
||||||
{ ns: 'company', links: COMPANY_LINKS },
|
|
||||||
{ ns: 'legal', links: LEGAL_LINKS },
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
export default async function Footer() {
|
|
||||||
const t = await getTranslations('landing.footer');
|
|
||||||
|
|
||||||
return (
|
|
||||||
<footer id="footer" className={styles.footer}>
|
|
||||||
<div className={styles.grid}>
|
|
||||||
<div className={styles.brandBlock}>
|
|
||||||
<BrandMark withWordmark />
|
|
||||||
<p className={styles.brandDescription}>{t('brand.description')}</p>
|
|
||||||
<p className={styles.attribution}>{t('brand.attribution')}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{COLUMN_DEFS.map((col) => (
|
|
||||||
<div key={col.ns}>
|
|
||||||
<h3 className={styles.columnTitle}>{t(`columns.${col.ns}.title`)}</h3>
|
|
||||||
<ul className={styles.columnList}>
|
|
||||||
{col.links.map((l) => (
|
|
||||||
<li key={l.key}>
|
|
||||||
<a
|
|
||||||
href={l.href}
|
|
||||||
{...(l.external
|
|
||||||
? { target: '_blank', rel: 'noopener noreferrer' }
|
|
||||||
: null)}
|
|
||||||
className={styles.columnLink}
|
|
||||||
>
|
|
||||||
{t(`columns.${col.ns}.links.${l.key}`)}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className={styles.baseline}>
|
|
||||||
<span>{t('base_line.left')}</span>
|
|
||||||
<span className={styles.baselineRight}>{t('base_line.right')}</span>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,160 +0,0 @@
|
|||||||
.section {
|
|
||||||
position: relative;
|
|
||||||
padding: 168px var(--gutter) 104px;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.glow {
|
|
||||||
position: absolute;
|
|
||||||
top: -240px;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
width: 900px;
|
|
||||||
height: 560px;
|
|
||||||
background: radial-gradient(
|
|
||||||
ellipse at center,
|
|
||||||
rgba(233, 165, 44, 0.09) 0%,
|
|
||||||
rgba(233, 165, 44, 0.03) 45%,
|
|
||||||
transparent 70%
|
|
||||||
);
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.grid {
|
|
||||||
position: relative;
|
|
||||||
max-width: var(--container-wide);
|
|
||||||
margin: 0 auto;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: minmax(0, 10fr) minmax(0, 9fr);
|
|
||||||
gap: 64px;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.copy {
|
|
||||||
max-width: 560px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.headline {
|
|
||||||
font-size: var(--text-display);
|
|
||||||
font-weight: 800;
|
|
||||||
line-height: 1.05;
|
|
||||||
color: var(--hive-50);
|
|
||||||
margin-bottom: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.headlineEmphasis {
|
|
||||||
color: var(--honey-400);
|
|
||||||
}
|
|
||||||
|
|
||||||
.subhead {
|
|
||||||
font-size: var(--text-lead);
|
|
||||||
line-height: 1.6;
|
|
||||||
color: var(--hive-300);
|
|
||||||
margin-bottom: 36px;
|
|
||||||
max-width: 34em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ctaRow {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
align-items: center;
|
|
||||||
gap: 14px;
|
|
||||||
margin-bottom: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.microcopy {
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
align-items: center;
|
|
||||||
gap: 18px;
|
|
||||||
row-gap: 8px;
|
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: var(--text-xs);
|
|
||||||
color: var(--text-muted);
|
|
||||||
letter-spacing: 0.02em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.microItem {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.microDot {
|
|
||||||
width: 4px;
|
|
||||||
height: 4px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--honey-500);
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.visual {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1023px) {
|
|
||||||
.section {
|
|
||||||
padding-top: 136px;
|
|
||||||
padding-bottom: 80px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.grid {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
gap: 56px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.copy {
|
|
||||||
max-width: 640px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Round-7: one benchmark strip in the hero's dead bottom quarter.
|
|
||||||
Wave R Lane E: the 86.49% number is lifted to a flagship stat chip
|
|
||||||
(larger mono, honey-wash lozenge) so the leaderboard claim carries weight
|
|
||||||
near the CTAs; the rest stays quiet supporting mono copy. */
|
|
||||||
.proofStrip {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 12px;
|
|
||||||
margin-top: 28px;
|
|
||||||
max-width: 40em;
|
|
||||||
color: var(--honey-500);
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
.proofStat {
|
|
||||||
flex-shrink: 0;
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: baseline;
|
|
||||||
padding: 6px 12px;
|
|
||||||
border-radius: 10px;
|
|
||||||
background: var(--honey-wash);
|
|
||||||
border: 1px solid var(--honey-line);
|
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: 1.5rem;
|
|
||||||
font-weight: 700;
|
|
||||||
line-height: 1;
|
|
||||||
letter-spacing: -0.02em;
|
|
||||||
color: var(--honey-400);
|
|
||||||
transition: border-color 0.15s ease, background 0.15s ease;
|
|
||||||
}
|
|
||||||
.proofLabel {
|
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: var(--text-xs);
|
|
||||||
letter-spacing: 0.02em;
|
|
||||||
line-height: 1.5;
|
|
||||||
color: var(--text-muted);
|
|
||||||
}
|
|
||||||
.proofStrip:hover .proofStat {
|
|
||||||
border-color: var(--honey-500);
|
|
||||||
background: rgba(233, 165, 44, 0.16);
|
|
||||||
}
|
|
||||||
.proofStrip:hover .proofLabel {
|
|
||||||
color: var(--hive-300);
|
|
||||||
}
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
import { getTranslations } from 'next-intl/server';
|
|
||||||
import DownloadCTA from './DownloadCTA';
|
|
||||||
import HeroVisual from './HeroVisual';
|
|
||||||
import styles from './Hero.module.css';
|
|
||||||
|
|
||||||
const MICROCOPY_KEYS = [
|
|
||||||
'microcopy_free',
|
|
||||||
'microcopy_platforms',
|
|
||||||
'microcopy_oss',
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Hero — single committed headline (the A/B variant infra was removed with
|
|
||||||
* the 2026-07 rebuild). Two columns: positioning copy left, the memory-core
|
|
||||||
* window visual right. All strings under `landing.hero.*`.
|
|
||||||
*/
|
|
||||||
export default async function Hero() {
|
|
||||||
const t = await getTranslations('landing.hero');
|
|
||||||
|
|
||||||
return (
|
|
||||||
<section id="hero" className={`${styles.section} honeycomb-bg`}>
|
|
||||||
<div className={styles.glow} aria-hidden="true" />
|
|
||||||
<div className={styles.grid}>
|
|
||||||
<div className={styles.copy}>
|
|
||||||
<p className="eyebrow">{t('eyebrow')}</p>
|
|
||||||
|
|
||||||
<h1 className={styles.headline}>
|
|
||||||
{t('headline_lead')}{' '}
|
|
||||||
<span className={styles.headlineEmphasis}>
|
|
||||||
{t('headline_emphasis')}
|
|
||||||
</span>
|
|
||||||
.
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<p className={styles.subhead}>{t('subhead')}</p>
|
|
||||||
|
|
||||||
<div className={styles.ctaRow}>
|
|
||||||
<DownloadCTA section="hero" variant="primary" />
|
|
||||||
<a href="#proof" className="btn btn-ghost">
|
|
||||||
{t('cta_secondary')}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ul className={styles.microcopy}>
|
|
||||||
{MICROCOPY_KEYS.map((key) => (
|
|
||||||
<li key={key} className={styles.microItem}>
|
|
||||||
<span aria-hidden="true" className={styles.microDot} />
|
|
||||||
{t(key)}
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
{/* Round-7: the hero's dead bottom quarter carries the product's
|
|
||||||
strongest proof — one benchmark strip, linking to #proof.
|
|
||||||
Wave R Lane E: the 86.49% number is lifted to a flagship stat
|
|
||||||
(larger mono, honey) so the leaderboard claim carries visual
|
|
||||||
weight near the CTAs; the rest stays quiet supporting copy. */}
|
|
||||||
<a href="#proof" className={styles.proofStrip}>
|
|
||||||
<span className={styles.proofStat}>{t('proof_stat')}</span>
|
|
||||||
<span className={styles.proofLabel}>{t('proof_strip')}</span>
|
|
||||||
<span aria-hidden="true">→</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className={styles.visual}>
|
|
||||||
<HeroVisual />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,137 +0,0 @@
|
|||||||
.window {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 560px;
|
|
||||||
border-radius: var(--r-lg);
|
|
||||||
border: 1px solid var(--line);
|
|
||||||
background: linear-gradient(180deg, var(--hive-900) 0%, var(--hive-950) 100%);
|
|
||||||
box-shadow: var(--shadow-elevated);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleBar {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 12px;
|
|
||||||
padding: 10px 14px;
|
|
||||||
border-bottom: 1px solid var(--line-soft);
|
|
||||||
background: rgba(31, 26, 18, 0.6);
|
|
||||||
}
|
|
||||||
|
|
||||||
.trafficDots {
|
|
||||||
display: inline-flex;
|
|
||||||
gap: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.trafficDot {
|
|
||||||
width: 9px;
|
|
||||||
height: 9px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--hive-600);
|
|
||||||
opacity: 0.7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleText {
|
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: 11px;
|
|
||||||
color: var(--text-muted);
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleBadge {
|
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: 10px;
|
|
||||||
letter-spacing: 0.04em;
|
|
||||||
color: var(--honey-400);
|
|
||||||
border: 1px solid var(--honey-line);
|
|
||||||
background: var(--honey-wash);
|
|
||||||
border-radius: 999px;
|
|
||||||
padding: 2px 9px;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.svg {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footerBar {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 12px;
|
|
||||||
padding: 9px 14px;
|
|
||||||
border-top: 1px solid var(--line-soft);
|
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: 10px;
|
|
||||||
letter-spacing: 0.03em;
|
|
||||||
color: var(--text-muted);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Edge pulse: honey energy flowing between memory and models. */
|
|
||||||
.edge {
|
|
||||||
stroke: var(--line-strong);
|
|
||||||
stroke-width: 1.2;
|
|
||||||
fill: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.edgePulse {
|
|
||||||
stroke: var(--honey-500);
|
|
||||||
stroke-width: 1.4;
|
|
||||||
fill: none;
|
|
||||||
stroke-dasharray: 10 110;
|
|
||||||
stroke-linecap: round;
|
|
||||||
opacity: 0.8;
|
|
||||||
animation: edge-flow 3.2s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
.edgePulse2 {
|
|
||||||
animation-delay: 0.8s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.edgePulse3 {
|
|
||||||
animation-delay: 1.6s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.edgePulse4 {
|
|
||||||
animation-delay: 2.4s;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes edge-flow {
|
|
||||||
from {
|
|
||||||
stroke-dashoffset: 120;
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
stroke-dashoffset: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.coreGlow {
|
|
||||||
animation: core-breathe 4s ease-in-out infinite;
|
|
||||||
transform-origin: center;
|
|
||||||
transform-box: fill-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes core-breathe {
|
|
||||||
0%,
|
|
||||||
100% {
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
.edgePulse {
|
|
||||||
animation: none;
|
|
||||||
stroke-dasharray: none;
|
|
||||||
opacity: 0.35;
|
|
||||||
}
|
|
||||||
|
|
||||||
.coreGlow {
|
|
||||||
animation: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,160 +0,0 @@
|
|||||||
import { getTranslations } from 'next-intl/server';
|
|
||||||
import styles from './HeroVisual.module.css';
|
|
||||||
|
|
||||||
const CHIPS = [
|
|
||||||
{ key: 'claude', x: 28, y: 36, flow: 'out' },
|
|
||||||
{ key: 'gpt', x: 374, y: 36, flow: 'out' },
|
|
||||||
{ key: 'qwen', x: 28, y: 258, flow: 'in' },
|
|
||||||
{ key: 'gemini', x: 374, y: 258, flow: 'out' },
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
const CHIP_W = 118;
|
|
||||||
const CHIP_H = 44;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Hero visualization — a desktop-app window (Waggle ships as a Tauri
|
|
||||||
* binary) framing the true architecture: one local memory core serving
|
|
||||||
* four model chips. Edges pulse honey; the `qwen · local` edge flows
|
|
||||||
* INTO the core (commit) while the others flow out (recall).
|
|
||||||
*
|
|
||||||
* Server component: the animation is pure CSS (HeroVisual.module.css),
|
|
||||||
* disabled under `prefers-reduced-motion`. No invented numbers anywhere —
|
|
||||||
* labels name real subsystems only.
|
|
||||||
*/
|
|
||||||
export default async function HeroVisual() {
|
|
||||||
const t = await getTranslations('landing.hero_visual');
|
|
||||||
|
|
||||||
return (
|
|
||||||
<figure className={styles.window} aria-label={t('aria_label')}>
|
|
||||||
<div className={styles.titleBar}>
|
|
||||||
<span className={styles.trafficDots} aria-hidden="true">
|
|
||||||
<span className={styles.trafficDot} />
|
|
||||||
<span className={styles.trafficDot} />
|
|
||||||
<span className={styles.trafficDot} />
|
|
||||||
</span>
|
|
||||||
<span className={styles.titleText}>{t('window_title')}</span>
|
|
||||||
<span className={styles.titleBadge}>{t('window_badge')}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<svg
|
|
||||||
className={styles.svg}
|
|
||||||
viewBox="0 0 520 340"
|
|
||||||
role="img"
|
|
||||||
aria-hidden="true"
|
|
||||||
focusable="false"
|
|
||||||
>
|
|
||||||
<defs>
|
|
||||||
<radialGradient id="hv-core-glow" cx="50%" cy="50%" r="50%">
|
|
||||||
<stop offset="0%" stopColor="rgba(233,165,44,0.22)" />
|
|
||||||
<stop offset="70%" stopColor="rgba(233,165,44,0.05)" />
|
|
||||||
<stop offset="100%" stopColor="rgba(233,165,44,0)" />
|
|
||||||
</radialGradient>
|
|
||||||
</defs>
|
|
||||||
|
|
||||||
{/* Edges: base line + honey pulse. Recall edges run core → chip;
|
|
||||||
the commit edge (qwen · local) runs chip → core. */}
|
|
||||||
<path className={styles.edge} d="M 232,140 C 200,112 182,84 150,62" />
|
|
||||||
<path
|
|
||||||
className={`${styles.edgePulse}`}
|
|
||||||
d="M 232,140 C 200,112 182,84 150,62"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<path className={styles.edge} d="M 288,140 C 320,112 338,84 370,62" />
|
|
||||||
<path
|
|
||||||
className={`${styles.edgePulse} ${styles.edgePulse2}`}
|
|
||||||
d="M 288,140 C 320,112 338,84 370,62"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<path className={styles.edge} d="M 150,278 C 182,256 200,224 232,196" />
|
|
||||||
<path
|
|
||||||
className={`${styles.edgePulse} ${styles.edgePulse3}`}
|
|
||||||
d="M 150,278 C 182,256 200,224 232,196"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<path className={styles.edge} d="M 288,196 C 320,224 338,256 370,278" />
|
|
||||||
<path
|
|
||||||
className={`${styles.edgePulse} ${styles.edgePulse4}`}
|
|
||||||
d="M 288,196 C 320,224 338,256 370,278"
|
|
||||||
/>
|
|
||||||
|
|
||||||
{/* Memory core */}
|
|
||||||
<circle
|
|
||||||
className={styles.coreGlow}
|
|
||||||
cx="260"
|
|
||||||
cy="168"
|
|
||||||
r="78"
|
|
||||||
fill="url(#hv-core-glow)"
|
|
||||||
/>
|
|
||||||
<path
|
|
||||||
d="M260 112 L308.5 140 L308.5 196 L260 224 L211.5 196 L211.5 140 Z"
|
|
||||||
fill="rgba(31, 26, 18, 0.85)"
|
|
||||||
stroke="var(--honey-500)"
|
|
||||||
strokeWidth="1.6"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
/>
|
|
||||||
<text
|
|
||||||
x="260"
|
|
||||||
y="165"
|
|
||||||
textAnchor="middle"
|
|
||||||
fill="var(--hive-50)"
|
|
||||||
fontSize="13.5"
|
|
||||||
fontWeight="600"
|
|
||||||
fontFamily="var(--sans)"
|
|
||||||
>
|
|
||||||
{t('center_label')}
|
|
||||||
</text>
|
|
||||||
<text
|
|
||||||
x="260"
|
|
||||||
y="184"
|
|
||||||
textAnchor="middle"
|
|
||||||
fill="var(--text-muted)"
|
|
||||||
fontSize="9"
|
|
||||||
fontFamily="var(--mono)"
|
|
||||||
>
|
|
||||||
{t('center_sublabel')}
|
|
||||||
</text>
|
|
||||||
|
|
||||||
{/* Model chips */}
|
|
||||||
{CHIPS.map((chip) => (
|
|
||||||
<g key={chip.key}>
|
|
||||||
<rect
|
|
||||||
x={chip.x}
|
|
||||||
y={chip.y}
|
|
||||||
width={CHIP_W}
|
|
||||||
height={CHIP_H}
|
|
||||||
rx="10"
|
|
||||||
fill="var(--surface)"
|
|
||||||
stroke="var(--line-strong)"
|
|
||||||
strokeWidth="1"
|
|
||||||
/>
|
|
||||||
<text
|
|
||||||
x={chip.x + 14}
|
|
||||||
y={chip.y + 19}
|
|
||||||
fill="var(--hive-100)"
|
|
||||||
fontSize="12"
|
|
||||||
fontWeight="600"
|
|
||||||
fontFamily="var(--mono)"
|
|
||||||
>
|
|
||||||
{t(`chips.${chip.key}_primary`)}
|
|
||||||
</text>
|
|
||||||
<text
|
|
||||||
x={chip.x + 14}
|
|
||||||
y={chip.y + 33}
|
|
||||||
fill={chip.flow === 'in' ? 'var(--honey-400)' : 'var(--text-muted)'}
|
|
||||||
fontSize="9"
|
|
||||||
fontFamily="var(--mono)"
|
|
||||||
>
|
|
||||||
{chip.flow === 'in' ? '↑ ' : '↓ '}
|
|
||||||
{t(`chips.${chip.key}_sub`)}
|
|
||||||
</text>
|
|
||||||
</g>
|
|
||||||
))}
|
|
||||||
</svg>
|
|
||||||
|
|
||||||
<div className={styles.footerBar}>
|
|
||||||
<span>{t('footer_left')}</span>
|
|
||||||
<span>{t('footer_right')}</span>
|
|
||||||
</div>
|
|
||||||
</figure>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
.header {
|
|
||||||
max-width: 720px;
|
|
||||||
margin: 0 auto 52px;
|
|
||||||
text-align: center;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.steps {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
gap: 24px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step {
|
|
||||||
position: relative;
|
|
||||||
padding: 30px 28px 32px;
|
|
||||||
border-radius: var(--r-lg);
|
|
||||||
background: linear-gradient(180deg, var(--hive-900) 0%, var(--hive-950) 100%);
|
|
||||||
border: 1px solid var(--line-soft);
|
|
||||||
transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
|
|
||||||
}
|
|
||||||
.step:hover {
|
|
||||||
border-color: var(--honey-line);
|
|
||||||
transform: translateY(-3px);
|
|
||||||
box-shadow: var(--shadow-honey);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Flow connector: a honey chevron seated in the gap before every step after
|
|
||||||
the first, so the three cards read as one sequence (01 → 02 → 03).
|
|
||||||
Each step is wrapped in a <Reveal> div, so the chevron hangs off the reveal
|
|
||||||
wrapper (the actual grid cell), not the inner .step card. */
|
|
||||||
.steps > :global(.reveal) {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.steps > :global(.reveal) + :global(.reveal)::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 51px;
|
|
||||||
left: -22px;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
background: no-repeat center / contain
|
|
||||||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 4l6 6-6 6' stroke='%23e9a52c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
||||||
opacity: 0.75;
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stepNumber {
|
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--honey-500);
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 42px;
|
|
||||||
height: 42px;
|
|
||||||
border-radius: 12px;
|
|
||||||
border: 1px solid var(--honey-line);
|
|
||||||
background: var(--honey-wash);
|
|
||||||
box-shadow: 0 0 20px rgba(233, 165, 44, 0.12);
|
|
||||||
margin-bottom: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stepTitle {
|
|
||||||
font-size: var(--text-h3);
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--hive-50);
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stepBody {
|
|
||||||
font-size: var(--text-small);
|
|
||||||
line-height: 1.65;
|
|
||||||
color: var(--hive-300);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 860px) {
|
|
||||||
.steps {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
gap: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Chevrons point downward when the flow stacks vertically. */
|
|
||||||
.steps > :global(.reveal) + :global(.reveal)::before {
|
|
||||||
top: -21px;
|
|
||||||
left: 30px;
|
|
||||||
transform: rotate(90deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
import { getTranslations } from 'next-intl/server';
|
|
||||||
import Reveal from './Reveal';
|
|
||||||
import styles from './HowItWorks.module.css';
|
|
||||||
|
|
||||||
const STEPS = ['step_01', 'step_02', 'step_03'] as const;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Three-step product story: import history → work in workspaces → memory
|
|
||||||
* compounds. Strings under `landing.how_it_works.*`.
|
|
||||||
*/
|
|
||||||
export default async function HowItWorks() {
|
|
||||||
const t = await getTranslations('landing.how_it_works');
|
|
||||||
|
|
||||||
return (
|
|
||||||
<section
|
|
||||||
id="how-it-works"
|
|
||||||
className="section"
|
|
||||||
aria-labelledby="how-heading"
|
|
||||||
>
|
|
||||||
<div className="container">
|
|
||||||
<header className={styles.header}>
|
|
||||||
<p className="eyebrow">{t('eyebrow')}</p>
|
|
||||||
<h2 id="how-heading" className="section-headline">
|
|
||||||
{t('headline')}
|
|
||||||
</h2>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div className={styles.steps}>
|
|
||||||
{STEPS.map((step, i) => (
|
|
||||||
<Reveal key={step} delay={(i + 1) as 1 | 2 | 3}>
|
|
||||||
<div className={styles.step}>
|
|
||||||
<span className={styles.stepNumber} aria-hidden="true">
|
|
||||||
{t(`${step}.number`)}
|
|
||||||
</span>
|
|
||||||
<h3 className={styles.stepTitle}>{t(`${step}.title`)}</h3>
|
|
||||||
<p className={styles.stepBody}>{t(`${step}.body`)}</p>
|
|
||||||
</div>
|
|
||||||
</Reveal>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
.grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
||||||
gap: 72px;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.body {
|
|
||||||
font-size: var(--text-body);
|
|
||||||
line-height: 1.7;
|
|
||||||
color: var(--hive-300);
|
|
||||||
margin-top: 20px;
|
|
||||||
max-width: 34em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chips {
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 28px 0 0;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chip {
|
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: 11px;
|
|
||||||
letter-spacing: 0.02em;
|
|
||||||
color: var(--hive-200);
|
|
||||||
border: 1px solid var(--line-strong);
|
|
||||||
background: var(--surface);
|
|
||||||
border-radius: 999px;
|
|
||||||
padding: 7px 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ── Pipeline card ── */
|
|
||||||
.pipeline {
|
|
||||||
border-radius: var(--r-lg);
|
|
||||||
border: 1px solid var(--line);
|
|
||||||
background: linear-gradient(180deg, var(--hive-900) 0%, var(--hive-950) 100%);
|
|
||||||
box-shadow: var(--shadow-elevated);
|
|
||||||
padding: 32px 36px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: stretch;
|
|
||||||
}
|
|
||||||
|
|
||||||
.node {
|
|
||||||
border-radius: var(--r);
|
|
||||||
border: 1px solid var(--line-strong);
|
|
||||||
background: var(--surface);
|
|
||||||
padding: 14px 18px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nodeAccent {
|
|
||||||
border-color: var(--honey-line);
|
|
||||||
background: var(--honey-wash);
|
|
||||||
}
|
|
||||||
|
|
||||||
.nodeTitle {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--hive-50);
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nodeSub {
|
|
||||||
font-family: var(--mono);
|
|
||||||
font-size: 10px;
|
|
||||||
letter-spacing: 0.03em;
|
|
||||||
color: var(--text-muted);
|
|
||||||
display: block;
|
|
||||||
margin-top: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.connector {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
padding: 6px 0;
|
|
||||||
color: var(--honey-600);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1023px) {
|
|
||||||
.grid {
|
|
||||||
grid-template-columns: minmax(0, 1fr);
|
|
||||||
gap: 48px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
import { getTranslations } from 'next-intl/server';
|
|
||||||
import Reveal from './Reveal';
|
|
||||||
import styles from './MemoryDiagram.module.css';
|
|
||||||
|
|
||||||
const CHIP_KEYS = ['local', 'provenance', 'erasure'] as const;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* "Under the hood" — the real memory pipeline, named after the actual
|
|
||||||
* subsystems (frames → hybrid search → knowledge graph → any model).
|
|
||||||
* Copy under `landing.memory.*`; the diagram is semantic HTML so it
|
|
||||||
* stacks naturally and needs no JS.
|
|
||||||
*/
|
|
||||||
export default async function MemoryDiagram() {
|
|
||||||
const t = await getTranslations('landing.memory');
|
|
||||||
|
|
||||||
return (
|
|
||||||
<section id="memory" className="section" aria-labelledby="memory-heading">
|
|
||||||
<div className="container">
|
|
||||||
<div className={styles.grid}>
|
|
||||||
<div>
|
|
||||||
<p className="eyebrow">{t('eyebrow')}</p>
|
|
||||||
<h2 id="memory-heading" className="section-headline">
|
|
||||||
{t('headline')}
|
|
||||||
</h2>
|
|
||||||
<p className={styles.body}>{t('body')}</p>
|
|
||||||
<ul className={styles.chips}>
|
|
||||||
{CHIP_KEYS.map((key) => (
|
|
||||||
<li key={key} className={styles.chip}>
|
|
||||||
{t(`chips.${key}`)}
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Reveal>
|
|
||||||
<div className={styles.pipeline} role="img" aria-label={t('headline')}>
|
|
||||||
<div className={styles.node}>
|
|
||||||
<span className={styles.nodeTitle}>{t('diagram.input')}</span>
|
|
||||||
</div>
|
|
||||||
<Arrow />
|
|
||||||
<div className={styles.node}>
|
|
||||||
<span className={styles.nodeTitle}>{t('diagram.frames')}</span>
|
|
||||||
</div>
|
|
||||||
<Arrow />
|
|
||||||
<div className={styles.node}>
|
|
||||||
<span className={styles.nodeTitle}>{t('diagram.search')}</span>
|
|
||||||
<span className={styles.nodeSub}>{t('diagram.search_sub')}</span>
|
|
||||||
</div>
|
|
||||||
<Arrow />
|
|
||||||
<div className={styles.node}>
|
|
||||||
<span className={styles.nodeTitle}>{t('diagram.graph')}</span>
|
|
||||||
<span className={styles.nodeSub}>{t('diagram.graph_sub')}</span>
|
|
||||||
</div>
|
|
||||||
<Arrow />
|
|
||||||
<div className={`${styles.node} ${styles.nodeAccent}`}>
|
|
||||||
<span className={styles.nodeTitle}>{t('diagram.output')}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Reveal>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function Arrow() {
|
|
||||||
return (
|
|
||||||
<span className={styles.connector} aria-hidden="true">
|
|
||||||
<svg width="12" height="14" viewBox="0 0 12 14" fill="none">
|
|
||||||
<path
|
|
||||||
d="M6 0 V11 M2 8 L6 12 L10 8"
|
|
||||||
stroke="currentColor"
|
|
||||||
strokeWidth="1.4"
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</span>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
.header {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 100;
|
|
||||||
transition: background 0.25s ease, border-color 0.25s ease,
|
|
||||||
backdrop-filter 0.25s ease;
|
|
||||||
border-bottom: 1px solid transparent;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.headerScrolled {
|
|
||||||
background: rgba(14, 12, 7, 0.82);
|
|
||||||
backdrop-filter: blur(14px);
|
|
||||||
-webkit-backdrop-filter: blur(14px);
|
|
||||||
border-bottom-color: var(--line-soft);
|
|
||||||
}
|
|
||||||
|
|
||||||
.inner {
|
|
||||||
max-width: var(--container-wide);
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 0 var(--gutter);
|
|
||||||
height: 64px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brand {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
text-decoration: none;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navLink {
|
|
||||||
padding: 8px 14px;
|
|
||||||
border-radius: var(--r-sm);
|
|
||||||
font-size: var(--text-small);
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--hive-300);
|
|
||||||
text-decoration: none;
|
|
||||||
transition: color 0.15s ease, background 0.15s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navLink:hover {
|
|
||||||
color: var(--hive-50);
|
|
||||||
background: rgba(236, 227, 208, 0.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
.actions {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signIn {
|
|
||||||
padding: 8px 14px;
|
|
||||||
border-radius: var(--r-sm);
|
|
||||||
font-size: var(--text-small);
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--hive-200);
|
|
||||||
text-decoration: none;
|
|
||||||
transition: color 0.15s ease;
|
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
|
||||||
font-family: var(--sans);
|
|
||||||
}
|
|
||||||
|
|
||||||
.signIn:hover {
|
|
||||||
color: var(--hive-50);
|
|
||||||
}
|
|
||||||
|
|
||||||
.menuButton {
|
|
||||||
display: none;
|
|
||||||
background: none;
|
|
||||||
border: 1px solid var(--line-strong);
|
|
||||||
border-radius: var(--r-sm);
|
|
||||||
color: var(--hive-100);
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobilePanel {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 860px) {
|
|
||||||
.nav {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signIn {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menuButton {
|
|
||||||
display: inline-flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobilePanel {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 4px;
|
|
||||||
padding: 12px var(--gutter) 20px;
|
|
||||||
background: rgba(14, 12, 7, 0.96);
|
|
||||||
backdrop-filter: blur(14px);
|
|
||||||
-webkit-backdrop-filter: blur(14px);
|
|
||||||
border-bottom: 1px solid var(--line-soft);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobileLink {
|
|
||||||
padding: 12px 14px;
|
|
||||||
border-radius: var(--r-sm);
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--hive-200);
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobileLink:hover {
|
|
||||||
color: var(--hive-50);
|
|
||||||
background: rgba(236, 227, 208, 0.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobileActions {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
padding: 12px 14px 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user