Commit Graph
42 Commits
Author SHA1 Message Date
Antigravity AI 26d2063a1e docs(25-01): add plugin filter guide with flights worked example (DOC-02)
- explains getFilterDefinitions, FilterDefinition/FilterValue shapes, get_plugin_filters/set_filter flow
- bump 2.46.2 -> 2.46.3
2026-05-31 13:37:06 +12:00
Silvertakana a7d96f208f feat: Phase 2 install auth gate (ADR-003 closeout) (#192)
* fix(e2e): guard marketplace webServer and exclude per-app tests from main Playwright config

Root cause: playwright.config.ts unconditionally started the marketplace dev server at
../worldwideview-marketplace. In CI only worldwideview is checked out, so spawn() received
a non-existent cwd which Node.js surfaces as "spawn /bin/sh ENOENT", crashing the entire
test run before any browser launched.

Two targeted fixes:
1. Wrap the marketplace webServer entry in fs.existsSync(MARKETPLACE_DIR) so CI skips it
   gracefully. Use playwright.marketplace.config.ts to run cross-app marketplace tests locally.
2. Add testIgnore for web-auth.spec.ts and marketplace-from-instance.spec.ts — both target
   sibling repos (worldwideview-web / worldwideview-marketplace) and have their own dedicated
   configs (playwright.web.config.ts / playwright.marketplace.config.ts). The main config
   should only exercise the worldwideview app itself.

* feat(09-02): add playwright.cross-app.config.ts and .env.test for cross-origin specs

- Add playwright.cross-app.config.ts with dual webServer array (wwv.local:3001 + marketplace.wwv.local:3002)
- testMatch targets both upcoming cross-app spec files; baseURL set to marketplace.wwv.local:3002
- Create worldwideview/.env.test with PLAYWRIGHT_TEST_EMAIL + PLAYWRIGHT_TEST_PASSWORD (gitignored)
- Add explicit .env.test entry to .gitignore (was not covered by existing .env/.env.local patterns)
- Bump version 2.20.2 -> 2.21.0 (feat: minor)

* feat(09-02): add cross-app Playwright specs for redirect handshake and sign-out (REQ-16)

- Add marketplace-redirect-handshake.spec.ts: 2 tests verifying next= param construction and login-then-redirect-back flow
- Add marketplace-sign-out.spec.ts: 1 test verifying avatar dropdown sign-out clears session and returns to marketplace home
- Update playwright.cross-app.config.ts to load .env.test credentials via fs (no dotenv package required)
- All specs target https://marketplace.wwv.local:3002 (never localhost:3002) for correct .wwv.local cookie domain
- 3 tests total listed by playwright --list

* feat: add planning-sync hook script for .planning branch isolation

* fix: guard planning-sync against missing .planning, wrong repo, and silent checkout failures

- Exit early if .planning/.git doesn't exist (avoids false-success on machines without the private repo)
- Exit early if CWD is not a worldwideview repo or worktree (prevents syncing from wwv-data-engine etc.)
- Wrap both checkout calls in exit-code checks so failures emit WARNING messages instead of false success

* feat: add post-checkout hook for .planning auto-sync

* fix: add existence guard to post-checkout hook before calling planning-sync

* docs: add .planning branch convention to worktree-bootstrap skill

* feat(11-01): add LegalFooter component and .legal-footer CSS class

- Create src/components/layout/LegalFooter.tsx as a Server Component
- Export named function LegalFooter with two external anchors
- Both anchors use target="_blank" rel="noopener noreferrer" (T-11-01)
- Links target locked URLs: privacy-policy and cloud-terms-of-service
- Append .legal-footer + a + a:hover rules to globals.css
- position:fixed bottom:0 z-index:10 per UI-SPEC
- Bump version 2.23.2 -> 2.23.3

* feat(11-01): remove Vercel Analytics, mount LegalFooter in root layout

- Remove @vercel/analytics/next import from layout.tsx (D-02)
- Remove {process.env.VERCEL && <Analytics />} JSX (D-02, T-11-02)
- Add import { LegalFooter } from @/components/layout/LegalFooter
- Render <LegalFooter /> as last child of <body> (D-04)
- Remove @vercel/analytics from dependencies in package.json
- Regenerate pnpm-lock.yaml after dependency removal
- AdSense block (lines 27-37) untouched per D-03
- Bump version 2.23.3 -> 2.23.4

* fix(worktree): fix link_planning hook path conversion for Windows

Worktrunk substitutes {{ worktree_path }} as a Unix-style path
(/c/dev/...) which cmd.exe cannot resolve. It also strips $ sigils
from variable names before executing hook commands, making inline
PowerShell variables unusable.

Extract junction logic to .agents/scripts/link-planning.ps1 and
unlink-planning.ps1. The hooks now call powershell -File with
the path as an argument, avoiding both issues entirely.

* docs: add ADR-004 and phase-2 implementation plans

Adds the Supabase session cookies httponly ADR alongside the six
implementation plan documents produced during the auth gate phase.

* feat(auth): implement Phase 2 cloud auth gate (ADR-003 closeout)

- Cloud edition login page redirects to NEXT_PUBLIC_AUTH_HOST_URL;
  local/demo editions keep the NextAuth credentials form
- Delete signup pages and Supabase PKCE callback route from worldwideview
  (auth host owns them per ADR-003)
- Add Supabase SSR helpers (cookieOptions, server, client) with
  httpOnly:true cookies per ADR-004
- Dual-dispatch install-redirect and grant-token: Supabase on cloud,
  NextAuth on local/demo; redirect param unified to ?next=
- Add streaming mode to safeFetch for MJPEG camera proxy streams
- Extract LoginForm into its own component
- Update Playwright config to conditionally start marketplace dev server

* fix(types): cast undici ReadableStream body to BodyInit to satisfy DOM types

node:stream/web ReadableStream is structurally incompatible with the DOM
ReadableStream expected by the Response constructor -- the pipeThrough
signature differs on the T | undefined generic bound. Cast to BodyInit
(which is the correct type for the streaming pass-through) to resolve
the TS2345 error in ssrf.ts line 112.

* fix(e2e): exclude cross-app marketplace specs from default Playwright run

marketplace-redirect-handshake.spec.ts and marketplace-sign-out.spec.ts
require a running marketplace.wwv.local:3002 instance (cross-app
environment). They were being picked up by playwright.config.ts in CI
where that host does not exist, causing ERR_NAME_NOT_RESOLVED failures.
Added both files to testIgnore alongside the existing exclusions; they
should be run via playwright.cross-app.config.ts only.

* fix: add pointer event support to bottom panel resize for webkit

Playwright's webkit engine dispatches pointermove/pointerup reliably
during synthetic drags but mousemove sometimes does not fire. Add
pointermove and pointerup listeners alongside the existing mouse
listeners, and add onPointerDown to the drag handle, so the resize
test passes across all three browser engines.
2026-05-28 21:03:14 +12:00
Silvertakana 08308f2588 fix(gc): narrow mdc-ref detector to eliminate false positives (#199)
* feat(marketplace): pass from_instance origin when opening marketplace

BrowseLink in PluginsTab now appends ?from_instance=<origin> so the
marketplace can silently capture the instance URL into localStorage,
skipping the manual InstanceConfig modal for users arriving from the app.

* test(e2e): add marketplace instance auto-discovery E2E tests

- playwright.marketplace.config.ts: standalone config that starts only
  the marketplace on port 3002, no Docker/Postgres required
- tests/marketplace-from-instance.spec.ts: 4 marketplace-side tests
  (capture valid URL, reject javascript: protocol, reject self-origin,
  skip when no param) + 1 full-flow test (worldwideview -> marketplace,
  auto-skipped when running under marketplace-only config)
- NEXT_PUBLIC_MARKETPLACE_URL env var in BrowseLink lets tests point
  to localhost:3002 instead of the production marketplace
- data-testid="browse-plugins-btn" for stable Playwright selector
- playwright.config.ts updated with both webServers for full E2E

Run marketplace tests (no Docker): pnpm exec playwright test --config=playwright.marketplace.config.ts
Run full E2E (Docker required):    pnpm test:e2e

* feat: implement Phase 2 install auth gate (ADR-003 closeout)

Closes the three foundational auth gaps that blocked a proper install gate:

2A - SSR session persistence:
- Add @supabase/ssr; create src/lib/supabase/{cookieOptions,server,client}.ts
  mirroring the marketplace recipe so both repos issue the same cookie type
- Migrate login/actions.ts from @supabase/supabase-js to createServerClient
  (previously the Supabase session was discarded; no cookie was ever set)
- Fix getSafeRedirect to allow trusted subdomain callbacks via
  NEXT_PUBLIC_WWV_COOKIE_DOMAIN so marketplace ?callbackUrl= round-trips work
- Add NEXT_PUBLIC_WWV_COOKIE_DOMAIN and NEXT_PUBLIC_AUTH_HOST_URL to .env.example

2B - Signup route at auth host:
- Add /signup page and server action (supabase.auth.signUp with emailRedirectTo)
- Add /auth/callback route to handle Supabase PKCE email verification exchange
- Add "Sign up" link to login page preserving ?callbackUrl=

2C - Install auth gate:
- Swap NextAuth auth() for Supabase getSupabaseUser() in install-redirect route
  (local/demo edition still uses NextAuth)

2D - Sweep:
- httpOnly: true added to buildCookieOptions()
- cloud-auth-architecture.md superseded section collapsed to forward-pointer
- ADR-003 status updated to Accepted with implementation notes

* chore: exclude .planning from git (moved to private repo)

* chore(05-01): add Playwright config and E2E specs for worldwideview-web auth UI

- playwright.web.config.ts: targets https://wwv.local:3001 with ignoreHTTPSErrors
- tests/web-auth.spec.ts: 4 describe groups covering reset-password form, /accounts redirect, /auth/verify no-code error, /auth/reset-password/confirm no-hash timeout
- bump version 2.20.0 -> 2.20.1

* fix(gc): narrow mdc-ref detector to eliminate false positives

Pattern now requires a quoted string context (['\"].*\.mdc['\"]) and
only scans .ts/.tsx files, excluding scripts/. Prevents the scanner
from flagging its own source code and rule documentation that explain
the anti-pattern rather than violating it.
2026-05-28 11:27:21 +12:00
Silvertakana 02336e6a0a fix(security): Phase 3 audit blockers — PKCE cookie path + WsClient subscribe race (#190)
* fix(incidents): add mapWebsocketPayload default to BaseIncidentPlugin

Default unwraps three WsClient-visible payload shapes:
- scheduler envelope { source, fetchedAt, items, totalCount } -> items
- GeoJSON FeatureCollection { features: [...] } -> normalised GeoEntity[]
- flat GeoEntity[] -> passthrough (with timestamp normalisation)

Resolves the silent-drop bug that left the earthquakes plugin showing an empty
layer when the scheduler's standard wrapping was used. Subclasses can still
override mapWebsocketPayload for domain-specific shapes (iranwarlive pattern
preserved by 2 override tests).

Test deltas:
- 2 it.fails tests flipped to passing (scheduler-wrap, GeoJSON unwrap).
- 2 'currently drops' companion tests deleted (bug is fixed, companions obsolete).
- 1 structural test updated: 'does NOT have mapWebsocketPayload' -> 'has mapWebsocketPayload defined'.
- Net: 12 tests -> 10 tests, all passing.

* test(ssrf): replace placeholder assertions with real tests for DNS pinning and size limits

The two expect(true).toBe(true) stubs in ssrf.spec.ts are replaced with
assertions that verify actual SSRF guard behavior:

- "enforces maxSize" — mocks undici.fetch to return an 11-byte body with a
  10-byte limit; verifies response.text() rejects with "size exceeded"
- "does not follow redirects" — mocks dns.lookup + undici.fetch; verifies
  redirect:manual is passed, fetch is called once, and the 301 is returned
  without being followed; also asserts dispatcher is set (DNS pinning)

Uses vi.hoisted + vi.mock to patch dns/promises and undici at module level.
360/360 tests pass.

* fix(security): close Phase 3 audit blockers and unregistered flags

- WsClient.ts: guard subscribe() against sending frames while awaitingWelcome=true;
  prevents pre-auth subscribe race when a second plugin subscribes mid-handshake
- connect/route.ts + callback/route.ts: set PKCE cookie path="/" to satisfy
  RFC 6265bis __Host- prefix requirement (Chromium silently rejects __Host- + path!=/)
- pkce.spec.ts: update assertion to match corrected path="/"
- docs/plans/03-SECURITY.md: security audit report (13 closed, 1 fixed, 3 flags filed)
2026-05-25 00:58:13 +12:00
Silvertakana dc83f97be4 feat(auth): ADR-001 Workstream C — ticket auth, SSRF, and WebSocket first-message auth (#180)
* docs: add ADR-003 document and update cloud-auth-architecture superseded notice

* chore: bump version for ADR-001 Workstream C

* fix: remove stray 'r' prefix on import in places/details route

rimport typo on line 1 of src/app/api/places/details/route.ts caused
TS1435 (unknown keyword), ESLint parse error, and a webpack build failure
in Docker CI. Corrected to a valid import statement.
2026-05-23 16:16:31 +12:00
SilvertakanaandClaude Opus 4.7 26568429bc feat(auth): ADR-001 Workstream C — ticket auth, SSRF protection, and pre-flight audit (#171)
* feat(auth): implement ADR-001 Workstream C — ticket auth, SSRF, and pre-flight audit

C1: Boot-time ENCRYPTION_MASTER_KEY / AUTH_SECRET validation (instrumentation.ts);
    remove silent fallback in encryption.ts; guard marketplace token from data-plane misuse.
C2: SSRF host-allowlist (PROXY_HOST_ALLOWLIST) in ssrf.ts; route iframe proxy through safeFetch.
C3: ticketClient.ts — exchanges long-lived API key for 5-min EdDSA ticket from Marketplace;
    audience fixed to ENGINE_AUDIENCE='wwv-data-engine'; cache keyed by engine not plugin.
C4: WsClient.ts first-message auth — sends {type:'auth',v:1,token} on open; queues subscribes
    until {type:'welcome'}; gated by ticketAuthEnabledForPlugin.
C5: edition.ts — ticketAuthEnabledForPlugin reads NEXT_PUBLIC_WWV_TICKET_AUTH_PLUGINS flag.
Step 0: docs/deploys/2026-05-21-adr-001-preflight.md + docs/feature-flags.md audit artifacts.
Tests: ticketClient.spec, WsClient.spec, ssrf.spec updated (342 passing).

Co-Authored-By: Claude Opus 4.7 <[email protected]>

* fix(ci): resolve three PR #171 type-check and startup failures

- auth-contracts.spec.ts: assert WebSocketAuthMessage.token as PluginTicket
  (not SensitiveString — distinct branded types fail toEqualTypeOf equality)
- pkce.spec.ts: replace function(){return this} mock with arrow fn to fix
  TS2683 implicit-this error in strict mode
- test-local-dev.yml: add ENCRYPTION_MASTER_KEY so instrumentation.ts boot
  validation doesn't crash the startup test in CI

Co-Authored-By: Claude Opus 4.7 <[email protected]>

* fix(ci): fix pkce mock constructor and env injection for startup test

- pkce.spec.ts: use function(this: object) instead of arrow fn so the
  mock can be called with `new Configuration(...)` (arrow functions are
  not constructors)
- test-local-dev.yml: sed-replace ENCRYPTION_MASTER_KEY in .env after
  cp .env.example so Next.js instrumentation boot check passes in CI

Co-Authored-By: Claude Opus 4.7 <[email protected]>

* fix(ci): also sed-replace AUTH_SECRET in .env for startup test

.env.example has AUTH_SECRET= (empty), which Next.js loads and overrides
the system env var, causing the same boot crash as ENCRYPTION_MASTER_KEY.

Co-Authored-By: Claude Opus 4.7 <[email protected]>

* fix(setup): auto-generate ENCRYPTION_MASTER_KEY in setup.mjs

The Playwright CI workflow uses `pnpm run setup` which previously only
generated AUTH_SECRET. ENCRYPTION_MASTER_KEY remained empty from
.env.example, causing instrumentation.ts boot validation to crash.

This fix also improves the new-developer onboarding experience — both
required secrets are now generated in a single setup step.

Co-Authored-By: Claude Opus 4.7 <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 <[email protected]>
2026-05-21 17:00:24 +12:00
SilvertakanaandClaude Sonnet 4.6 58aac77a0b fix(engine): resolve plugin 404s and local engine routing (#166)
* refactor(marketplace): drive auto-seeding from signed verified registry

Retires the hard-coded DEFAULT_PLUGIN_IDS list and makes the signed
verified registry the single source of truth for what lands in a fresh
install. Publishing a plugin to the verified registry now auto-seeds
it; no code change required to add new defaults.

Also fixes the diagnosed plugins-404: fortiguard and nz-traffic-cameras
were in the static list but not published to npm, causing every fresh
boot to hit manifest 404s. Those entries are gone with the list.

- Delete src/lib/marketplace/defaultPlugins.ts (legacy static list).
- Seeder iterates getVerifiedPluginIds() from registryClient.
- Skip markSeeded when the verified set is empty so a registry outage
  doesn't lock fresh installs into zero plugins; the next request
  retries (5-min cache in registryClient bounds the request rate).
- Stamp every seeded plugin as trust=verified by definition.
- Tests rewritten against a fake verified set; new test asserts
  empty-registry deferral.
- Sync marketplace-architecture rule + migrate-legacy-plugin skill
  with the new model.
- Patch bump: 2.15.15 -> 2.15.16.

* fix(engine): resolve plugin 404s and local engine routing (#fix/diagnose-plugins-404)

- fix: engineManifest + resolveEngineUrl: port 5001→5000 to match docker-compose
  binding; removed NEXT_PUBLIC_WWV_PLUGIN_DATA_ENGINE_URL from local engine
  detection — it was poisoning local routing with the production engine URL (Patch)
- fix: WsClient: added normalizePluginId() converting underscore IDs to kebab-case
  so engine WebSocket messages route to the correct frontend plugin (Patch)
- fix: docker-compose: added ./local-seeders:/app/seeders volume mount to
  wwv-data-engine so locally-developed seeders are visible to the engine (Patch)
- feat: sync-local-plugins: added wwvHostRedirectPlugin — Vite plugin that
  intercepts @/ host-app imports in local plugin builds and redirects them to
  runtime host globals, preventing full app tree from being bundled into plugins (Minor)
- docs: plugin-architecture.md: added Plugin Data Delivery Types section (REST-only,
  WS-only, hybrid), peerDependencies rule, .tsx extension rule, mapWebsocketPayload
  signature contract (Patch)
- docs: data-engine-architecture.md: added §7 WebSocket Payload Format Contract
  documenting WsClient's three payload handling cases and the silent-drop footgun
  for plugins that send object payloads without mapWebsocketPayload (Patch)
- docs: worldwideview-plugin-creation SKILL.md: fixed ISS example which was missing
  mapWebsocketPayload and would have silently dropped all WS data; clarified
  mapWebsocketPayload requirement for non-array payloads; fixed architecture
  decision tree (Patch)
- docs: cesium-rendering.md: added Sizing Conventions table with defaults/ranges
  for point/billboard/model, cross-plugin parity rules, and silent-ignore footgun
  warning for size on billboard entities (Patch)
- docs: added ADR-0002 documenting seeder exported name as canonical plugin ID (Patch)

Version bumps: fix × 3 (Patch), feat × 1 (Minor) → 2.15.16 → 2.16.0

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* test(engine): update resolveEngineUrl test assertion from port 5001 to 5000

Follows the port correction in engineManifest.ts and resolveEngineUrl.ts.
The test was asserting the old default (5001) instead of the corrected
local engine port (5000), causing the Unit Tests CI check to fail.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
2026-05-20 22:44:47 +12:00
Antigravity AI ded2d587e4 feat(auth): implement decentralized plugin auth and SSRF hardening
- Add PBKDF2 + AES-256-GCM encryption for credentials
- Update Prisma schema to include MarketplaceCredential
- Implement comprehensive SSRF utility with IP pinning
- Harden /api/camera/proxy and stream proxy with safeFetch
- Fix openid-client PKCE generator usage
- Update workspace configurations and ADRs
- Bump version to 2.10.0 (Minor)
2026-05-14 19:17:09 +12:00
szski 7a262c617c Merge pull request #79 from szski/feat/agent-bus
feat(agent): SSE-based AgentBus for external-tool UI control
2026-05-13 16:07:41 -04:00
SapphireandClaude Opus 4.7 a69b1d9aac docs(agent): how-to for wiring an MCP server to the agent bus
Adds docs/agent-bus.md covering enable-via-build-arg, a curl smoke test,
Node + Docker MCP client config snippets (Claude Code / Desktop / Cursor /
Cline), and per-user security notes. Links szski/wwv-mcp as the reference
MCP server with a note that it may relocate under the project org.

Cross-links the new doc from README Key Features, Repository Ecosystem,
and Documentation Index.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-05-13 16:01:02 -04:00
szski 54078f351c Merge pull request #105 from AlsoTheZv3n/docs/architecture-migration
docs: migrate architecture deep-dive from AGENTS.md to docs/ARCHITECTURE.md
2026-05-13 15:36:23 -04:00
szskiandSapphire e6c7dcf295 test: bedrock tests for the load-bearing data layer + camera registry (#110)
WorldWideView's Vitest setup is already wired and CI already runs
\`pnpm test\` on every PR. What's missing is tests for the systems
that actually break: the plugin lifecycle plumbing (data bus, cache,
polling) and the camera adapter aggregator that the UI hits on every
layer toggle.

This PR adds a focused first batch — 12 tests across 4 files — covering
the most common failure modes we've actually seen in practice. The
intent is to land the patterns alongside the tests so the next
contributor (human or agent) can copy the shape rather than improvise.

## What's tested

| File | Coverage | Tests |
| ---- | -------- | ----- |
| src/core/data/DataBus.test.ts | emit/subscribe round-trip, unsubscribe correctness, handler-failure isolation | 3 |
| src/core/data/CacheLayer.test.ts | memory-tier get/set, TTL expiry + eviction | 2 |
| src/core/data/PollingManager.test.ts | immediate-run on start(), interval scheduling, stop() cancels | 3 |
| src/app/api/camera/adapters/registry.test.ts | resolveSources for "all" / null / "none" / mixed-with-unknowns | 4 |

Each test answers one question: what regression does it catch that
we'd otherwise find by user bug report?

## Config change

vitest.config.ts now includes \`src/app/**/*.{test,spec}.*\` so API-route
tests under \`src/app/api\` are picked up by \`pnpm test\`. Previously only
\`src/lib\`, \`src/core\`, \`src/plugins\`, and \`packages\` were scanned —
api-route handlers had no test home.

## Docs

\`docs/testing.md\` gets four new sections:

- **Patterns** — plain-function, stateful-singleton, mock-with-vi.mock,
  fake-timers — with a callout for the \`runOnlyPendingTimersAsync\`
  double-counting gotcha we hit while writing PollingManager tests.
- **What NOT to Test (Yet)** — Cesium-heavy components, live DB
  round-trips, dynamic plugin imports.
- **Philosophy** — small focused suite > large expensive one, test
  pure logic, add a test when you fix a bug.

Original overview/test-types/run-commands sections are unchanged.

## Verification

Locally (Node 22 + pnpm 9.15.4):

\`\`\`
Test Files  17 passed (17)
Tests       127 passed (127)
\`\`\`

Existing 115 tests still pass; new 12 land cleanly.

## What's next (not in this PR)

The list of load-bearing systems still without coverage:

- PluginManager (the central plugin lifecycle orchestrator)
- The new plugin-backend supervisor + proxy (PR #100)
- The agent bus (PR #79)
- Plugin marketplace install/uninstall round-trip
- React component tests for LayerPanel and DataBusSubscriber

Worth a follow-up batch once the patterns from this PR are familiar.

Co-authored-by: Sapphire <sapphire@tiktokcoach>
2026-05-13 17:23:09 +12:00
Antigravity AI d2bdb0cee8 feat(cli): enhance publish command and update default create directory
- feat(cli): Add --org flag to publish to allow publishing under custom NPM scopes (Minor).
- feat(cli): Allow publish command to run from project root via path resolution (Minor).
- feat(cli): Change create default scaffolding to local-plugins/ instead of packages/ (Minor).
- feat(cli): Add --core flag to create to override default and scaffold into packages/ (Minor).
- docs: Update tutorial, CLI readmes, and agent architecture workflows with new commands (Fix).
2026-05-13 10:57:33 +12:00
Sven WeidenmannandClaude Opus 4.7 335b74a486 docs: migrate architecture deep-dive from AGENTS.md to docs/ARCHITECTURE.md (fixes #98)
`docs/ARCHITECTURE.md` was a 33-line stub, despite the README pitching
a "Deep dive into the Cesium rendering pipeline, event data bus, and
performance optimizations". The substantive content was duplicated /
buried in `AGENTS.md` §4.

Migrate it to a proper human-facing doc:

- `docs/ARCHITECTURE.md` (33 → 200 lines) now contains the full
  architecture deep-dive: system overview with mermaid diagram, plugin
  system & All-Bundle Model, Zustand state management (with slice
  table), data pipeline, data engine & seeders (agnostic-renderer
  contract), rendering pipeline (primitive collections, chunked
  processing, horizon culling, LOD, stack/spiderifier), edition
  system, key source files table, and cross-refs into `.agents/rules/`.
- `AGENTS.md` §4 collapses from ~80 lines of duplicated prose to a
  short stub that points contributors to `docs/ARCHITECTURE.md` and
  lists the key invariants agents must respect (plugin SDK as source
  of truth, agnostic frontend, nine slices, primitive rendering, three
  editions). Same hub-and-spoke pattern as the maintainer already
  applied to §3, §6, §7.
- README link description updated from "DataBus event stream and
  Zustand state management" to reflect the expanded scope.

No code changes; no version bump (consistent with prior `docs:` commits
in the history that did not touch root `package.json`).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-05-12 21:29:11 +02:00
Antigravity AI 21adb9f2e8 docs: add plugin development quickstart and advanced guides, and include CLI and SDK scaffolding artifacts 2026-05-13 02:42:24 +12:00
Antigravity AI fe2cfa9dac feat: implement publish command and complete WWV CLI reconstruction 2026-05-13 01:14:06 +12:00
Antigravity AI 7e25fdfba2 Merge branch 'fix/engine-seeders-coolify' into main 2026-05-12 19:11:39 +12:00
Antigravity AI ab80dad42b refactor(plugins): migrate legacy plugins to local-plugins architecture
- Migrated wwv-plugin-gps-jamming to local-plugins and fixed WebSocket payload handling (Patch)

- Migrated wwv-plugin-fortiguard to local-plugins and refactored API proxy fetch logic (Patch)

- Migrated wwv-plugin-nz-traffic-cameras to local-plugins (Patch)

- Cleaned up tutorial plugin wwv-plugin-iss from tree (Patch)

- Added scripts/migrate-plugin.mjs for automation (Patch)
2026-05-11 19:24:19 +12:00
Antigravity AI e1d2c38687 docs: mark phase 1 private repo steps as complete 2026-05-11 02:53:02 +12:00
Antigravity AI ca17552d3d feat(plugin): Add FortiGuard threat map plugin 2026-05-10 20:15:11 +12:00
Silvertakana e0ac5041c2 fix: install prisma globally in docker to prevent offline network failures (#53)
* fix(core): install prisma globally in docker to prevent offline network failures [Patch]

* fix(core): allow universal CORS access in marketplace [Patch]

- allow any origin in marketplace bridge to ensure universal connectivity [Patch]
- remove dead origin filter code [Patch]
- bump version to 1.20.5 [Patch]
2026-05-10 11:29:10 +12:00
Antigravity AI b6d14dd720 docs(readme): enhance README with standard badges and architecture overview
- docs: added CI, Codecov, NPM, and Discord badges
- docs: added mermaid project architecture diagram
- docs: added key features, structure tree, and prerequisites
- chore: relocated old plan documents to .agents/plans
2026-05-10 10:30:57 +12:00
Silvertakana c4207bd6e1 feat(core): migrate to Prisma 7 and unify PostgreSQL architecture (#56)
* feat(cloud): implement Postgres DB adapter, fix static build crashes, and containerize NextAuth/Stripe integrations

* test(marketplace): fix mocks and assertions for multi-tenant Postgres architecture

* feat: rsa jwt license key verification and state integration

* feat: add internal workspace validation route for Edge Functions

* refactor: clean up hub routes and finalize db proxy/adapter for multi-tenant cloud deploy

* feat(cloud): finalize multi-tenant Prisma extensions and workspace routing

* fix(db): correct Prisma 7 better-sqlite3 adapter initialization [Patch]

- update better-sqlite3 adapter instantiation to use configuration object ({ url }) required by Prisma 7 instead of raw Database instance [Patch]
- fix PrismaClientConstructorValidationError by generating client with adapter support [Patch]

* fix(auth): support dynamic origins for local proxies and multi-tenant subdomains [Patch]

- prioritize forwarded headers and request host over hardcoded envOrigin in getRequestOrigin to support subdomain routing [Patch]
- allow ALLOWED_DEV_ORIGIN in marketplace install redirect checks to fix local network development login flows [Patch]

* fix(marketplace): enable dynamic CORS reflection for marketplace API [Patch]

- remove explicit origin array, replacing with origin header reflection to allow marketplace hosted on any domain or local IP [Patch]

- remove global wildcard CORS headers from next.config.ts to harden security against broader app injection [Patch]

* feat(db): create initial postgresql migration

* refactor(db): update remaining files for postgresql

* feat(db): unify database adapter to PostgreSQL-only [Minor]

- replace SQLite adapter with PostgreSQL PrismaPg [Minor]
- remove better-sqlite3 dependencies [Patch]
- finalize docs and implementation plan [Patch]

* fix: resolve prisma client generation and script execution issues with tsx and type module

* feat(db): port tenant isolation logic to new PostgreSQL adapter

* docs: add rule for transparent and narrated agent actions

* BREAKING CHANGE(core): migrate to PostgreSQL and add auto-migration pipeline [Major]

- unified database adapter to exclusively use PostgreSQL [Major]
- implement auto-migration pipeline to pipe legacy SQLite data to Postgres [Major]
- add sqlite to runner stage to support extraction pipeline [Patch]

* feat(core): migrate to Prisma 7 and unify PostgreSQL architecture [Minor]

- removed legacy Prisma SQLite driver and all Better-Sqlite dependencies [Minor]
- updated schema to utilize purely postgresql providers [Patch]
- modified migration scripts to seamlessly convert local sqlite DBs to PostgreSQL containers using keinos/sqlite3 [Minor]
- updated deployment scripts, Coolify pipelines, and Nginx proxy support [Patch]
- injected Prisma Client Extensions for multi-tenant Row Level Security isolation [Minor]
- stabilized PrismaClient initialization utilizing the official adapter-pg runtime pattern [Patch]
- bumped version to 2.1.0

* fix(core): resolve TypeScript compilation errors for CI [Patch]

- fixed NextResponse.json() 3-arg calls to use 2-arg ResponseInit form [Patch]
- replaced invalid 'developer' TrustTier with 'unverified' in parseWwvManifest and load-unpacked route [Patch]
- removed non-existent pluginManager.hotReload() call in DevModeSubscriber, replaced with disable/reload cycle [Patch]
- updated Stripe API version from '2024-04-10' to '2026-04-22.dahlia' to match installed SDK [Patch]
- excluded local-scripts/ from tsconfig to prevent debug scripts from breaking CI [Patch]

* fix(ci): resolve pnpm version conflict in GitHub Actions [Patch]

- removed explicit version: 9 from pnpm/action-setup@v4 — v4 auto-reads packageManager from package.json [Patch]
- updated build job DATABASE_URL from SQLite to PostgreSQL format [Patch]

* fix(docker): add explicit Prisma generator output path for Docker builds [Patch]

- Prisma 7 changed default output location, causing COPY --from=builder to fail
- added output = '../src/generated/prisma' to generator block for consistency

* fix(prisma): update client import path and resolve CI type errors [Patch]

- updated PrismaClient import in db.ts to point to custom generated output path
- resolved implicit 'any' error in marketplace check-updates route
- verified clean local build with tsc --noEmit

* chore(deps): sync Prisma versions to 7.6.0 [Patch]
2026-05-09 22:44:30 +12:00
SilvertakanaandAntigravity AI a5125dba7b docs: Comprehensive Documentation Overhaul (#39)
* docs(core): comprehensive documentation overhaul

* fix: resolve worktree paths dynamically via git CLI

* refactor(ui): temporarily disable demo ad strip

* fix(ui): redirect header logo and cleanup marketplace routes [Patch]

- make header logo a clickable link to landing page [Patch]

- cleanup marketplace routes and remove builtinPlugins [Patch]

---------

Co-authored-by: Antigravity AI <[email protected]>
2026-04-28 23:39:20 +12:00
Antigravity AI 48a17bf3ee feat(sdk,docs): add vite static compiler export, overhaul documentation for plugin ecosystem [Minor]
- add wwvStaticCompiler to SDK vite/ subpath export [Minor]
- export createPluginContext and PluginContext type from SDK [Minor]
- update viteGlobals mapping for lucide-react [Patch]
- overhaul all docs/ for decoupled plugin development workflow [Minor]
- update README with new CLI-based plugin creation instructions [Minor]
- fix marketplace load route CORS and error handling [Patch]
- add test coverage for DeclarativePlugin edge cases [Patch]
- bump root to v1.18.0, SDK to v1.5.0
2026-04-23 10:19:17 +12:00
Antigravity AI d74ae694a4 feat(cli): implement wwv-cli developer toolkit and finalize plugin bundling architecture
- feat(cli): Update developer workflows and quickstarts to utilize new \@worldwideview/cli\ toolchain externally (Minor)
- refactor(plugins): Standardize remaining internal manifests and loader implementations strictly to dynamic bundled format (Patch)
- docs(core): Revise README and development specs with \
px create-wwv-plugin\ workflows (Patch)
2026-04-19 15:15:04 +12:00
Antigravity AI ac95a64115 feat(plugins): implement marketplace updates and fix SDK global injection [Minor]
- add /check-updates mechanism to check with marketplace [Minor]
- inject zustand into WWV_HOST to prevent plugin crashes [Patch]
- fix next.config.ts sentry schema [Patch]
2026-04-18 13:39:46 +12:00
Antigravity AI 1a984251b6 chore(core): update configurations and roadmap [Patch]
- set default edition back to local in .env [Patch]

- add AI & Sharing feature stage to ROADMAP [Patch]

- configure workspace limits in tsconfig and rootDir for osm-search [Patch]

- add superpowers documentation for expanding chips and plugin versioning [Patch]
2026-04-16 01:26:00 +12:00
SilvertakanaandAntigravity AI 67ca2abdbc feat: configure demo defaults via env vars (#26)
* feat(core): configure default demo plugins via env vars [Minor]

- parse NEXT_PUBLIC_DEMO_DEFAULT_PLUGINS in AppShell [Minor]

- inject defaultEnabled in layersSlice initLayer [Patch]

- document demo defaults in .env.example [Patch]

* fix(core): enable plugin polling on boot and fix gps ID string [Patch]

---------

Co-authored-by: Antigravity AI <[email protected]>
2026-04-16 01:20:05 +12:00
Antigravity AI c115058008 feat: add AdUnit component, undersea cable API route, GitHub issue templates, and update documentation 2026-04-09 16:07:30 +12:00
Antigravity AI a5610f0c8d feat(core): plugin stability fixes, UI enhancements, and ad integration 2026-04-05 21:03:06 +12:00
Antigravity AI 94a0ca4731 feat(demo): implement structural AdSense sidebar for demo environments 2026-04-05 13:50:18 +12:00
silvertakana 20363d509b feat(plugins): disable mock data plugins for live demo, bump to 1.2.0 2026-04-03 20:48:02 +13:00
silvertakana 7c59ba4dc3 fix(deploy): resolve docker context bloat and fix data engine ESM imports 2026-04-02 20:25:44 +13:00
silvertakana 932713e7a2 docs: sync public docs to current implementation
- SETUP.md: npm  pnpm, remove internal .agents/ from folder tree, replace webpack HMR note with DB tip
- ARCHITECTURE.md: fix 'Abstration' typo
- creating-a-plugin.md: replace 'edit knownPlugins.ts' step (internal) with correct npm submission flow, npm  pnpm commands, update flow diagram to match actual marketplace arch
2026-03-30 14:17:15 +13:00
silvertakana 23d1538ea2 fix(globe): enable depth testing for airplanes to prevent rendering through globe 2026-03-28 18:27:52 +13:00
silvertakana b79f0f025d docs: update all setup instructions to use npm run setup 2026-03-26 17:45:42 +13:00
silvertakana efa886ad3e feat: signal pending state for unverified plugin installs
install-redirect returns ?pending=pluginId for unverified plugins
instead of ?installed, so the marketplace can show correct status.
2026-03-18 18:26:24 +13:00
silvertakana 35050d150e docs: add .env.example template and update setup guide 2026-03-07 09:41:03 +13:00
silvertakana 0d037d0266 docs: comprehensive project documentation and architectural overview 2026-03-06 13:46:57 +13:00
silvertakana f672efd1d2 feat: integrate CesiumJS for 3D globe visualization, adding core components, assets, and documentation. 2026-03-06 13:33:24 +13:00
silvertakana 2cd503db22 feat: generalize plugin system remove aviation special treatment, add SelectionBehavior/ServerPluginConfig hooks, plugin docs 2026-03-05 14:51:55 +13:00