Files
market/playwright.config.ts
zeekayandHanzo Dev c3674879b7 Serve hanzo.market as one static storefront over api.hanzo.ai
hanzo.market is now the one two-sided Hanzo marketplace: a static SPA the
sites plane serves, with every read and write an api.hanzo.ai /v1 operation
and sign-in through hanzo.id (@hanzo/iam, authorization code + PKCE).

Deleted: the Hono API server (api/: its own session auth, tokens, skills,
personas, search, upload, users, integrations), the Nitro OG-image server
(server/), the Base migrations it ran (base/), the Dockerfile and entrypoint
that started all three, k8s/ manifests, the market CLI and its schema
package (packages/) whose only backend was that server, the bothub
discovery documents, the brand/federation presets, and the Convex-era docs.
No Hono remains anywhere in the tree or the lockfile.

Buyers browse one catalog of agents, apps, skills and MCP servers faceted
by type; a listing page carries reputation and the same action as a docs
link, a hanzo CLI line and a hanzo-mcp call; checkout runs clearance first
and says what it needs in plain words, including backup withholding, then
installs for per-call payment over x402 or funds an escrow job whose
lifecycle is open, accepted, delivered, released or disputed. Sellers set
up the org as principal (identity, W-9 or W-8, payout wallet), publish and
edit listings of each type from the org's own inventory, work the jobs
inbox, and see earnings and the 1099s they received.

Operations cloud does not serve yet are called by their specified path and
shown as pending on a 404 rather than faked. The UI is @hanzo/ui on
@hanzo/gui with @hanzo/design tokens and the shared @hanzogui/shell header
and footer, on the Hanzo Vite toolchain (@hanzo/vite).

CI moves to .github/workflows (hanzoai/ci build.yml@v2); hanzo.yml drops
the image lane and publishes dist/ through the site lane as hanzo-market.
The gate is oxlint (type-aware) plus hanzo-design-lint, tsc, vitest under
an 80% coverage threshold on src/lib, and the build. Playwright specs run
both sides against the dev server with the platform mocked at the network
layer, and a read-only @live subset runs against a deployed host.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-24 15:29:40 -07:00

36 lines
1.0 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test'
/**
* The flows run against the Vite dev server with api.hanzo.ai and hanzo.id
* answered at the network layer (e2e/mock.ts). BASE_URL points the same specs at
* a deployed storefront; there only the specs tagged @live run, read-only.
*/
const PORT = 4330
const live = process.env.BASE_URL
export default defineConfig({
testDir: './e2e',
testMatch: /.*\.spec\.ts/,
grep: live ? /@live/ : undefined,
timeout: 60_000,
expect: { timeout: 10_000 },
fullyParallel: true,
retries: process.env.CI ? 1 : 0,
reporter: [['list']],
use: {
baseURL: live ?? `http://127.0.0.1:${PORT}`,
trace: 'retain-on-failure',
},
webServer: live
? undefined
: {
command: `bunx vite --host 127.0.0.1 --port ${PORT} --strictPort`,
url: `http://127.0.0.1:${PORT}`,
reuseExistingServer: false,
timeout: 120_000,
stdout: 'ignore',
stderr: 'pipe',
},
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
})