# .meshkore/public/cluster.yaml
# This file is COMMITTED. It declares the public identity of this cluster:
# name, type, transport URLs, bootstrap info. No secrets, no agent credentials.
#
# Anything sensitive (members, credentials, internal docs, roadmap) lives in
# .meshkore/{credentials,agents,docs,roadmap}/ which are gitignored.

version: 1
id: meshkore-main
type: mixed                          # mixed: produces code AND is the hub itself
name: "MeshKore Core"
description: "Core monorepo of MeshKore — relay, oracle, webapp, scrapers, daemon"

# Public bootstrap info — agents that clone this repo use these URLs.
transport:
  protocol: websocket
  endpoint: wss://hub.meshkore.com/ws
  fallback: https://hub.meshkore.com

bootstrap:
  hub: https://hub.meshkore.com
  docs: https://hub.meshkore.com/platform/docs/agent
  install: https://meshkore.com/cluster/install
  operate: https://meshkore.com/cluster/operate          # operator manual (read once)
  editor_rules: https://meshkore.com/reference/cluster/editor-rules/
  spec: https://meshkore.com/standard/spec
  invite: https://hub.meshkore.com/agents/invites/6dcb40441393bae68a578f1cc77e49c7/join

# Public capabilities of this cluster.
profile:
  capabilities: [coding, debugging, scraping, deployment]
  visible_in_directory: false        # internal cluster; not advertised in oracle

# Admission policy — see docs/architecture/admission.md.
# Currently default to manual approval; ready for the admission initiative
# (initiative `admission/`, A2-A10) to wire up the runtime enforcement.
admission:
  mode: pubkey
  approval: manual
  github_users: []
  admission_token_lifetime: 3600
  max_pending_requests: 50

# Authorized cluster members. Empty for now — this initiative bootstraps
# from RJJ's GitHub identity in phase A10 (rollout).
members: []

# Modules — the first-class organizational units of this project. Tasks
# under .meshkore/modules/<id>/tasks/ MUST carry `category: <id>` matching
# one of these. Without a declared modules: block, the build script falls
# back to auto-discovering top-level folders (noisy). Always declare here.
#
# kind:
#   code  — backed by a code folder (path required)
#   spec  — schemas, conventions, the cluster spec itself
#   docs  — pure documentation/diagrams/assets
#   area  — cross-cutting initiative without a single folder
#
# Hierarchy:
#   Modules are flat by default. To nest, declare `parent: <other-id>`.
#   The `project` module is a special bucket for cross-cutting / meta
#   work (testing, audit, future, general — items that don't belong to
#   any single code module). Real code modules (api, webapp, portal,
#   daemon, …) sit at the SAME level as `project`, not under it.
modules:
  - id: project
    name: "Project"
    kind: area
    description: "Meta bucket — cross-cutting work that doesn't belong to a single code module. Children: testing, audit, future, general. Sits as a peer of api/webapp/portal/daemon, not above them."
  - id: portal
    name: "Portal v2"
    kind: code
    path: webapp/reference/cluster/portal/
    description: "Cluster Architect — chat-driven, repo-as-database UI"
  - id: webapp
    name: "Webapp"
    kind: code
    path: webapp/
    description: "Static site on Cloudflare Pages (meshkore.com)"
  - id: api
    name: "Hub API"
    kind: code
    path: api/
    description: "Rust relay (Axum), Fly.io meshkore-relay"
  - id: daemon
    name: "Daemon CLI"
    kind: code
    path: daemon/
    description: "meshcore daemon — local agent runtime, npm package"
  - id: worker
    name: "Worker"
    kind: code
    path: worker/
    description: "Python scraper — daily directory refresh"
  - id: relay
    name: "Relay + Directory"
    kind: code
    path: api/
    description: "Relay-side directory binding, registration, federation"
  - id: sdk
    name: "SDKs"
    kind: code
    path: sdks/
    description: "Per-language client libraries"
  - id: infra
    name: "Infra"
    kind: area
    description: "Fly.io, Cloudflare, DNS, deploy pipelines, monorepo glue"
  - id: cluster
    name: "Cluster spec"
    kind: spec
    description: "The .meshkore/ format, daemon API, install/operate flows"
  - id: meshkore-spec
    name: "MeshKore spec"
    kind: spec
    description: "Public protocol spec (A2A/MCP/ACP compatibility, payloads)"
  - id: admission
    name: "Admission"
    kind: area
    description: "SSH/GitHub-based cluster admission flow (A1-A10)"
  - id: discovery
    name: "Discovery"
    kind: area
    description: "Oracle, semantic search, NL routing"
  - id: marketplace
    name: "Marketplace"
    kind: area
    description: "Service catalog, pricing, spot market"
  - id: payments
    name: "Payments"
    kind: area
    description: "x402, Solana/USDC, escrow, treasury"
  - id: partners
    name: "Partners"
    kind: area
    description: "Demo agents (P001-P003) and partner integrations"
  - id: ecosystem
    name: "Ecosystem"
    kind: area
    description: "Vertical demos (commerce, b2b, logistics)"
  - id: integrations
    name: "Integrations"
    kind: area
    description: "Third-party connectors (Shopify, MCP servers, etc.)"
  - id: launch
    name: "Launch"
    kind: area
    description: "Demo videos, inviting first users, announce playbook"
  - id: seo
    name: "SEO"
    kind: area
    description: "Indexation recovery, sitemap, agent fiche pages"
  - id: security
    name: "Security"
    kind: area
    description: "Threat model, audits, rate limits"
  - id: testing
    name: "Testing"
    kind: area
    parent: project
    description: "Test infra — backend smoke + unit, frontend regressions, CI gates that protect against silent breakage when many agents work in parallel."
  - id: audit
    name: "Audit"
    kind: area
    parent: project
    description: "Behavior-preserving refactors — Rust hardening, frontend modularization, dead-code sweeps, doc alignment. Hard rule: nothing breaks; every change is covered by tests."
  - id: future
    name: "Future"
    kind: area
    parent: project
    description: "Forward-looking ideas, not actively planned. Survives indefinitely."
  - id: general
    name: "General"
    kind: area
    parent: project
    description: "Catch-all for project-wide work that doesn't belong to a single module yet. Use this — never leave a task without a category."

# Private members + permissions live in:
#   .meshkore/agents/<id>.yaml            (per-agent definitions, gitignored)
#   .meshkore/credentials/<file>          (per-agent secrets, gitignored)
