Web application (Next.js)
This page documents supported operator-facing configuration. It deliberately excludes shell-local implementation variables inside deployment scripts (for example computed URLs, temporary file paths, and image tags) and platform-injected variables such asPORT, K_SERVICE, and K_REVISION. The executable validators in src/lib/config.ts and agent/harmonia_agent/config.py remain authoritative; .env.example is the local template, while infra/setup.sh and infra/deploy.sh fail closed on cloud-only inputs.
Worker (FastAPI)
The pricing catalog uses decimal arithmetic and labels estimates with its version. A configured model without a catalog entry is not budget-authorized. Image calls reserve the configured maximum instead of being represented as free.
Gemini roles use token estimates. Veo 3.1 Fast records one generation at
$0.08; Lyria 3 Clip records one generation at $0.04, using the same immutable pricing version. The dashboard compares these labeled units without manufacturing a fake common unit.
Telemetry contains identifiers, stage and role names, model names, usage units, costs, validation outcomes, and errors. It excludes prompts, responses, transcripts, draft text, and media bytes. These are execution/delegation traces, not private model reasoning.
Cloud telemetry additionally requires Application Default Credentials and worker permissions for Logging, Monitoring, and Trace writes. Harmonia sets both ADK content-capture controls to their safe values at process configuration; do not override them in a deployed revision. The dashboard’s safe activity projection is written independently through the authenticated internal API and retained under workspaces/{workspaceId}/brands/{brandId}/agent_activity.
Dev-only flags
Both flags are dev-only conveniences; production deployments run with them unset, and every mock path logs
[MOCK-AI] / [MOCK-X] so it can never pass as a real call.
Model evaluation and promotion
The publicagent/evals/contracts.evalset.json contains source-neutral ADK contract fixtures. Keep
authorized videos, transcripts, prompts, credentials, and result files in the private parent
workspace. A live run is explicit and refuses mock mode:
evalArtifact,
evalArtifactSha256, usageExport, and usageExportSha256. The eval artifact identifies its run,
role, candidate model, case outcomes/latencies, usage-record IDs, and policy/pricing versions; the
usage export contains exactly those immutable usage records. Then generate the report:
harmonia_agent.model_governance to append four hash-chained records: a candidate derived with
candidate_from_comparison, an independent human review, a promotion, and—when needed—an exact
rollback to the candidate’s recorded previous model. A proposer cannot approve their own candidate;
an unreviewed, rejected, stale, or already-promoted candidate cannot activate. The append operation
uses an exclusive lock plus fsync, and every read verifies sequence and the full digest chain.
The ledger must live under the private evidence root, be access-controlled with the originating ADK
and usage exports, and be captured with the deployment revision. Promotion records do not mutate
source code, prompts, or deployed configuration by themselves: an administrator applies the reviewed
model ID through the documented role environment variable and records that deployment separately.
Rollback likewise restores the exact recorded previous model and requires a non-empty incident reason.
This is governed adaptation, not autonomous self-modifying code.
The manifest is a private operator evidence ledger, not a cryptographic signature service. Its
digests detect mutation relative to the recorded ledger; they do not make a newly fabricated
artifact truthful. Keep the manifest write path access-controlled, retain the originating ADK run
and Firestore export, and require human review before changing a catalog default.
Authenticated evidence capture
Use the authenticated evidence runbook for the three-phase production protocol. Evidence capture refuses mock AI, mock effects, emulators, unsafe file paths, missing human approval, and inconsistent verification. Raw captures remain outside the public repository; the public CLI verifies only a redacted bundle:Secrets policy
Deployment-wide application credentials and workspace OAuth records stay server-side and never enter Git or browser responses. Scope every integration to minimum permissions. Telegram configuration is stored per workspace and is returned only to the trusted worker. Google Calendar does not accept manually pasted tokens. Register/api/oauth/google-calendar/callback for each deployed origin and use the normal OAuth connection flow. See How to sync content with Google Calendar.