Files
chatballs/apps/backend/hub_platform/platform/tests
Andrey 0d124fbb7c 🔧 feat(platform): add plan publish and platform token management commands
Closes the C06 production prerequisites by providing explicit, runnable
instruments whose execution stays with the owner.

- publish_plan_versions: publishes the current draft PlanVersion for the
  saleable plans (Free, Startup). Idempotent; Business/Corporation stay
  draft. Once published, a version and its grants are immutable at model
  and PostgreSQL trigger level.
- create_platform_token: creates a PlatformOperator and an opaque API
  token. The plaintext token is printed ONCE; only its sha256 hash is
  stored. Rejects unknown capability codes. Credential operation - run
  only by the owner, transfer the plaintext to a secret store immediately.

Running these commands in production is not part of this commit and
requires explicit owner confirmation.
2026-07-15 17:14:30 +03:00
..