diff --git a/.agents/JOB_BUS.md b/.agents/JOB_BUS.md deleted file mode 120000 index e546bba..0000000 --- a/.agents/JOB_BUS.md +++ /dev/null @@ -1 +0,0 @@ -/Users/marchon/job-bus/docs/JOB_BUS_LLM_INSTRUCTIONS.md \ No newline at end of file diff --git a/.jobbus.json b/.jobbus.json deleted file mode 100644 index ab460ca..0000000 --- a/.jobbus.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "enabled": true, - "manifest": "jobs/pieces.yaml", - "farm": "scripts/jobbus-farm.sh", - "instructions": ".agents/JOB_BUS.md" -} diff --git a/AGENTS.md b/AGENTS.md deleted file mode 100644 index 2c41576..0000000 --- a/AGENTS.md +++ /dev/null @@ -1,6 +0,0 @@ -# Agent notes - -## Job-bus multi-build -This repo farms multi-build pieces via NATS job-bus. See [.agents/JOB_BUS.md](.agents/JOB_BUS.md). -Edit `jobs/pieces.yaml`, then run `./scripts/jobbus-farm.sh` (or `make farm`). -CPU pieces → Xeons (137/138); GPU pieces → Mac. Always set `requires` per piece. diff --git a/CATALOG-HOST.md b/CATALOG-HOST.md deleted file mode 100644 index ca34ef4..0000000 --- a/CATALOG-HOST.md +++ /dev/null @@ -1,81 +0,0 @@ -# Move the documentation catalog to another hostname - -The catalog is a **static tree** (`site/` in the monorepo). HTML cards and PDF clicks are **path-relative**, so the same files can be served from `https://zapier.georgelambert.org/` today and `https://docs.verae-time.net/` later without rewriting links. - -Live service doors (portal, IAM, fleet, …) stay on their own hostnames. Forgejo stays on `git.georgelambert.org`. - -**Script:** `scripts/rewrite-docs-host.py` in [master-zapier-plan-draft](https://git.georgelambert.org/marchon/master-zapier-plan-draft) -**Build:** `scripts/build-docs-site.py` · **Deploy:** `scripts/deploy-docs-site.sh` - -## Default (relative) — no hostname pass - -1. Build: `python3 scripts/build-docs-site.py` -2. Rsync the `site/` directory to the new host document root (must be the site root, `/`). -3. Point DNS + TLS (Caddy `file_server` with `index index.html index.pdf README.html README.pdf`) at that tree. - -PDF annotations look like `README.pdf` and `../../index.html` (relative to the PDF). Browsers resolve them against the PDF’s own URL, so they follow the new host. - -Optional label in the HTML banner (not a link target): - -```bash -DOCS_PUBLIC_HOST=docs.verae-time.net python3 scripts/build-docs-site.py -``` - -## Absolute URLs (only if a viewer needs them) - -Bake a public origin at build time: - -```bash -DOCS_PUBLIC_URL=https://docs.verae-time.net \ -DOCS_PUBLIC_HOST=docs.verae-time.net \ - python3 scripts/build-docs-site.py -``` - -Or retarget an **already built** `site/` without rebuilding PDFs from markdown: - -```bash -# Lab origin → future docs host -python3 scripts/rewrite-docs-host.py \ - --site ./site \ - --from https://zapier.georgelambert.org \ - --to https://docs.verae-time.net - -# Strip the origin (same as the default build) -python3 scripts/rewrite-docs-host.py --site ./site --relative - -python3 scripts/rewrite-docs-host.py --site ./site --from … --to … --dry-run -``` - -The rewrite walks HTML/SVG/CSS/JS/MD text and PDF `/URI` annotations. It does **not** change `portal.zapier.georgelambert.org`, `iam.…`, or `git.georgelambert.org`. - -## Caddy (any host) - -```caddy -docs.verae-time.net { - root * /SSD2/sites/docs.verae-time.net - encode gzip zstd - file_server { - index index.html index.pdf README.html README.pdf - } - try_files {path} {path}/index.html {path}/index.pdf {path}/README.html {path}/README.pdf -} -``` - -Lab copy: `packages/verae-ops/caddy/zapier.georgelambert.org.caddy`. - -## Check - -```bash -python3 scripts/check-doc-links.py -``` - -Local files must exist for homepage hrefs and PDF URI targets. Off-site HTTPS (Forgejo, live doors) is left alone. - -## Publish lab catalog (today) - -```bash -git -C /Users/marchon/apps/zapier push ns1 main -git -C /Users/marchon/apps/zapier push ns1 main:master -bash scripts/deploy-docs-site.sh -# → marchon@70.88.205.138:/SSD2/sites/zapier.georgelambert.org -``` diff --git a/HOST-DEPS.md b/HOST-DEPS.md deleted file mode 100644 index 0aebf79..0000000 --- a/HOST-DEPS.md +++ /dev/null @@ -1,22 +0,0 @@ -# Host dependencies for every Forgejo module - -The installer lives in **verae-bootstrap** (not this summaries repo): - -- Script: `scripts/host-deps.sh` -- Manifest: `host-deps.tsv` (one row per Forgejo repo) -- Narrative: [HOST-DEPS.md](https://git.georgelambert.org/marchon/verae-bootstrap/src/branch/main/HOST-DEPS.md) - -It detects Debian/Ubuntu vs Alpine (and best-effort macOS), checks that git, curl, Node, native build tools, and `nats-server` are present, and **downloads/installs** whatever is missing on **this** machine. - -```bash -git clone ssh://git@git.georgelambert.org:2223/marchon/verae-bootstrap.git -cd verae-bootstrap -bash scripts/host-deps.sh --check --type ns1-all-in-one -bash scripts/host-deps.sh --type ns1-all-in-one -export VERAE_SRC=$HOME/verae-src -bash scripts/fetch.sh ns1-all-in-one -``` - -Alpine if `bash` is not installed yet: `apk add --no-cache bash git curl`. - -Catalog hostname move (relative PDFs): [CATALOG-HOST.md](CATALOG-HOST.md). diff --git a/MESSAGE-FLOWS.md b/MESSAGE-FLOWS.md deleted file mode 100644 index 5bec06e..0000000 --- a/MESSAGE-FLOWS.md +++ /dev/null @@ -1,44 +0,0 @@ -# Message flows - -## 1. Create timestamp (async) - -1. Zapier → `POST https://zappier-edge/v1/timestamp` (`x-api-key`) -2. zappier-edge meters → `POST middleware/zapier/v1/timestamp` -3. splitter: chain sha256; optional `verae.archive.put` -4. middleware → chain create or existing lookup -5. middleware publishes `verae.zapier.jobs.watch` `{ jobId, tenantId, … }` -6. HTTP 202 `{ jobId }` back to Zapier -7. job-poller consumes watch, GET chain status -8. On terminal: `verae.zapier.jobs.events` -9. webhook-deliver POSTs Zapier REST Hook if subscribed - -## 2. Wait - -Same as (1) but HTTP holds until `jobs.events` or `WAIT_TIMEOUT_MS` → `{ status: pending, jobId }`. - -## 3. Hash already registered - -Step 4 returns original jobId + original seal. No second chain write. `receipts[0].kind = seal`. Later archive attaches become `receipts[1…]` if `includeAttached`. - -## 4. includeAttached - -After seal is known, aggregator publishes `verae.archive.query`. Each WORM: bloom miss = no packet; hit = `verae.archive.reply.`. Aggregator merges into wait JSON. - -## 5. Multipart attachments - -Splitter emits one `archive.put` per file (`kind: file`, `contentSha256`). Chain never stores bytes. - -## 6. Batch Merkle (bulk summary) - -1. Zapier → `POST /v1/timestamp/batch` (one item per line) -2. Middleware hashes each item (leaves), builds Merkle tree -3. Chain seals **only the root** -4. Each leaf proof → `verae.archive.put` `kind: tree` on a sharded tree node -5. Central `GET /hashes/{leaf}` → miss (`itemizedOnMainChain: false`) -6. `GET /hashes/{leaf}?includeTree=true` → aggregator broadcasts `verae.archive.query` `kinds=["tree"]` -7. Tree node bloom hit → `archive.reply.` with proof; others silent -8. Response: root seal + `tree-leaf` receipt - -## 7. Simulator - -`packages/verae-zapier-simulator` replays flows 1–6 in-process with a trace console, fault injection, and modification suggestions. It does not connect to live NATS. diff --git a/README.md b/README.md deleted file mode 100644 index 65761cb..0000000 --- a/README.md +++ /dev/null @@ -1,101 +0,0 @@ -# zapier-docs-master - -[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) - -Summaries, NATS contracts, and message flows for every Verae Time × Zapier module. - -**Live catalog:** https://zapier.georgelambert.org/ -**Move the catalog to another host:** [CATALOG-HOST.md](CATALOG-HOST.md) (relative PDF links; `scripts/rewrite-docs-host.py`) -**Host OS / Node / NATS install:** [verae-bootstrap HOST-DEPS](https://git.georgelambert.org/marchon/verae-bootstrap) -**Overview (start here):** https://git.georgelambert.org/marchon/overview -**Operator console:** http://127.0.0.1:3850/ (Fleet · Trace · Docs) -**Monorepo:** https://git.georgelambert.org/marchon/master-zapier-plan-draft (`main` and `master`) - -## Git repos (Forgejo on NS1) - -| Repo | URL | -|------|-----| -| master-zapier-plan-draft | https://git.georgelambert.org/marchon/master-zapier-plan-draft | -| zappier-edge | https://git.georgelambert.org/marchon/zappier-edge | -| verae-middleware | https://git.georgelambert.org/marchon/verae-middleware | -| verae-zapier-app | https://git.georgelambert.org/marchon/verae-zapier-app | -| verae-activate | https://git.georgelambert.org/marchon/verae-activate | -| verae-request-splitter | https://git.georgelambert.org/marchon/verae-request-splitter | -| verae-archive-worm | https://git.georgelambert.org/marchon/verae-archive-worm | -| verae-archive-aggregator | https://git.georgelambert.org/marchon/verae-archive-aggregator | -| verae-tree-node | https://git.georgelambert.org/marchon/verae-tree-node | -| verae-zapier-simulator | https://git.georgelambert.org/marchon/verae-zapier-simulator | -| zapier-user-docs | https://git.georgelambert.org/marchon/zapier-user-docs | -| verae-fleet | https://git.georgelambert.org/marchon/verae-fleet | -| **overview** | https://git.georgelambert.org/marchon/overview | -| verae-nats-process | https://git.georgelambert.org/marchon/verae-nats-process | -| **zapier-docs-master** (this repo) | https://git.georgelambert.org/marchon/zapier-docs-master | -| **verae-ops** | https://git.georgelambert.org/marchon/verae-ops | -| verae-staff-iam | https://git.georgelambert.org/marchon/verae-staff-iam | -| verae-keep | https://git.georgelambert.org/marchon/verae-keep | -| verae-bootstrap | https://git.georgelambert.org/marchon/verae-bootstrap | -| verae-uptime | https://git.georgelambert.org/marchon/verae-uptime | -| verae-backup | https://git.georgelambert.org/marchon/verae-backup | -| verae-deploy | https://git.georgelambert.org/marchon/verae-deploy | -| verae-proxmox | https://git.georgelambert.org/marchon/verae-proxmox | -| verae-nats-cluster | https://git.georgelambert.org/marchon/verae-nats-cluster | - -Clone (SSH port 2223): - -`git clone ssh://git@git.georgelambert.org:2223/marchon/.git` - -## Modules - -| Module | Summary | NATS in | NATS out | -|--------|---------|---------|----------| -| zappier-edge | Metered HTTPS for Zapier | — | — (HTTPS to middleware) | -| verae-middleware | Job id + wait HTTP | jobs.events | jobs.watch | -| verae-activate | Pushable Zapier app | — | — | -| verae-zapier-app | Full Zapier nouns | — | — | -| request-splitter | Hash vs files | — | archive.put | -| archive-worm | Bloom WORM node | archive.query, archive.put | archive.reply.* (hit only) | -| archive-aggregator | Merge archive replies | archive.reply.* | archive.query | -| tree-node | Merkle leaf proofs | archive.query, archive.put | archive.reply.* (hit only) | -| zapier-simulator | Trace console (in-process) | — | — | -| zapier-user-docs | Signup → lookup guide | — | — | -| verae-fleet | Replica floors + monitor | — | — | -| overview | System map | — | — | -| nats-process | Template worker | example.process.in | example.process.out / reply.* | -| ops | Install / Docker / Proxmox / metal | — | — | - -## Documents in this repo - -- [MESSAGE-FLOWS.md](MESSAGE-FLOWS.md) — numbered request paths -- [modules-and-nats.md](modules-and-nats.md) — address table -- [archive-nats.md](archive-nats.md) — bloom / multi-receipt design -- [composition.md](composition.md) — HTTPS hops -- `modules//SUMMARY.md` and `NATS.md` - -## Table of Contents - -- [Install](#install) -- [Usage](#usage) -- [Contributing](#contributing) -- [License](#license) - -## Install - -```sh -git clone ssh://git@git.georgelambert.org:2223/marchon/zapier-docs-master.git -cd zapier-docs-master -``` - -## Usage - -```sh -# No single entrypoint is declared in this tree. -ls -``` - -## Contributing - -Questions: open an issue at https://git.georgelambert.org/marchon/zapier-docs-master/issues. Pull requests are accepted. - -## License - -UNLICENSED © George Lambert diff --git a/archive-nats.md b/archive-nats.md deleted file mode 100644 index aa1f906..0000000 --- a/archive-nats.md +++ /dev/null @@ -1,91 +0,0 @@ -# Archive NATS: jobs, multipart split, hash receipts, WORM bloom fan-out - -Zapier never speaks NATS. HTTPS stops at zappier → middleware. Middleware owns jobs, splitting, chain lookup, and archive aggregation. - -## End-to-end - -```text -Zapier --HTTPS--> zappier (meter, x-api-key) - --HTTPS--> middleware /zapier/v1/timestamp[/wait] - 1. split multipart - chain: SHA256 only (+ optional public-meta digest) - archives: public JSON, encrypted private JSON, files - 2. publish jobs.watch → return jobId (202) - 3. waiters subscribe jobs.events - 4. lookup SHA256 on chain (mock or Verae) - already sealed → original receipt, no new seal - later attach records → extra receipts - 5. if includeAttached: - publish verae.archive.query - WORM nodes: bloom miss = silence - bloom hit = reply - aggregate until WAIT_ARCHIVE_MS - 6. jobs.events completed JSON → waiter / REST Hook -``` - -Blockchain stores **hash + time + block + certificate**. Public metadata, encrypted metadata, and file bytes live on **WORM archives**. - -## Splitter - -`splitRequest(body | multipart)`: - -| Field | Destination | -|-------|-------------| -| `data` / `sha256` | Chain register or lookup | -| `publicMetadata` | Archive put (clear) | -| `privateMetadata` | Archive put (ciphertext) | -| `files[]` | Archive put; chain gets content hashes + ids | -| `includeAttached` | Whether wait path queries archives | - -## Hash already registered - -Return original `jobId` and original seal. Do not write a second chain timestamp. - -If later attach jobs exist for that hash, `receipts` is an array: seal first, then attachment receipts in time order. - -## Subjects - -| Subject | Publisher | Subscriber | -|---------|-----------|------------| -| `verae.zapier.jobs.watch` | HTTP edge | job poller | -| `verae.zapier.jobs.events` | poller | waiter, webhook router | -| `verae.archive.put` | splitter | archive that owns the shard | -| `verae.archive.query` | aggregator | **every** archive (not a shared queue group) | -| `verae.archive.reply.` | archive on bloom hit | aggregator | - -Query payload: `{ correlationId, sha256, tenantId, kinds[] }`. -`kinds` may include `tree` for Merkle leaf proofs (hashes sealed only as a bulk summary root). -Reply payload: `{ archiveId, sha256, records[] }`. - -Bloom miss → no reply. Aggregator timeout → complete with whatever arrived. - -## WORM archives - -Each process holds append-only records + a bloom of SHA256 keys it stores. False positives OK; false negatives must be rare. Bloom is not an ACL — on hit, still check tenant/share. - -Harness: three mock archives with overlapping hashes. - -## Completed job JSON (wait / hook) - -```json -{ - "jobId": "…", - "status": "completed", - "sha256": "…", - "receipts": [ - { "kind": "seal", "timestamp": "…", "certificate": "…", "blockIndex": 42 }, - { "kind": "metadata-attach", "attachedAt": "…", "publicMetadata": {} } - ], - "files": [{ "id": "…", "sha256": "…", "archiveId": "archive-b" }], - "archivesQueried": true, - "archiveReplies": 2 -} -``` - -Flag off or all blooms miss → `files` empty, extra receipts omitted. - -## Security - -- Zapier never connects to NATS or archives. -- Private metadata only on authenticated archive replies. -- NS1 NATS stays loopback; use `scripts/nats-tunnel.sh`. diff --git a/composition.md b/composition.md deleted file mode 100644 index e2568e5..0000000 --- a/composition.md +++ /dev/null @@ -1,33 +0,0 @@ -# Composition: zappier commercial edge + Verae adapter - -```text -Users → Zapier UI -Zapier cloud runs packages/verae-zapier - --HTTPS, x-api-key--> packages/zappier /v1/* - (meter, quote, 401/403, usage) - --internal HTTPS--> packages/verae-zapier-middleware /zapier/v1/* - --sync--> api.veraetime.net or MOCK_VERAE - --NATS--> workers --> Verae + Zapier REST Hooks - -Humans → zappier /portal signup, API key, usage, reloads, invoices -Ops → zappier /admin rate card, tiers, customers, PO invoices -``` - -## Ownership - -| Concern | Package | -|---------|---------| -| API keys, custom pricing, Stripe, invoices, portal | `packages/zappier` | -| Timestamp/verify/status, NATS, REST Hooks, mock Verae | `packages/verae-zapier-middleware` | -| Zapier Platform nouns (creates/searches/triggers) | `packages/verae-zapier` | -| Official SDK reference | `vendor/zapier-platform` | - -Zapier never talks to NATS or `api.veraetime.net`. - -Do not reimplement Stripe, invoices, or the rate-card UI inside the Verae middleware. - -Public keys are zappier `x-api-key` (issued at portal signup). Middleware `zmw_` / `PLAN_LIMITS` stay internal until composition PR 4 removes them from the public path. - -Demo zappier routes `/v1/transform` and `/v1/storage` are a metering sandbox, not Verae timestamping or encrypted LTS. - -Payment invoices (zappier) are not certified timestamp receipts (Verae feature i). diff --git a/jobs/pieces.yaml b/jobs/pieces.yaml deleted file mode 100644 index 6da1fad..0000000 --- a/jobs/pieces.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# Multi-build piece manifest for job-bus. -# Copy to jobs/pieces.yaml in your repo and edit. -# Each piece becomes one tracked job; kind routes cpu→Xeons, gpu→Mac. -batch: "zapier-docs-master-EDITME" -defaults: - kind: cpu - requires: [] - timeout_sec: 3600 - cleanup: none # or on_success; full wipe via: job-cleanup --batch -pieces: - - id: piece-01 - kind: cpu - requires: [bin:bash] - cmd: ["make", "piece-01"] - # cwd: defaults to repo root on submitter; set worker-visible path if needed - - id: piece-02 - kind: cpu - requires: [ffmpeg, pip:numpy] - cmd: ["python3", "scripts/build_piece.py", "--piece", "2"] - - id: piece-gpu-hero - kind: gpu - requires: [pip:Pillow] - cmd: ["python3", "scripts/gpu_hero.py"] diff --git a/modules-and-nats.md b/modules-and-nats.md deleted file mode 100644 index 9761785..0000000 --- a/modules-and-nats.md +++ /dev/null @@ -1,85 +0,0 @@ -# Modules and NATS message contracts - -Master map of every service in the Zapier ↔ middleware ↔ chain ↔ WORM-archive path. - -Zapier cloud **never** connects to NATS. Internal services do: middleware workers, archives, account-balance, zappier-edge billing, CS, sales, and accounting. - -## Who talks to whom (HTTPS vs NATS) - -```text -[Zapier Platform app] HTTPS [zappier-edge] HTTPS [middleware-http] - | | NATS verae.billing.* | - | v | -[customer portal] [account-balance] NATS JetStream -[CS :3011] queue account-balance (NS1 loopback :4222) -[sales :3012] ^ | -[accounting :3013] | request-reply | - +-------------------------------+ - +------------------+------------------+-------------+ - | | | - [job-poller] [webhook-deliver] [archive-aggregator] - | | - | HTTPS | NATS query/reply - [verae-chain-client] | - [archive-worm × N] - bloom miss = silence -``` - -## Module catalog - -| Module | Repo (Forgejo) | Runtime | Listens | Sends | -|--------|----------------|---------|---------|-------| -| zapier-platform-app | `verae-zapier-app` | Zapier cloud | User Zap steps | HTTPS to zappier-edge | -| zappier-edge | `zappier-edge` | Public HTTPS :3000 | Zapier, portal, admin | HTTPS to middleware; NATS billing after authz | -| access-authz | `verae-access-authz` | :3020 + NATS | `verae.access.authz.check` | allow/deny | -| access-web | `verae-access-web` | :3021 | customer browser | billing statement/reload | -| access-api | `verae-access-api` | :3022 | x-api-key | statement; HTTPS to middleware | -| access-leaf | `verae-access-leaf` | :3023 | S2S leaf | archive/jobs only | -| access-zapier | `verae-access-zapier` | :3024 | Zapier HTTPS | jobs.watch after authz | -| account-balance | `zappier-account-balance` | :3010 + NATS | `verae.billing.*` | statement/adjust replies | -| customer-service | `zappier-customer-service` | :3011 | CS staff HTTP | NATS balance.adjust / statement.get | -| sales-pricing | `zappier-sales-pricing` | :3012 | Sales HTTP | NATS statement.get; HTTPS to edge for multipliers | -| accounting-export | `zappier-accounting-export` | :3013 | Accounting HTTP | reads invoices; NATS statement | -| middleware-http | `verae-middleware` | Public HTTPS :3100 | zappier-edge | NATS jobs.watch; HTTP to chain; wait on jobs.events | -| job-poller | `verae-job-poller` | Worker | `verae.zapier.jobs.watch` | `verae.zapier.jobs.events`; HTTP GET chain status | -| webhook-deliver | `verae-webhook-deliver` | Worker | `verae.zapier.webhooks.deliver` + events | HTTPS POST Zapier REST Hook | -| request-splitter | `verae-request-splitter` | In middleware | HTTP body / multipart | chain hash; `verae.archive.put` | -| archive-aggregator | `verae-archive-aggregator` | Worker / in wait | `includeAttached` on wait | `verae.archive.query`; reads `verae.archive.reply.` | -| archive-worm | `verae-archive-worm` | N copies | `verae.archive.query`, `verae.archive.put` | `verae.archive.reply.` if bloom hits | -| tree-node | `verae-tree-node` | N copies (WORM role) | `verae.archive.query`, `verae.archive.put` kind `tree` | `verae.archive.reply.` if bloom hits | -| zapier-simulator | `verae-zapier-simulator` | Local HTTP :3847 | operator browser | in-process replay of all addresses | -| zapier-user-docs | `zapier-user-docs` | Static | — | catalog `/user-docs/` | -| verae-chain-client | `verae-chain-client` | Library | — | HTTPS `api.veraetime.net` or MOCK | -| fleet | `verae-fleet` | Local HTTP :3850 | operator | keepFloor + SSH hosts | -| staff-iam | `verae-staff-iam` | :3028 | staff login | none (HTTP) | -| keep | `verae-keep` | :3860 / :3861 | host supervisor | none | -| bootstrap | `verae-bootstrap` | clone/install | — | — | -| overview | `overview` | Static | — | high-level map | -| nats-process | `verae-nats-process` | Template worker | `verae.example.process.in` | `.out` / `.reply.*` | -| docs-master | `zapier-docs-master` | Static | — | published on zapier.georgelambert.org | - -## Addresses (subjects) - -| Address | Kind | Payload (required fields) | -|---------|------|---------------------------| -| `verae.zapier.jobs.watch` | JetStream work queue | `tenantId`, `veraeUserId`, `jobId`, `tokenRef`, `enqueuedAt`, `attempt`, `maxAttempts`, `intervalMs`, `traceId` | -| `verae.zapier.jobs.events` | JetStream events | `event` (`timestamp.completed\|failed\|timeout`), `tenantId`, `jobId`, `status`, `traceId`, `emittedAt` | -| `verae.zapier.webhooks.deliver` | JetStream work queue | `hookId`, `tenantId`, `targetUrl`, `event`, `payload`, `attempt`, `traceId` | -| `verae.zapier.usage` | optional | `tenantId`, `action`, `amount`, `at` | -| `verae.billing.statement.get` | request-reply | `customerId` → prepaid, credits, usage, payments | -| `verae.billing.balance.adjust` | request-reply | `customerId`, `cents`, `reason`, `agent` | -| `verae.billing.usage.recorded` | pub | meter events from zappier-edge | -| `verae.billing.payment.recorded` | pub | portal reload / invoice paid | -| `verae.billing.credit.applied` | pub | CS goodwill | -| `verae.access.authz.check` | request-reply | `{ plane, subject, principal }` → `{ allow, reason }` | -| `verae.access.web.billing.statement.get` | ingress | web plane only; mapped after authz | -| `verae.access.api.*` | ingress | customer API plane | -| `verae.access.zapier.*` | ingress | Zapier plane | -| `verae.access.leaf.in` | ingress | S2S leaf; never billing | -| `verae.archive.put` | JetStream | `sha256`, `tenantId`, `kind` (`publicMeta\|privateMeta\|file\|tree`), `record`, `traceId` | -| `verae.archive.query` | pub to **all** archives | `correlationId`, `sha256`, `tenantId`, `kinds[]`, `traceId` | -| `verae.archive.reply.` | replies | `archiveId`, `sha256`, `records[]`, `traceId` | - -## Completed job JSON (back to Zapier) - -See `docs/02-architecture/archive-nats.md`. Seal receipts from chain; extra receipts and `files[]` from archive aggregation when `includeAttached` is true. diff --git a/modules/overview/NATS.md b/modules/overview/NATS.md deleted file mode 100644 index 6a298ae..0000000 --- a/modules/overview/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — overview - -Documentation only. Describes the central 3-server cluster. Zapier never connects. diff --git a/modules/overview/SUMMARY.md b/modules/overview/SUMMARY.md deleted file mode 100644 index a3845fa..0000000 --- a/modules/overview/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# overview - -High-level system map, 3-node NATS cluster, uptime, network failure, address routing. Repo: `overview`. diff --git a/modules/verae-access-api/NATS.md b/modules/verae-access-api/NATS.md deleted file mode 100644 index 764ac45..0000000 --- a/modules/verae-access-api/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-access-api - -Plane `api`. Statement and jobs.watch after authz. No credits, no archive. diff --git a/modules/verae-access-api/SUMMARY.md b/modules/verae-access-api/SUMMARY.md deleted file mode 100644 index 9a0401e..0000000 --- a/modules/verae-access-api/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-access-api - -Direct customer API (`x-api-key`). Separate from Zapier Platform. diff --git a/modules/verae-access-authz/NATS.md b/modules/verae-access-authz/NATS.md deleted file mode 100644 index 5e41e52..0000000 --- a/modules/verae-access-authz/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-access-authz - -`verae.access.authz.check` request-reply. Queue `access-authz`. Fail closed. diff --git a/modules/verae-access-authz/SUMMARY.md b/modules/verae-access-authz/SUMMARY.md deleted file mode 100644 index 65215eb..0000000 --- a/modules/verae-access-authz/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-access-authz - -Default-deny authorization step on the NATS address path. Planes: zapier, web, api, leaf, staff. diff --git a/modules/verae-access-leaf/NATS.md b/modules/verae-access-leaf/NATS.md deleted file mode 100644 index 546d4b4..0000000 --- a/modules/verae-access-leaf/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-access-leaf - -`verae.access.leaf.in` → authz.check → `verae.archive.*` / jobs.*. Denied: billing. diff --git a/modules/verae-access-leaf/SUMMARY.md b/modules/verae-access-leaf/SUMMARY.md deleted file mode 100644 index 389a693..0000000 --- a/modules/verae-access-leaf/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-access-leaf - -Server-to-server NATS leaf ingress. Archive and jobs only. Never billing. diff --git a/modules/verae-access-staff/NATS.md b/modules/verae-access-staff/NATS.md deleted file mode 100644 index 0edb6e8..0000000 --- a/modules/verae-access-staff/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-access-staff - -Plane `staff`. Authz then billing statement/adjust. diff --git a/modules/verae-access-staff/SUMMARY.md b/modules/verae-access-staff/SUMMARY.md deleted file mode 100644 index 70e7243..0000000 --- a/modules/verae-access-staff/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-access-staff - -Staff plane for credits and statement review. diff --git a/modules/verae-access-web/NATS.md b/modules/verae-access-web/NATS.md deleted file mode 100644 index 7f0c825..0000000 --- a/modules/verae-access-web/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-access-web - -Plane `web`. Authz then `verae.billing.statement.get` / `balance.adjust` kind=reload. diff --git a/modules/verae-access-web/SUMMARY.md b/modules/verae-access-web/SUMMARY.md deleted file mode 100644 index 56e767b..0000000 --- a/modules/verae-access-web/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-access-web - -Direct customer web plane. Not Zapier. Statement + reload only after authz. diff --git a/modules/verae-access-zapier/NATS.md b/modules/verae-access-zapier/NATS.md deleted file mode 100644 index 3ebabee..0000000 --- a/modules/verae-access-zapier/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-access-zapier - -Plane `zapier`. Authz then jobs.watch / usage.recorded. Zapier cloud never connects to NATS. diff --git a/modules/verae-access-zapier/SUMMARY.md b/modules/verae-access-zapier/SUMMARY.md deleted file mode 100644 index de4e8c8..0000000 --- a/modules/verae-access-zapier/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-access-zapier - -Zapier Platform HTTPS plane only. No portal, no admin, no leaf. diff --git a/modules/verae-activate/NATS.md b/modules/verae-activate/NATS.md deleted file mode 100644 index 5d8bec8..0000000 --- a/modules/verae-activate/NATS.md +++ /dev/null @@ -1,10 +0,0 @@ -# NATS — verae-activate - -This Zapier Platform app **does not use NATS**. - -| Direction | Address | Peer | Body | -|-----------|---------|------|------| -| IN | Zapier UI / runtime | user Zap | `number1`, `number2`, `text`, `data` / `sha256` | -| OUT HTTPS (optional) | zappier-edge `/v1/add` or `/v1/timestamp` | only if `api_base` + `api_key` set | JSON | - -Blank connection fields → local compute only. diff --git a/modules/verae-activate/SUMMARY.md b/modules/verae-activate/SUMMARY.md deleted file mode 100644 index 975de3d..0000000 --- a/modules/verae-activate/SUMMARY.md +++ /dev/null @@ -1,11 +0,0 @@ -# verae-activate (Zapier Platform app) - -**Job:** Private Zapier integration you push first. Actions run in Zapier cloud. - -**Expects:** User connection (API key optional). - -**Sends:** nothing if fields blank (Add Numbers / Echo / SHA256 / Create Timestamp local mock). If `api_base` + `api_key`, HTTPS to zappier-edge. - -**Does not** speak NATS. - -**Test:** `npm test`; `zapier-platform validate`. diff --git a/modules/verae-archive-aggregator/NATS.md b/modules/verae-archive-aggregator/NATS.md deleted file mode 100644 index 6a73642..0000000 --- a/modules/verae-archive-aggregator/NATS.md +++ /dev/null @@ -1,8 +0,0 @@ -# NATS — verae-archive-aggregator - -| Direction | Address | Peer | Body | -|-----------|---------|------|------| -| OUT | `verae.archive.query` | all WORM | `{ correlationId, sha256, tenantId, kinds[], traceId }` | -| IN | `verae.archive.reply.` | WORM hits | `{ archiveId, sha256, records[] }` | - -Stop collecting at `WAIT_ARCHIVE_MS`. Silent archives are listed in `silent[]`, not errors. diff --git a/modules/verae-archive-aggregator/SUMMARY.md b/modules/verae-archive-aggregator/SUMMARY.md deleted file mode 100644 index d6951ab..0000000 --- a/modules/verae-archive-aggregator/SUMMARY.md +++ /dev/null @@ -1,11 +0,0 @@ -# verae-archive-aggregator - -**Job:** If `includeAttached`, fan out archive query and merge replies into the job JSON. - -**Expects:** wait-path flag from middleware-http; replies on `verae.archive.reply.`. - -**Sends:** `verae.archive.query` to all WORM nodes. - -**Timeout:** missing archives omit slices; chain receipt still succeeds. - -**Test:** `npm test` — one silent bloom miss + one hit; merge seal + metadata-attach. diff --git a/modules/verae-archive-worm/NATS.md b/modules/verae-archive-worm/NATS.md deleted file mode 100644 index a64f14f..0000000 --- a/modules/verae-archive-worm/NATS.md +++ /dev/null @@ -1,9 +0,0 @@ -# NATS — verae-archive-worm - -| Direction | Address | From / to | Body | -|-----------|---------|-----------|------| -| IN | `verae.archive.put` | splitter | `{ sha256, tenantId, kind, record, traceId }` | -| IN | `verae.archive.query` | aggregator (broadcast) | `{ correlationId, sha256, tenantId, kinds[], traceId }` | -| OUT | `verae.archive.reply.` | aggregator | `{ archiveId, sha256, records[], traceId }` **only if bloom.mightHave(sha256)** | - -Subscribe to query **without** a shared queue group so every archive sees every query. diff --git a/modules/verae-archive-worm/SUMMARY.md b/modules/verae-archive-worm/SUMMARY.md deleted file mode 100644 index fe2ac10..0000000 --- a/modules/verae-archive-worm/SUMMARY.md +++ /dev/null @@ -1,14 +0,0 @@ -# verae-archive-worm - -**Job:** Append-only WORM store of metadata and files. Bloom filter: miss → stay silent on NATS. - -**Expects:** -- `verae.archive.put` — append record, add sha256 to bloom -- `verae.archive.query` — `{ correlationId, sha256, tenantId, kinds[] }` (every node sees this; **not** a shared queue group) - -**Sends:** -- `verae.archive.reply.` **only on bloom hit** — `{ archiveId, sha256, records[] }` - -**Does not** write to the blockchain. - -**Test:** `npm test` — miss is `null`; put then query returns records. diff --git a/modules/verae-backup/NATS.md b/modules/verae-backup/NATS.md deleted file mode 100644 index fe8b997..0000000 --- a/modules/verae-backup/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-backup - -Copies JetStream store directory if present. No client connection. diff --git a/modules/verae-backup/SUMMARY.md b/modules/verae-backup/SUMMARY.md deleted file mode 100644 index 9d4acf9..0000000 --- a/modules/verae-backup/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-backup - -Nightly tar of SQLite, IAM, keep, worm/tree runtime, optional JetStream dir. Restore is dry-run unless `--apply`. diff --git a/modules/verae-bootstrap/NATS.md b/modules/verae-bootstrap/NATS.md deleted file mode 100644 index e14b908..0000000 --- a/modules/verae-bootstrap/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-bootstrap - -None. Install-time only. diff --git a/modules/verae-bootstrap/SUMMARY.md b/modules/verae-bootstrap/SUMMARY.md deleted file mode 100644 index 87f842c..0000000 --- a/modules/verae-bootstrap/SUMMARY.md +++ /dev/null @@ -1,5 +0,0 @@ -# verae-bootstrap - -Clone Forgejo modules and install npm deps. Server types under `types/`. - -`scripts/host-deps.sh` checks this machine (Debian/Ubuntu or Alpine) and installs git, curl, Node, build tools for `better-sqlite3`, and `nats-server` when the server type runs JetStream locally. Manifest: `host-deps.tsv`. See `HOST-DEPS.md`. diff --git a/modules/verae-deploy/NATS.md b/modules/verae-deploy/NATS.md deleted file mode 100644 index 880b4e3..0000000 --- a/modules/verae-deploy/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-deploy - -None during deploy. Archive hosts still need nats-server from host-deps. diff --git a/modules/verae-deploy/SUMMARY.md b/modules/verae-deploy/SUMMARY.md deleted file mode 100644 index 4a6b816..0000000 --- a/modules/verae-deploy/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-deploy - -`host-deps` + git checkout tag/branch + npm ci/rebuild on the target OS. Restart keep/fleet after. diff --git a/modules/verae-fleet/NATS.md b/modules/verae-fleet/NATS.md deleted file mode 100644 index bd95c58..0000000 --- a/modules/verae-fleet/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-fleet - -Does not subscribe. Records which workers should. NATS remains loopback. diff --git a/modules/verae-fleet/SUMMARY.md b/modules/verae-fleet/SUMMARY.md deleted file mode 100644 index b4ac4b0..0000000 --- a/modules/verae-fleet/SUMMARY.md +++ /dev/null @@ -1,5 +0,0 @@ -# verae-fleet - -**Job:** Service catalog, per-service configs, monitor, restart, pause/on/off, keep tree-node replica floor. - -**Config:** `fleet.json` (min/max) + `machines.json` (hosts) + `services/.json`. Operator console at `:3850` (Fleet · Trace · Docs). diff --git a/modules/verae-jobs-events/NATS.md b/modules/verae-jobs-events/NATS.md deleted file mode 100644 index 0996e14..0000000 --- a/modules/verae-jobs-events/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-jobs-events - -IN `verae.zapier.jobs.events` queue `jobs-events`. diff --git a/modules/verae-jobs-events/SUMMARY.md b/modules/verae-jobs-events/SUMMARY.md deleted file mode 100644 index 18675cf..0000000 --- a/modules/verae-jobs-events/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-jobs-events - -Mailbox for `verae.zapier.jobs.events` (passthrough + count). diff --git a/modules/verae-keep/NATS.md b/modules/verae-keep/NATS.md deleted file mode 100644 index d5d22db..0000000 --- a/modules/verae-keep/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-keep - -None. HTTP probes only. diff --git a/modules/verae-keep/SUMMARY.md b/modules/verae-keep/SUMMARY.md deleted file mode 100644 index 9ebbfcb..0000000 --- a/modules/verae-keep/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-keep - -Host keep-alive. Restarts crashed units unless fleet paused or stopped them. diff --git a/modules/verae-nats-accounts/NATS.md b/modules/verae-nats-accounts/NATS.md deleted file mode 100644 index bfb0eb5..0000000 --- a/modules/verae-nats-accounts/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-nats-accounts - -Policy only. See `policy.json`. diff --git a/modules/verae-nats-accounts/SUMMARY.md b/modules/verae-nats-accounts/SUMMARY.md deleted file mode 100644 index 8de0c7a..0000000 --- a/modules/verae-nats-accounts/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-nats-accounts - -INTERNAL vs LEAF. Leaf deny `verae.billing.>`. diff --git a/modules/verae-nats-cluster/NATS.md b/modules/verae-nats-cluster/NATS.md deleted file mode 100644 index 9067ba1..0000000 --- a/modules/verae-nats-cluster/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-nats-cluster - -This repo runs the cluster. Clients: `nats://10.10.10.21:4222,nats://10.10.10.22:4222,nats://10.10.10.23:4222`. Routes `:6222`. Monitor loopback `:8222` per guest. Never on `vmbr0`. diff --git a/modules/verae-nats-cluster/SUMMARY.md b/modules/verae-nats-cluster/SUMMARY.md deleted file mode 100644 index 978d54a..0000000 --- a/modules/verae-nats-cluster/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-nats-cluster - -Three Proxmox LXC (511–513, `nats-a/b/c` on `10.10.10.21–23`) form a JetStream cluster on `vmbr1` for HA testing before dedicated hardware. diff --git a/modules/verae-nats-process/NATS.md b/modules/verae-nats-process/NATS.md deleted file mode 100644 index c99f17b..0000000 --- a/modules/verae-nats-process/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-nats-process - -IN `verae.example.process.in` (queue `example-process`). OUT `.out` and `.reply.`. diff --git a/modules/verae-nats-process/SUMMARY.md b/modules/verae-nats-process/SUMMARY.md deleted file mode 100644 index d49143d..0000000 --- a/modules/verae-nats-process/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-nats-process - -Template for a new `verae...*` worker. Copy this repo to expand. diff --git a/modules/verae-ops/NATS.md b/modules/verae-ops/NATS.md deleted file mode 100644 index ed1ae04..0000000 --- a/modules/verae-ops/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-ops NATS - -Documentation only. Runtime NATS bind stays private. See https://zapier.georgelambert.org/packages/verae-ops/06-linking-services.pdf diff --git a/modules/verae-ops/SUMMARY.md b/modules/verae-ops/SUMMARY.md deleted file mode 100644 index b2f0531..0000000 --- a/modules/verae-ops/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-ops - -Install and maintenance documentation: Docker, Proxmox, VMs, dedicated hardware, linking services. diff --git a/modules/verae-proxmox/NATS.md b/modules/verae-proxmox/NATS.md deleted file mode 100644 index 8ad9111..0000000 --- a/modules/verae-proxmox/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-proxmox - -Guest clients use `nats://10.10.10.1:4222` (socat to host loopback). Never bind NATS on vmbr0. diff --git a/modules/verae-proxmox/SUMMARY.md b/modules/verae-proxmox/SUMMARY.md deleted file mode 100644 index f8a065a..0000000 --- a/modules/verae-proxmox/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-proxmox - -LXC 510 `verae-px-worker` on NS1 `vmbr1` `10.10.10.20`. Extra worm/tree copies. Private NATS proxy `10.10.10.1:4222`. diff --git a/modules/verae-request-splitter/NATS.md b/modules/verae-request-splitter/NATS.md deleted file mode 100644 index 0e12c1b..0000000 --- a/modules/verae-request-splitter/NATS.md +++ /dev/null @@ -1,8 +0,0 @@ -# NATS — verae-request-splitter - -| Direction | Address | To | Body | -|-----------|---------|-----|------| -| OUT | `verae.archive.put` | each WORM | one message per publicMeta / privateMeta / file | -| OUT | (in-process) chain | middleware | `{ sha256, hashAlg, data? }` | - -No inbound NATS in the in-process embedding. diff --git a/modules/verae-request-splitter/SUMMARY.md b/modules/verae-request-splitter/SUMMARY.md deleted file mode 100644 index 45c898f..0000000 --- a/modules/verae-request-splitter/SUMMARY.md +++ /dev/null @@ -1,13 +0,0 @@ -# verae-request-splitter - -**Job:** Peel a request into (1) chain hash and (2) off-chain archive puts. - -**Expects messages from:** middleware-http (in-process call today; later NATS `verae.splitter.in` if split out). - -**Sends messages to:** -- Chain path: `{ sha256, hashAlg, data? }` -- `verae.archive.put` for each `publicMeta` / `privateMeta` / `file` - -**Does not talk to Zapier or NATS job poller.** - -**Test:** `npm test` — hash-only has zero puts; two files + public meta → 3 puts. diff --git a/modules/verae-staff-iam/NATS.md b/modules/verae-staff-iam/NATS.md deleted file mode 100644 index 91e8523..0000000 --- a/modules/verae-staff-iam/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-staff-iam - -None. HTTP `:3028`. diff --git a/modules/verae-staff-iam/SUMMARY.md b/modules/verae-staff-iam/SUMMARY.md deleted file mode 100644 index b346202..0000000 --- a/modules/verae-staff-iam/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-staff-iam - -Named internal staff accounts, roles, permissions, JSON sessions, login rate-limit. diff --git a/modules/verae-tree-node/NATS.md b/modules/verae-tree-node/NATS.md deleted file mode 100644 index f9298ee..0000000 --- a/modules/verae-tree-node/NATS.md +++ /dev/null @@ -1,7 +0,0 @@ -# NATS — verae-tree-node - -| Direction | Address | From / to | Body | -|-----------|---------|-----------|------| -| IN | `verae.archive.put` | merkle builder | `{ sha256, kind: "tree", record: { merkleRoot, proof, leafIndex, chainSealJobId } }` | -| IN | `verae.archive.query` | aggregator (broadcast) | `{ correlationId, sha256, kinds: ["tree", …] }` | -| OUT | `verae.archive.reply.` | aggregator | only if bloom.mightHave(sha256) | diff --git a/modules/verae-tree-node/SUMMARY.md b/modules/verae-tree-node/SUMMARY.md deleted file mode 100644 index ab2b882..0000000 --- a/modules/verae-tree-node/SUMMARY.md +++ /dev/null @@ -1,9 +0,0 @@ -# verae-tree-node - -**Job:** Hold inclusion proofs for SHA-256 leaves that were registered only as part of a bulk Merkle summary. The main Verae chain itemizes the **root**, not each leaf. - -**Expects messages from:** middleware batch path (`verae.archive.put` kind `tree`); aggregator (`verae.archive.query`). - -**Sends messages to:** `verae.archive.reply.` on bloom hit. - -**Does not talk to Zapier.** Same bloom-silence rule as `verae-archive-worm`. diff --git a/modules/verae-uptime/NATS.md b/modules/verae-uptime/NATS.md deleted file mode 100644 index 282b692..0000000 --- a/modules/verae-uptime/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-uptime - -None. HTTPS only. diff --git a/modules/verae-uptime/SUMMARY.md b/modules/verae-uptime/SUMMARY.md deleted file mode 100644 index 6d7a14e..0000000 --- a/modules/verae-uptime/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# verae-uptime - -Off-box HTTPS GET of public doors. `--once` for cron (exit 2 on failure); loop serves `/status` on `:3870`. diff --git a/modules/verae-zapier-middleware/NATS.md b/modules/verae-zapier-middleware/NATS.md deleted file mode 100644 index abe42c8..0000000 --- a/modules/verae-zapier-middleware/NATS.md +++ /dev/null @@ -1,9 +0,0 @@ -# NATS — verae-middleware - -| Direction | Address | Peer | Body | -|-----------|---------|------|------| -| OUT | `verae.zapier.jobs.watch` | job-poller | job watch payload | -| IN | `verae.zapier.jobs.events` | waiter | terminal status | -| OUT | (via aggregator) `verae.archive.query` | WORM | attached lookup | - -HTTP remains the only Zapier-facing surface. diff --git a/modules/verae-zapier-middleware/SUMMARY.md b/modules/verae-zapier-middleware/SUMMARY.md deleted file mode 100644 index 7b275df..0000000 --- a/modules/verae-zapier-middleware/SUMMARY.md +++ /dev/null @@ -1,15 +0,0 @@ -# verae-middleware (HTTP edge) - -**Job:** Public `/zapier/v1/*`. Auth, entitlements, timestamp/wait, hash lookup, objects, receipts. Publishes NATS jobs; waits on events. - -**Expects HTTPS from:** zappier-edge (or Zapier if pointed here). - -**Sends:** -- HTTPS to verae-chain-client (`/api/timestamp`, `/api/status`, `/api/verify`) -- `verae.zapier.jobs.watch` after create -- waits `verae.zapier.jobs.events` -- splitter + aggregator when attachments / `includeAttached` - -**Returns to requestor:** 202 `{ jobId }` or wait JSON (completed / pending+jobId). - -**NATS:** never exposed to Zapier. diff --git a/modules/verae-zapier-simulator/NATS.md b/modules/verae-zapier-simulator/NATS.md deleted file mode 100644 index bf6e66f..0000000 --- a/modules/verae-zapier-simulator/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — verae-zapier-simulator - -In-process replay of `jobs.watch`, `jobs.events`, `archive.put`, `archive.query`, `archive.reply.*`. No live subscribe. diff --git a/modules/verae-zapier-simulator/SUMMARY.md b/modules/verae-zapier-simulator/SUMMARY.md deleted file mode 100644 index 3c186ff..0000000 --- a/modules/verae-zapier-simulator/SUMMARY.md +++ /dev/null @@ -1,7 +0,0 @@ -# verae-zapier-simulator - -**Job:** Zapier-like UI + hop-by-hop trace console to validate messaging, assumptions, delays, failures, recoveries, and suggested modifications before `zapier-platform push`. - -**Expects:** HTTP `:3847` or `Simulator.run` in tests. - -**Sends:** nothing to live NATS / Zapier / Verae. diff --git a/modules/verae-zapier/NATS.md b/modules/verae-zapier/NATS.md deleted file mode 100644 index b04ff77..0000000 --- a/modules/verae-zapier/NATS.md +++ /dev/null @@ -1,10 +0,0 @@ -# NATS — verae-zapier-app - -This Zapier Platform app **does not use NATS**. - -| Direction | Address | Peer | Body | -|-----------|---------|------|------| -| IN | Zapier runtime | user Zap | create/search/trigger fields | -| OUT HTTPS | middleware `/zapier/v1/timestamp`, `/wait`, `/verify`, `/status/{id}`, `/hashes/{sha256}`, REST Hook subscribe | verae-middleware | Bearer `zmw_` | - -Job completion is a REST Hook HTTP POST from webhook-deliver, not a NATS client in Zapier. diff --git a/modules/verae-zapier/SUMMARY.md b/modules/verae-zapier/SUMMARY.md deleted file mode 100644 index 94b22b3..0000000 --- a/modules/verae-zapier/SUMMARY.md +++ /dev/null @@ -1,9 +0,0 @@ -# verae-zapier-app - -**Job:** Full Zapier CLI app: timestamp, wait, verify, batch, job status, hash lookup, REST Hook. - -**Expects:** `zmw_` middleware key (today) or zappier key after composition. - -**Sends:** HTTPS to middleware `/zapier/v1/*`. - -**Does not** speak NATS. diff --git a/modules/zapier-decisions/NATS.md b/modules/zapier-decisions/NATS.md deleted file mode 100644 index 74566e5..0000000 --- a/modules/zapier-decisions/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — zapier-decisions - -None. diff --git a/modules/zapier-decisions/SUMMARY.md b/modules/zapier-decisions/SUMMARY.md deleted file mode 100644 index 7c4f63c..0000000 --- a/modules/zapier-decisions/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# zapier-decisions - -Architecture decisions and action log for the lab cleanup (prepaid SoT, identity, access planes, leaf policy, fleet). diff --git a/modules/zapier-user-docs/NATS.md b/modules/zapier-user-docs/NATS.md deleted file mode 100644 index 2f31dbe..0000000 --- a/modules/zapier-user-docs/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — zapier-user-docs - -Static docs. Users never configure NATS in Zapier. diff --git a/modules/zapier-user-docs/SUMMARY.md b/modules/zapier-user-docs/SUMMARY.md deleted file mode 100644 index 63f9088..0000000 --- a/modules/zapier-user-docs/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# zapier-user-docs - -**Job:** Customer guide from signup through register, central-chain lookup, and tree-node lookup of bulk-summary leaves. diff --git a/modules/zappier-account-balance/NATS.md b/modules/zappier-account-balance/NATS.md deleted file mode 100644 index 04ef95f..0000000 --- a/modules/zappier-account-balance/NATS.md +++ /dev/null @@ -1,12 +0,0 @@ -# NATS — zappier-account-balance - -Queue group `account-balance`. This process is the source of truth for prepaid cents. - -| Direction | Address | Kind | Body | -|-----------|---------|------|------| -| IN | `verae.billing.statement.get` | request-reply | `{ customerId }` → statement | -| IN | `verae.billing.balance.get` | request-reply | `{ customerId }` → statement | -| IN | `verae.billing.balance.adjust` | request-reply | `{ customerId, cents, reason, agent, kind }` | -| IN | `verae.billing.usage.recorded` | pub | `{ customerId, endpointId, cents, at }` (debits prepaid) | - -`payment.recorded` and `credit.applied` are fan-out events from publishers; prepaid mutations go through `balance.adjust`. diff --git a/modules/zappier-account-balance/SUMMARY.md b/modules/zappier-account-balance/SUMMARY.md deleted file mode 100644 index eb73f99..0000000 --- a/modules/zappier-account-balance/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# zappier-account-balance - -NATS source of truth for prepaid balances, credits, usage events, and payments. diff --git a/modules/zappier-accounting-export/NATS.md b/modules/zappier-accounting-export/NATS.md deleted file mode 100644 index e19b513..0000000 --- a/modules/zappier-accounting-export/NATS.md +++ /dev/null @@ -1,7 +0,0 @@ -# NATS — zappier-accounting-export - -| Direction | Address | Kind | -|-----------|---------|------| -| OUT | `verae.billing.statement.get` | request-reply (review) | - -IIF/CSV export remains HTTPS to zappier-edge admin. diff --git a/modules/zappier-accounting-export/SUMMARY.md b/modules/zappier-accounting-export/SUMMARY.md deleted file mode 100644 index 78be87b..0000000 --- a/modules/zappier-accounting-export/SUMMARY.md +++ /dev/null @@ -1,5 +0,0 @@ -# zappier-accounting-export - -Accounting export of invoices to QuickBooks IIF and CSV, plus **review** of customer credits, balances, usage, and payments over NATS. - -Forgejo: https://git.georgelambert.org/marchon/zappier-accounting-export diff --git a/modules/zappier-customer-service/NATS.md b/modules/zappier-customer-service/NATS.md deleted file mode 100644 index 14ded3b..0000000 --- a/modules/zappier-customer-service/NATS.md +++ /dev/null @@ -1,8 +0,0 @@ -# NATS — zappier-customer-service - -| Direction | Address | Kind | -|-----------|---------|------| -| OUT | `verae.billing.statement.get` | request-reply (review) | -| OUT | `verae.billing.balance.adjust` | request-reply (credits) | - -HTTP fallback: `ACCOUNT_BALANCE_URL` then zappier-edge admin. Zapier cloud never connects here. diff --git a/modules/zappier-customer-service/SUMMARY.md b/modules/zappier-customer-service/SUMMARY.md deleted file mode 100644 index 2a271cc..0000000 --- a/modules/zappier-customer-service/SUMMARY.md +++ /dev/null @@ -1,7 +0,0 @@ -# zappier-customer-service - -CS department API and UI for prepaid credit additions and **review** of credits, balances, usage, and payments. - -Internal path: NATS `verae.billing.statement.get` / `verae.billing.balance.adjust` → account-balance. HTTP fallback to `:3010` then zappier-edge admin. - -Forgejo: https://git.georgelambert.org/marchon/zappier-customer-service diff --git a/modules/zappier-identity/NATS.md b/modules/zappier-identity/NATS.md deleted file mode 100644 index ad889bb..0000000 --- a/modules/zappier-identity/NATS.md +++ /dev/null @@ -1,3 +0,0 @@ -# NATS — zappier-identity - -`verae.identity.bind` / `verae.identity.lookup` queue `identity`. diff --git a/modules/zappier-identity/SUMMARY.md b/modules/zappier-identity/SUMMARY.md deleted file mode 100644 index 9afb4e6..0000000 --- a/modules/zappier-identity/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# zappier-identity - -Bind and lookup `veraeUserId`. JWTs never stored. diff --git a/modules/zappier-sales-pricing/NATS.md b/modules/zappier-sales-pricing/NATS.md deleted file mode 100644 index e8f079e..0000000 --- a/modules/zappier-sales-pricing/NATS.md +++ /dev/null @@ -1,7 +0,0 @@ -# NATS — zappier-sales-pricing - -| Direction | Address | Kind | -|-----------|---------|------| -| OUT | `verae.billing.statement.get` | request-reply (review) | - -Pricing writes remain HTTPS to zappier-edge admin. diff --git a/modules/zappier-sales-pricing/SUMMARY.md b/modules/zappier-sales-pricing/SUMMARY.md deleted file mode 100644 index 3efe8fd..0000000 --- a/modules/zappier-sales-pricing/SUMMARY.md +++ /dev/null @@ -1,5 +0,0 @@ -# zappier-sales-pricing - -Sales department API and UI for per-customer tier/multiplier and **review** of the same NATS statement as CS and the customer portal. - -Forgejo: https://git.georgelambert.org/marchon/zappier-sales-pricing diff --git a/modules/zappier/NATS.md b/modules/zappier/NATS.md deleted file mode 100644 index f216c3b..0000000 --- a/modules/zappier/NATS.md +++ /dev/null @@ -1,15 +0,0 @@ -# NATS — zappier-edge - -Zapier cloud still never connects to NATS. The edge process **does** publish and request on the private billing bus. - -| Direction | Address | Peer | Body | -|-----------|---------|------|------| -| IN HTTPS | `/v1/*` | Zapier Platform app | JSON + `x-api-key` | -| OUT HTTPS | middleware `/zapier/v1/*` | verae-middleware | same tenant request | -| OUT NATS | `verae.billing.usage.recorded` | account-balance | meter event (`customerId`, `veraeUserId`) | -| OUT NATS | `verae.billing.payment.recorded` | account-balance / others | portal reload | -| OUT NATS | `verae.billing.credit.applied` | account-balance / others | admin/CS credit | -| OUT NATS | `verae.billing.statement.get` | account-balance | portal/admin review | -| OUT NATS | `verae.billing.balance.adjust` | account-balance | prepaid mutation | - -Jobs, archive, and webhooks stay on middleware workers. diff --git a/modules/zappier/SUMMARY.md b/modules/zappier/SUMMARY.md deleted file mode 100644 index fdf0ba3..0000000 --- a/modules/zappier/SUMMARY.md +++ /dev/null @@ -1,11 +0,0 @@ -# zappier-edge - -**Job:** Metered commercial API, portal, admin, Stripe. Zapier’s only public HTTPS hop. - -**Expects:** Zapier Platform app with `x-api-key`. - -**Sends:** HTTPS to middleware `/zapier/v1/*` (or local mock `/v1/timestamp`, `/v1/add`, `/v1/hashes`, `/v1/receipts`). - -**Does not** speak NATS or `api.veraetime.net`. - -**Test:** `npm test` (Jest, 177+). diff --git a/scripts/jobbus-farm.sh b/scripts/jobbus-farm.sh deleted file mode 100755 index 4f85abe..0000000 --- a/scripts/jobbus-farm.sh +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/env bash -# Farm multi-build pieces from jobs/pieces.yaml (or PIECES_FILE) onto job-bus. -set -euo pipefail -export PATH="${HOME}/bin:/opt/homebrew/bin:/usr/local/bin:${PATH}" -ROOT="$(cd "$(dirname "$0")/.." && pwd)" -cd "$ROOT" - -if [[ -f "${HOME}/.config/nats/job-bus.env" ]]; then - set -a; # shellcheck disable=SC1090 - source "${HOME}/.config/nats/job-bus.env"; set +a -elif [[ -f /etc/nats/job-bus.env ]]; then - set -a; source /etc/nats/job-bus.env; set +a -else - echo "missing job-bus.env" >&2; exit 1 -fi - -PIECES_FILE="${PIECES_FILE:-$ROOT/jobs/pieces.yaml}" -[[ -f "$PIECES_FILE" ]] || { echo "missing $PIECES_FILE (copy from job-bus template)" >&2; exit 1; } - -PY="${JOB_BUS_PYTHON:-}" -if [[ -z "$PY" ]]; then - if [[ -x "$HOME/job-bus/venv/bin/python" ]]; then PY="$HOME/job-bus/venv/bin/python" - elif [[ -x /opt/job-bus/venv/bin/python ]]; then PY=/opt/job-bus/venv/bin/python - else PY=python3 - fi -fi - -WATCH=0 -CLEAN_AFTER=0 -PROGRESS=0 -while [[ $# -gt 0 ]]; do - case "$1" in - --watch) WATCH=1; shift ;; - --progress) PROGRESS=1; shift ;; - --cleanup-after) CLEAN_AFTER=1; shift ;; - -h|--help) - echo "usage: scripts/jobbus-farm.sh [--watch] [--progress] [--cleanup-after]" - exit 0 ;; - *) echo "unknown: $1" >&2; exit 1 ;; - esac -done - -# Ensure PyYAML available in venv lightly -"$PY" -c 'import yaml' 2>/dev/null || "$PY" -m pip install -q pyyaml - -MAP=$("$PY" - "$PIECES_FILE" "$ROOT" <<'PY' -import json, os, sys, datetime -from pathlib import Path -try: - import yaml -except ImportError: - raise SystemExit("PyYAML required") - -path, root = sys.argv[1], sys.argv[2] -doc = yaml.safe_load(open(path)) -defaults = doc.get("defaults") or {} -repo = Path(root).name -date = datetime.datetime.now().strftime("%Y%m%d-%H%M%S") -batch = (doc.get("batch") or f"{repo}-{date}").replace("{{REPO_NAME}}", repo).replace("{{DATE}}", date) -pieces = doc.get("pieces") or [] -out_dir = Path(root) / "jobs" / "submitted" / batch -out_dir.mkdir(parents=True, exist_ok=True) -ids = [] -for i, p in enumerate(pieces, 1): - pid = str(p.get("id") or f"piece-{i:02d}") - kind = p.get("kind") or defaults.get("kind") or "cpu" - requires = p.get("requires") if "requires" in p else defaults.get("requires") or [] - if requires is None: - requires = [] - cmd = p.get("cmd") - if not cmd: - raise SystemExit(f"piece {pid} missing cmd") - job_id = f"job-{batch}-{pid}" - body = { - "id": job_id, - "kind": kind, - "requires": list(requires), - "cmd": list(cmd), - "timeout_sec": int(p.get("timeout_sec") or defaults.get("timeout_sec") or 3600), - "cleanup": p.get("cleanup") or defaults.get("cleanup") or "none", - "meta": {"batch": batch, "piece": pid, "repo": repo, **(p.get("meta") or {})}, - "ts": datetime.datetime.now(datetime.timezone.utc).isoformat().replace("+00:00", "Z"), - } - if p.get("cwd"): - body["cwd"] = p["cwd"] - else: - # default cwd: repo root — only works if worker can see this path (shared mount). - # Until SSHFS is set, prefer pieces that use absolute worker paths or staged inputs. - body["cwd"] = root - jf = out_dir / f"{pid}.json" - jf.write_text(json.dumps(body, indent=2) + "\n") - ids.append({"id": job_id, "kind": kind, "file": str(jf), "piece": pid}) -print(json.dumps({"batch": batch, "jobs": ids, "count": len(ids)})) -PY -) - -BATCH=$(echo "$MAP" | "$PY" -c 'import json,sys; print(json.load(sys.stdin)["batch"])') -COUNT=$(echo "$MAP" | "$PY" -c 'import json,sys; print(json.load(sys.stdin)["count"])') -echo "batch=$BATCH pieces=$COUNT" - -echo "$MAP" | "$PY" -c 'import json,sys; d=json.load(sys.stdin); print("\n".join(j["file"] for j in d["jobs"]))' | while read -r jf; do - submit-job --json "$jf" -done - -echo "submitted $COUNT jobs for batch $BATCH" -echo "track: job-progress --batch $BATCH --expect $COUNT" -echo "clean: job-cleanup --batch $BATCH" - -if [[ "$PROGRESS" -eq 1 ]]; then - job-progress --batch "$BATCH" --expect "$COUNT" || true -fi - -if [[ "$WATCH" -eq 1 ]]; then - # simple wait via status subscription count*2 (running+done) approx using progress expect - job-progress --batch "$BATCH" --expect "$COUNT" || true -fi - -if [[ "$CLEAN_AFTER" -eq 1 ]]; then - job-cleanup --batch "$BATCH" || true -fi