Repository navigation
Releases
OpenTea DX-OS v1.16.0
The agentic layer starts to plan and learn. Every morning an agent turns the open proposals into one daily campaign that a manager approves with one button. Every Monday another agent looks at how the agents did and proposes improvements, which are measured again weeks later. Outside AI clients can now connect through MCP with a person's own account, the public lot page shows when an AI decision is verified in the audit chain, and a public benchmark compares models on the agents' scenarios.
Added
- Agentic layer milestone M7: daily campaign (
platform/agent,apps/web):- 06:00 campaign. At 06:00 agent A9 groups the cooperative's open proposals into one campaign of at most 15 actions, each with a measurable goal.
- Fixed rules order the items and drop conflicts: no harvest on a parcel still in its withdrawal period, no spraying before rain, and no more work than the people available.
- The model only writes the summary.
- Deciding. Managers receive the campaign on Telegram (
Duyệt cả chiến dịch,Xem từng mục,Bỏ chiến dịch, and/chiendich) and in a new "Chiến dịch hôm nay" panel above the AI inbox.- Approving the whole campaign runs every item the approver may decide.
- High-risk items still wait for their own confirmation, and items for another role are forwarded.
- 18:00 report. The report shows target against actual for each goal.
- Schedule. The harvest and disease agents now run at 05:30 and 05:40, so their warnings are ready before 06:00.
- 06:00 campaign. At 06:00 agent A9 groups the cooperative's open proposals into one campaign of at most 15 actions, each with a measurable goal.
- Agentic layer milestone M8: weekly improvements and the AI tab (
platform/agent,apps/web,miniapps/htx-dashboard, Hasura):- Weekly rules. Every Monday agent A10 looks for:
- a warning that managers keep rejecting;
- journal entries returned for missing information;
- slow decisions;
- campaign goals that keep slipping.
- Proposals. It proposes at most five improvements as ordinary proposals:
agent.settings.updatechanges a threshold within fixed ranges, marking whether it tightens or loosens;improvement.adoptcovers a process note or a Monday reminder.
- Measurement. Adopted improvements are measured again after two and four weeks, and the Monday report says whether they helped.
- AI tab.
htx-dashboard0.3.0 adds an AI tab with each agent's approval rate, waiting time, failures and cost, read with the manager's own rights.
- Weekly rules. Every Monday agent A10 looks for:
- Agentic layer milestone M14: MCP, lot verification and the public benchmark (
apps/web,platform/mcp,platform/agent, Keycloak, gateway):- MCP. A person can connect any MCP client with their own Keycloak account, through the device-login bridge
platform/mcp/dxos_mcp.pyand the new clientdxos-mcp.- The client gets the assistant's read tools and one write tool, which creates a proposal that a person still has to approve.
- Lot verification. The public lot page shows "AI đề xuất, <vai trò> đã duyệt ngày …, kiểm chứng trong sổ audit" only when the decision is in an intact audit chain with a matching evidence hash. It never shows a name.
- Benchmark.
make benchmarkruns every agent scenario suite with a chosen model, and the results are published indocs/benchmark.md.
- MCP. A person can connect any MCP client with their own Keycloak account, through the device-login bridge
Fixed
- Proposal deletes in a campaign (
platform/postgres). Deleting a proposal also removes it from campaign items, so cleanup and retention jobs no longer fail on proposals that a campaign listed.
Container images
ghcr.io/maiychrus25/opentea-dx-os-web:1.16.0ghcr.io/maiychrus25/opentea-dx-os-api:1.16.0ghcr.io/maiychrus25/opentea-dx-os-postgres:1.16.0ghcr.io/maiychrus25/opentea-dx-os-scanner:1.16.0ghcr.io/maiychrus25/opentea-dx-os-migrate:1.16.0ghcr.io/maiychrus25/opentea-dx-os-dataops:1.16.0ghcr.io/maiychrus25/opentea-dx-os-agent:1.16.0ghcr.io/maiychrus25/opentea-dx-os-telegram:1.16.0
Deploy
Download opentea-dx-os-1.16.0.tar.gz, verify it with SHA256SUMS, then follow the
release deployment guide (6-step order: postgres, platform-init, migrate, platform-init again, rest, then --profile tools run --rm ollama-init to pull the pinned LLM model).
Set DXOS_MQTT_DEVICES and DXOS_MQTT_INGEST_PASSWORD in docker/.env.local first: the broker refuses to start while any MQTT password begins with change_me.
Optional: set ANTHROPIC_API_KEY or OPENAI_API_KEY in docker/.env.local to let an agent use an external provider (ADR 0004). Empty keys keep every agent on Ollama, and only dxos-agent receives them.
Also set MINIO_ACCESS_KEY, MINIO_SECRET_KEY (SeaweedFS refuses placeholders), KEYCLOAK_ADMIN, KEYCLOAK_ADMIN_PASSWORD and DXOS_INTERNAL_GATEWAY_SECRET (a long random value: the web and the gateway refuse to start while it is empty or the public dev default), DXOS_TELEGRAM_CALLBACK_KEY (a long random value: the web refuses to start while it is empty or the dev default), and run every command as docker compose --env-file docker/.env.local -f docker/docker-compose.yml -f docker/docker-compose.release.yml ..., otherwise Compose ignores those values.
OpenTea DX-OS v1.15.0
The agentic layer goes to work in the field and in the chat. Four new agents watch sensors and weather, disease reports, harvest readiness and the market, and propose warnings, inspections, harvest approvals and a bulletin that a person approves. The Telegram bot becomes an assistant: farmers, officers and managers ask questions, share a location, and record a journal entry with a photo from the chat, with a confirmation card before anything is written.
Added
-
Agentic layer milestone M4: field, disease, harvest and bulletin agents (
platform/agent,apps/web, Hasura): four agents per cooperative propose, and a person approves on the web or in Telegram.field-watch(every 30 minutes) warns officers about a sensor silent for 6 hours and households about dry soil, heat, frost and heavy rain forecast after a recent spraying.disease-watch(daily and on new reports) asks officers to inspect when 3 reports of one disease fall within 2 km in 7 days, and warns the households around them.harvest-ready(each morning) proposes approving the harvest of parcels past their withdrawal period and due for picking.bulletin(each morning) writes a market bulletin for the cooperative with the provider chosen in the settings. Messages to households use fixed templates with typed slots: an agent cannot add text of its own, and only the approver can add a note (spec test 32). A warning that was approved or rejected is not proposed again within 24 hours. Bulletins gain a status and a cooperative, and readers show only published ones. Thresholds are per-cooperative settings, with defaults indocs/rules-and-limits.md§3.10. -
Agentic layer milestone M5: Telegram chat assistant (
apps/web,platform/agent,platform/telegram): a linked farmer, officer or manager now uses the bot as an assistant in a private chat. A button menu by role and typed commands (/menu,/nhatky,/cho,/tomtat,/hoi,/huy) open 11 read tools (today, pending approvals, weather, market, bulletin, notifications, journal, harvest schedule, parcels, lots, and the nearest parcel from a shared location); answers come from the web's own use cases with the asker's scope, so a farmer sees only their household, and each answer names its source. Writes go through a confirmation card that expires after 10 minutes: a farmer records a journal entry with a photo using only Telegram, an officer or manager approves the pending journal backlog, and a harvest approval takes two cards. Nothing is written without Confirm. Free sentences the web's keyword router cannot place go to the new agent A7, which picks a tool or action with the cooperative's provider; the model sees only the sentence and the list of tools, never business data. The relay forwards photos and locations, each user may send 60 messages an hour, and every web route is classified for Telegram in one table checked by a test (spec test 17). Sending a disease photo from chat, the read-aloud button and the remaining chat operations follow in #80.
Fixed
- Random sign-outs right after sign-in (
apps/web, #75): the session no longer keeps the Keycloak id token, so it fits in one cookie (3593 characters for the CI user, under the 3936 Auth.js chunk size). With two cookies, responses arriving a few milliseconds apart could leave the browser with mismatched halves and the next requests sent the user to the login page. Sign-out ends the Keycloak session with a back-channel logout using the refresh token. Sessions made before this change drop the id token on their next request.
Container images
ghcr.io/maiychrus25/opentea-dx-os-web:1.15.0ghcr.io/maiychrus25/opentea-dx-os-api:1.15.0ghcr.io/maiychrus25/opentea-dx-os-postgres:1.15.0ghcr.io/maiychrus25/opentea-dx-os-scanner:1.15.0ghcr.io/maiychrus25/opentea-dx-os-migrate:1.15.0ghcr.io/maiychrus25/opentea-dx-os-dataops:1.15.0ghcr.io/maiychrus25/opentea-dx-os-agent:1.15.0ghcr.io/maiychrus25/opentea-dx-os-telegram:1.15.0
Deploy
Download opentea-dx-os-1.15.0.tar.gz, verify it with SHA256SUMS, then follow the
release deployment guide (6-step order: postgres, platform-init, migrate, platform-init again, rest, then --profile tools run --rm ollama-init to pull the pinned LLM model).
Set DXOS_MQTT_DEVICES and DXOS_MQTT_INGEST_PASSWORD in docker/.env.local first: the broker refuses to start while any MQTT password begins with change_me.
Optional: set ANTHROPIC_API_KEY or OPENAI_API_KEY in docker/.env.local to let an agent use an external provider (ADR 0004). Empty keys keep every agent on Ollama, and only dxos-agent receives them.
Also set MINIO_ACCESS_KEY, MINIO_SECRET_KEY (SeaweedFS refuses placeholders), KEYCLOAK_ADMIN, KEYCLOAK_ADMIN_PASSWORD and DXOS_INTERNAL_GATEWAY_SECRET (a long random value: the web and the gateway refuse to start while it is empty or the public dev default), DXOS_TELEGRAM_CALLBACK_KEY (a long random value: the web refuses to start while it is empty or the dev default), and run every command as docker compose --env-file docker/.env.local -f docker/docker-compose.yml -f docker/docker-compose.release.yml ..., otherwise Compose ignores those values.
OpenTea DX-OS v1.14.0
The agentic layer arrives. One AI agent per cooperative reviews pending journal entries and proposes; a manager or officer approves on the web or from Telegram, and every step is in the audit chain. A cooperative can switch an agent to Claude or OpenAI within a monthly budget, with personal data masked first. Staff work gains automation and AI-ranked suggestions, and a sensor station simulator joins the repository.
Added
- Agentic layer milestone M3: external LLM providers (
platform/agent,apps/web,docker): a manager can switch each agent of the cooperative (A1 journal review, A6 digest) from the local Ollama to Claude (Anthropic) or OpenAI on a new settings page (/manager/ai/settings, read only for officers), with a confirmation that lists what leaves the server; only providers whose key the agent container holds are offered, and every change is audited. The agent calls both APIs over plain HTTP from the standard library, masks phone numbers, e-mails and identity numbers before any external call, and falls back to Ollama, then to the rules, on any failure (cut network, 5xx, timeout, refusal, malformed output; a 429 pauses the provider for at least 60 s). Runs report provider, model, tokens and estimated cost; a run that called an external provider writes oneagent.external_callaudit event without content. A monthly budget per cooperative warns the managers at 80% and stops external calls at 100% until the Vietnam month ends (Telegram message once per threshold and month, banner in the inbox). A6 sends the daily report at the cooperative's report time. The keys (ANTHROPIC_API_KEY,OPENAI_API_KEY, optionalDXOS_ANTHROPIC_MODEL,DXOS_OPENAI_MODEL) reach onlydxos-agent; a test-only LLM stub (profilellm-test) andplatform/tests/smoke-llm.shcover the path in CI. - Agentic layer milestone M2: Telegram (
platform/telegram,apps/web,platform/agent,workflows):dxos-telegramrelays Telegram updates to the web and sends what the web queues (long polling, no public address needed; idle when no bot token is set). People link their account from their profile page with a one-time code (/start <code>,/stop); a manager can link the cooperative's group for reports. Proposals reach linked approvers with Approve and Reject buttons signed by the web (callback_dataHMAC, private chats only, roles re-checked with Keycloak at the moment of the tap); a rejection asks for a reason; every message of a proposal is edited to show who decided. The agent posts daily (18:00) and weekly (Monday 07:00) figures that the web renders and sends; health alerts cover stale agent or relay heartbeats, repeated agent failures and n8n failures, recorded by the newworkflows/system-error-alert.json(set aserrorWorkflowof every workflow). New:./dxos telegram enable|disable, realm roletelegram, tables inplatform/postgres/init/09-telegram.sql, a stub Bot API andplatform/tests/smoke-telegram.sh. SetTELEGRAM_BOT_TOKEN,TELEGRAM_BOT_USERNAMEand, for a release,DXOS_TELEGRAM_CALLBACK_KEYindocker/.env.local. - Tea IoT Station (
apps/tea-iot): a WPF sensor station simulator for tea hills that publishes soil moisture, soil and air temperature, air humidity and rainfall to the core broker (htx/<HTX>/plot/<parcel>/<sensor>, QoS 1, store and forward while offline), with drought, heavy rain, frost and faulty-sensor scenarios. Field alerts (dry soil, frost, heat) become task suggestions in Tea Staff Manager.apps/tea-iot/docker/mqtt-port.override.ymlpublishes the broker on 127.0.0.1 for local development. - Tea Staff Manager 1.3.0: Automation page (recurring work, cover for rejected work and approved leave, forgotten check-outs, overdue warnings, draft payroll), an explainable ranking of who fits a task shown with its facts,
POST /api/iot/alerts, and Tea Work sign-in with the shared Keycloak account. Tea Work 1.2.0 documents the shared account on its sign-in screen. - Agentic layer milestone M1c (
platform/agent, APISIX,docker/docker-compose.yml): implemented stdlib-onlydxos-agentruntime modules: cross-language canonical JSON + SHA-256evidence.py, schema-validated LLM provider abstraction with 1-retry JSON repair (ReplayProviderandOllamaProviderwith>= 60sHTTP 429 backoff over dedicated APISIX route/api/internal/agent/llm/v1/chat/completions), Keycloak/Hasura/internal-API client, Agent A1journal-reviewwith deterministic farming hard rules (WITHDRAWAL_PERIOD,MISSING_INFO,DOSAGE,INCONSISTENT), prompt-injection resistance, rule-based fallback on LLM outage, andplatform/agent/tests/scenarios/a1_journal_review.jsonscenario tests. - Agentic layer milestone M1b (
dxos, Keycloak, Hasura, APISIX,apps/web): added realm roleagentand./dxos agent enable|disable <HTX>to provision/revoke per-cooperative Keycloak client-credentials clients (dxos-agent-<htx>with mode-600 runtime env files), read-only zero-PII Hasuraagentpermissions across cooperative tables, internal-only APISIX:9081route/api/internal/agent/*injectingX-Dxos-Gatewayafter claim validation, RS256 JWKS verification + internal run/proposal ingestion routes inapps/web, Jest unit/route tests, andplatform/tests/smoke-agent.shboundary smoke checks. - Agentic layer milestone M1a (
apps/web,platform/postgres/init/08-agent.sql): addedplatform.agent_runs,platform.agent_proposals(withagent_proposals_one_openpartial unique index), andplatform.agent_settingswith row-level audit triggers; typed action catalogue (journal.approve,journal.reject), canonical evidence hashing, proposal creation and single-execution claim/decision use cases with audit trail, HTTP routes (/api/agent/proposals,/api/agent/proposals/[id]/decision,/api/journal/[id]/review),journal_entries.review_notemigration, and theProposalInboxUI at/manager/aiand/officer/ai. - Agentic layer milestone M0 skeletons (
platform/agent,platform/telegram): stdlib-only heartbeat skeleton containers (dxos-agent,dxos-telegram) added todocker/docker-compose.yml,docker/docker-compose.release.yml,Makefile(make up-agent,stop-extras,platform-up), CI unit test jobs, and release/edge image matrices. They start and report health without running agents or connecting to Telegram yet. - Architecture Decision Records: ADR 0003 (agentic layer with human approval and trust-zone separation) and ADR 0004 (optional external LLM providers with local-first fallback).
- Mini-app
hub-mobile(miniapps/hub-mobile): a card in the app store and an open page (/public/<htxCode>) with the download link of the Android APK and the steps to add the web build to an iPhone home screen. Links come fromHUB_APK_URLandHUB_WEB_URL; the app stores and reads nothing. The 67 MB APK itself is not in the repository.
Changed
- Web package version
1.14.0. - Agent credentials (
./dxos agent enable|disable,docker/docker-compose.yml): the per-cooperative credentials now live in thedxos-agent-envvolume, written by a short-lived root helper that receives them on stdin and stores them as uid 10001, so the agent can read them on Linux. Upgrade note: run./dxos agent enable <HTX>once for every cooperative that had the agent enabled; the old files underdocker/runtime/<project>/agent/are no longer read.enablenow refuses a cooperative that does not exist. - Agent evidence version 2 (
apps/web,platform/agent): proposals carry every column the rules read (journal entry, its activities and the crop cycles compared), hashed with one canonical JSON shared by TypeScript and Python (platform/agent/tests/fixtures/evidence-vectors.json). Open proposals made with version 1 answer stale on decision. - Agent schedule (
platform/agent): journal review runs on the first cycle, when the pending entries change, or hourly between 06:00 and 20:00 Vietnam time; an empty queue no longer writes a run row. Out-of-range dosage and a missing withdrawal period now ask for a correction (REQUEST_CHANGES) instead of a rejection. Thresholds are documented indocs/rules-and-limits.md§3.8. - Proposal dedupe (
apps/web,08-agent.sql): duplicates are judged by the journal entries a proposal acts on (subject_ids), not by the key the agent sends. - Release override: the web and APISIX refuse to start when
DXOS_INTERNAL_GATEWAY_SECRETis missing or still the public development value. docs/rules-and-limits.md: amended §1.1 (AI Principle Invariant) and §1.2 (MNM Invariant) per milestone M0 to permit typed catalogue action proposals (with human approval in normal mode, or manager-enabled bounded autonomous mode) and optional per-cooperative external LLM providers while keeping local Ollama as the zero-key default.
Fixed
- Telegram messages for proposals, reports and alerts (
PrismaTelegramRepository): the link and outbox column lists were plain strings inside$queryRawtemplates, so Prisma sent them as a bound value; recipients came back without a chat id and queuing a message failed. They are SQL fragments now, checked by a unit test and against a real Postgres. - Mosquitto restart loop: on kernels with
fs.protected_regular(including WSL 2) a restarted broker container failed with "can't create /tmp/mosquitto.passwd: Permission denied"; the entrypoint now removes the old password file first. - The PostgreSQL scripts of the staff app (
apps/staff-desktop/database/postgres) were hidden by the root*.sqlignore rule. - Withdrawal checks fail closed (
approve-harvest,CreateLotUseCase, lot trace, farmer dashboard): spraying recorded in a rejected, returned or pending journal entry still blocks harvest approval, lot creation and QR export; only drafts are ignored. Without this, rejecting a journal thr...
OpenTea DX-OS v1.13.0
A cooperative manager gets a chart dashboard over the core's data and sensor readings, and three client apps join the repository: the multi-role Flutter app hub-mobile and the staff management pair staff-desktop and staff-mobile.
Added
-
App
hub-mobile(apps/hub-mobile): one Flutter (Dart) app for Android, iOS and the web demo with roles chosen from the token claims after sign-in: guest, customer, farmer, HTX manager (officer read-only) and tour guide (guide, a staff account of an HTX). Tours belong to the HTX: the manager creates and edits tours (with a briefing for the guides), adds or removes guides, reads the member list of each tour and checks groups in; a guide sees only the tours an HTX assigned, with the HTX that assigned it, the schedule (Lộ trình), the itinerary, the groups with phone numbers and a check-in; a customer's ticket shows the guides of the tour. Guest browses news, tours and products; customer books tours, buys products, pays by VietQR, and keeps orders and tickets on the device (open offline). Leaf diagnosis sends a photo (gallery or live camera) to the web classifier with the app token. AI assistant pages per role (market, technical, shop, tour topics) with a local keyword answerer for guests and the webPOST /api/chatbotstream for signed-in users. Reels: short videos with a For-you and Following feed, hearts, comments, share and follow, posted from the phone gallery (own videos on a page opened from the + button of Reels). Runs on a mockHubRepositoryand a demoAuthServiceor, with an issuer configured, on Keycloak OIDC PKCE (clientdxos-mobile) and the web API throughHttpHubRepository; storefront, tours and Reels still use sample data. No Google Play services, Firebase, Maps or analytics. Build:apps/hub-mobile/tool/build.sh. Not yet built as a release APK or run on iOS, and the VietQR code has not been scanned by a real banking app. Seeapps/hub-mobile/README.md. -
Staff management clients (
apps/staff-desktop,apps/staff-mobile): Tea Staff Manager, a C# .NET 10 WPF app (MVVM) where the HTX owner manages employee records, teams, task assignment, a monthly timesheet, leave approval and payroll (prorated monthly salary or daily wage, overtime, allowance, bonus, compulsory insurance, advances; Draft, Approved, Paid), and Tea Work, a Kotlin Jetpack Compose app (MVVM) where staff accept and report tasks, check in and out, request leave and read payslips. The desktop app serves the phones over a small REST API (docs/mobile-api.md), stores data in SQLite or in the core schemaapp_staff_work(every table hashtx_code), and signs in with a local owner account or the shared Keycloak account (realmagrimarket, rolemanager). Both followDESIGN.md. Tests: xUnit for payroll and the task state machine, a Robolectric walkthrough of every mobile screen and an API contract test between the two apps. -
Staff apps 1.1 (
apps/staff-desktop,apps/staff-mobile): leave requests carry evidence (photo or PDF, checked by content, required for sick leave of two days or more); a Reports page with KPI tiles and charts and a Kanban board for tasks; toasts, sound and red counters on the desktop when staff act on their phones; phone connection self-test, one-click firewall rule and a DX-OS core connection check in Settings; quiet 30-second refresh and an offline-demo banner on the phone. -
Keycloak client
dxos-mobile: a public PKCE client (S256; no password grant, no service account) for mobile apps, with the same scopes and roles asnextjs-weband the redirect URIs of the Android tour app and of the Flutter hub-mobile app (docker/keycloak/realm-agrimarket.json).make mobile-clientadds it to a running realm and does nothing if it exists. Covered byplatform/tests/test_realm_policy.py. -
View
telemetry.sensor_daily(platform/postgres/init/07-telemetry-views.sql): read-only daily summary oftelemetry.sensor_readingsper (htx_code,parcel_code,sensor, Vietnam day) withreading_count,min_value,max_value,avg_value,first_ts,last_ts. Tracked in Hasura astelemetry_sensor_dailywith the samehtx_codefilter as the raw table formanagerandofficer;farmerhas no access. Covered byplatform/tests/smoke-dataops.sh. -
Mini-app
htx-dashboard("Bảng điều hành HTX", 0.1.0): a read-only overall view of a cooperative for its manager, with no database of its own. Tổng quan lists what needs attention (journals waiting more than 3 days, disease reports waiting, sensors silent for 6 hours, harvests due or overdue, failed transfers to the cold store) over a strip of figures, a grid of parcels, journals per week, lots and the newest tea prices; the tabs Sản xuất, Vùng trồng, Sức khoẻ cây, Lô chè and Dữ liệu have a CSV file and a print page; each parcel has a page with the newest reading and the daily chart of each sensor, the crop round, weather, journal, disease reports and lots. Every figure is read from the core through Hasura with the viewer's own token, so a manager sees only their cooperative. Lists ask for at most 5,000 rows and say when cut; sensor charts cover at most 30 days. Requires core 1.13.0. Covered by the app's pytest suite, a block ofmake apps-smoke(every tab against the real core, the figures of seeded readings, the gateway's refusal of other roles, the view's permissions asked from Hasura), a browser story and the screens at 1280 and 390 px in light and dark.
Changed
make platform-smokegives 131 PASS (was 124): five checks for the daily view and two for theofficerrole. The daily-view readings are dated yesterday and today instead of March 2026, so the lifecycle job cannot archive them between the insert and the query.- Web package version
1.13.0. htx-dashboard0.2.0, a chart dashboard: the app draws its figures as charts instead of tiles, with a server-side SVG toolkit of its own (line and area, stacked and grouped columns, donut, sparkline, gauge, ring, calendar and matrix heatmaps, funnel, timeline, scatter) and one palette for both themes. The overview has a KPI strip with the change against the previous period, cooperative-wide sensor charts, a sensor freshness matrix and a harvest timeline; every other tab gains charts of its own. A rejected disease report is no longer listed as a kind of disease. Still no JavaScript and no new dependency. Upgrade an installed copy with./dxos upgrade miniapps/htx-dashboard; a preview with sample data runs withpython tests/preview.pyin the app's folder.
Upgrade notes
make platform-up, thenmake web-up: the first creates the viewtelemetry.sensor_dailyand restarts Hasura so it loads the new metadata; the second rebuilds the web app at1.13.0. No data migration../dxos install miniapps/htx-dashboard(or install "Bảng điều hành HTX" from the App Store with a worker running). A copy of 0.1.0 installed frommainbefore this release is replaced with./dxos upgrade miniapps/htx-dashboard.- A realm that already exists gets the mobile client with
make mobile-client; a new realm has it from the realm file. apps/hub-mobile,apps/staff-desktopandapps/staff-mobileare built from source with their own toolchains (Flutter, .NET, Gradle); see the README of each. The release workflow does not publish them as images.
Known limits
htx-dashboardshows the core's data only: figures of other mini-apps and of the staff apps are not included. Its charts are drawn on the server, so they do not update while the page is open. Sensor charts cover at most the 30 days the hot store keeps. Rainfall is shown as the average of a day's readings.- The staff apps keep their data in a schema of their own and are not installed through
./dxos. - What
hub-mobilereads from a real server and what it still shows from sample data is listed inapps/hub-mobile/README.md. - The browser checks of
app-kit.spec.tscan fail on a frame that is still navigating (issue #44); a failedPlatform Smoke Testjob on that spec is re-run.
Container images
ghcr.io/maiychrus25/opentea-dx-os-web:1.13.0ghcr.io/maiychrus25/opentea-dx-os-api:1.13.0ghcr.io/maiychrus25/opentea-dx-os-postgres:1.13.0ghcr.io/maiychrus25/opentea-dx-os-scanner:1.13.0ghcr.io/maiychrus25/opentea-dx-os-migrate:1.13.0ghcr.io/maiychrus25/opentea-dx-os-dataops:1.13.0
Deploy
Download opentea-dx-os-1.13.0.tar.gz, verify it with SHA256SUMS, then follow the
release deployment guide (6-step order: postgres, platform-init, migrate, platform-init again, rest, then --profile tools run --rm ollama-init to pull the pinned LLM model).
Set DXOS_MQTT_DEVICES and DXOS_MQTT_INGEST_PASSWORD in docker/.env.local first: the broker refuses to start while any MQTT password begins with change_me.
Also set MINIO_ACCESS_KEY, MINIO_SECRET_KEY (SeaweedFS refuses placeholders), KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD, and run every command as docker compose --env-file docker/.env.local -f docker/docker-compose.yml -f docker/docker-compose.release.yml ..., otherwise Compose ignores those values.
OpenTea DX-OS v1.12.0
The v1.11.0 tag has no GitHub Release, images or bundle: its release run failed twice on a race in a browser test (the test typed into a frame that was still navigating), fixed here. v1.12.0 contains everything in 1.11.0.
Added
-
Manifest
feed(platform/apps/manifest.schema.json,dxos validate): an app may name a protected path that returns, for the calling user, a JSON list of sub-apps (entriesand an optionalcreatelink). The web menu shows them after the app's own items in each role's sidebar, and the App Store shows a section "Ứng dụng do HTX tự tạo". The web validates the feed (30 entries, label 60, path^/[a-z0-9_-]+(/[a-z0-9_-]+)*$, icon allowlist, 64 KB, 1.5 s, cached 15 s) and a broken feed leaves the menu intact.GET /api/app-storegainscreated. The icon map moved tolib/apps/app-icons.tsx. Seedocs/miniapps.md. -
Mini-app
custom-books("Sổ tự tạo", 0.1.0): the HTX manager designs record-keeping books without code. Eight templates (picking attendance, spraying, fertilising, cashbook, meeting minutes, supply hand-over, pest tracking, visitors) and a blank book; a form-based designer (name, description, menu icon, fields of eight types, which fields show in the list or are summed, access of officers and farmers: none, view, own rows, all rows; optional approval of each row); preview, publish, archive and publish again. Each published book appears in the menu of the roles allowed to use it and in the App Store section "Ứng dụng do HTX tự tạo", with a form, a filtered list with search and paging, a summary with totals and charts, a CSV download and a print page. With approval on, a row waits for the manager, who approves or rejects it on a page with a reason; the author corrects a rejected row, an approved row is locked, and the summary counts approved rows only. A user at level "own" never reads another user's row (list, edit, CSV, print, summary). Requires core 1.12.0. -
Smaller dev stack:
make up-core(postgres, keycloak, hasura, apisix, web) and one target per optional group (up-docs,up-sensors,up-ai,up-voice,up-workflow,up-chat) start only their own containers;make stop-extrasstops (never removes) every optional container.make upandmake platform-upare unchanged. See the README. -
Designer table (
dxos-app.css): aform-tablemodifier gives the input columns of a table of inputs a share of its width, the name column the largest (about 230 px at 1280 px), and the table stays inside its card with any system font. -
Tests: the app smoke installs
custom-books, drives a book from the picking template through publish, feed per role, rows at level own, rejection, approval, CSV, print, archive and purge; a browser story installs it from the App Store, designs and publishes a book, checks that the officer and farmer menus gain the entry on their own, a farmer row at 390 px, approval, summary, CSV, print and archive, and that the shell still renders when the app is stopped; screens for the books list, template chooser, designer, list, summary, print and farmer list at 1280 and 390 px, light and dark.
Changed
- Keycloak heap cap in the dev stack (
docker/docker-compose.yml):JAVA_OPTS_KC_HEAPdefaults to-Xms64m -Xmx512m(override withKEYCLOAK_HEAP_OPTS); Keycloak used about 1.1 GiB before and about 360 MiB after for the same activity. - The sidebar lights only the most specific menu item, so a feed entry no longer lights its app's own item as well.
Upgrade notes
- The Keycloak cap applies when the keycloak container is next recreated (
make up-coreormake platform-upafter pulling); recreating it also restarts web. - Run
make platform-upandmake web-up(new menu feed, store section and designer CSS), then./dxos install miniapps/custom-booksor install "Sổ tự tạo" from the App Store (a worker must be running). No migration of existing apps; keep everydocker_*volume. ./dxos validatenow accepts thefeedkey; an app that declares it should require core>=1.12.0.
Known limits
- No photo or file fields (mini-apps have no object storage access).
- No formulas or calculated fields: the summary only totals number and money fields.
- Approval is one step, by the manager.
- The designer is a form, not a drag-and-drop canvas; a field's type cannot change once the book has rows, and a choice field that has rows cannot lose options.
- A book's menu entry shows on the next page load, up to 15 seconds after publishing (the feed is cached 15 s per app, HTX and role, 5 s after a failure).
- The menu entry cap is 30 books per role; an HTX has at most 50 books; CSV and print hold at most 5000 rows.
- A second household field in one book shows "Nông hộ khác" for households a farmer may not see; only the first household field's name is stored.
Container images
ghcr.io/maiychrus25/opentea-dx-os-web:1.12.0ghcr.io/maiychrus25/opentea-dx-os-api:1.12.0ghcr.io/maiychrus25/opentea-dx-os-postgres:1.12.0ghcr.io/maiychrus25/opentea-dx-os-scanner:1.12.0ghcr.io/maiychrus25/opentea-dx-os-migrate:1.12.0ghcr.io/maiychrus25/opentea-dx-os-dataops:1.12.0
Deploy
Download opentea-dx-os-1.12.0.tar.gz, verify it with SHA256SUMS, then follow the
release deployment guide (6-step order: postgres, platform-init, migrate, platform-init again, rest, then --profile tools run --rm ollama-init to pull the pinned LLM model).
Set DXOS_MQTT_DEVICES and DXOS_MQTT_INGEST_PASSWORD in docker/.env.local first: the broker refuses to start while any MQTT password begins with change_me.
Also set MINIO_ACCESS_KEY, MINIO_SECRET_KEY (SeaweedFS refuses placeholders), KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD, and run every command as docker compose --env-file docker/.env.local -f docker/docker-compose.yml -f docker/docker-compose.release.yml ..., otherwise Compose ignores those values.
OpenTea DX-OS v1.10.1
Added
make web-upandmake gateway-up:web-uprebuilds or startswebanddisease-apion the generated route file (it replaces the hand-typeddocker compose upforweb, in the README,docs/miniapps.mdand CI);gateway-upputs the gateway back on that file after a hand-typed compose command recreated it on the base one.
Fixed
./dxos installand./dxos workerrefuse to run while the gateway reads the base route file: after a hand-typeddocker compose upwithoutDXOS_GATEWAY_FILErecreated apisix, every mini-app route answered 404 and an install still ended "Đã cài". They now stop with a message namingmake gateway-up; the check never blocks when docker cannot be asked.
Container images
ghcr.io/maiychrus25/opentea-dx-os-web:1.10.1ghcr.io/maiychrus25/opentea-dx-os-api:1.10.1ghcr.io/maiychrus25/opentea-dx-os-postgres:1.10.1ghcr.io/maiychrus25/opentea-dx-os-scanner:1.10.1ghcr.io/maiychrus25/opentea-dx-os-migrate:1.10.1ghcr.io/maiychrus25/opentea-dx-os-dataops:1.10.1
Deploy
Download opentea-dx-os-1.10.1.tar.gz, verify it with SHA256SUMS, then follow the
release deployment guide (6-step order: postgres, platform-init, migrate, platform-init again, rest, then --profile tools run --rm ollama-init to pull the pinned LLM model).
Set DXOS_MQTT_DEVICES and DXOS_MQTT_INGEST_PASSWORD in docker/.env.local first: the broker refuses to start while any MQTT password begins with change_me.
Also set MINIO_ACCESS_KEY, MINIO_SECRET_KEY (SeaweedFS refuses placeholders), KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD, and run every command as docker compose --env-file docker/.env.local -f docker/docker-compose.yml -f docker/docker-compose.release.yml ..., otherwise Compose ignores those values.
OpenTea DX-OS v1.10.0
Added
- App Store detail page (
/manager/app-store/<id>, web version 1.10.0): header with the Cài, Gỡ, Thử lại and Mở ứng dụng buttons, a step progress while an install runs (Đã gửi yêu cầu, Chuẩn bị, Dựng và khởi động, Đăng ký), a strip of screenshots that open at full size, the "Giới thiệu" text, a preview "Khi cài, ứng dụng sẽ" of what the install does for the HTX ("Ứng dụng đã thêm vào HTX" once the HTX uses the app), the data and personal data the app declares, version information, the full address of the app's public page with a "Chép địa chỉ" button, and the history of the app. - Richer store page: accent-insensitive search, filters by status and category, cards that link to the detail page, and a "Lịch sử" tab with the 50 newest install and removal requests of the HTX and the name of who asked. The history only holds requests of the caller's HTX.
- Optional
storeblock in the mini-app manifest (category, icon from an allowlist, about, data, personal data, core reads, up to 4 screenshots of at most 400 KB, PNG, WebP or JPEG detected from the first bytes). Text from a manifest is shown as plain text only../dxos validatealso checks the screenshot files (inside the app directory, size, type);catalog-syncstores the block (platform.app_catalog.store,requires_core,has_database) and the screenshots (platform.app_catalog_screenshots) in the platform database. - Install phases: while the worker installs an app it sets
platform.app_requests.phasetoprepare,buildandregisterthrough the new./dxos worker-progress, so the page can show the step; a failed install keeps the phase that failed. A hand./dxos installnever writes a request or a phase. - Store text and screenshots for the five apps:
leaf-purchase,tea-shop,farm-supply(two screenshots each),tea-tour(one) andhellocarry astoreblock in Vietnamese; the screenshots come from the real apps with sample data and are retaken withapps/web/tests/e2e/tools/store-screenshots.spec.ts(E2E_STORE_SHOTS=1). - Tests: the app smoke checks the synced store block, the phases seen during a queued install, the
buildphase of a failed install, that a hand install writes no request, and thatvalidaterefuses a text file declared as a screenshot; the App Store story now searches, opens the detail page, installs from it, opens the app and finds the history row; the screens add the history tab and the detail page at 1280 and 390 px, light and dark.
Upgrade notes
make platform-upapplies the new columns and tables without recreatingpostgres(06-app-store.sqlis extended in place and stays idempotent). Keep everydocker_*volume.- Rebuild the web image (
up -d --build web) and restart./dxos worker, otherwise the page works but no install phase is reported. - Apps that carry a
storeblock declarerequires.core: ">=1.10.0"; app versions are unchanged.
Known limits
- The declared data is not enforced: what an app says it stores or reads is the publisher's statement, shown as such; nothing checks it against the app's real behaviour.
- There is no update flow: an installed app is not upgraded from the store, and its version does not change for a metadata-only edit.
- The install steps show only what the worker reports (three phases); building and starting the container are one step.
Container images
ghcr.io/maiychrus25/opentea-dx-os-web:1.10.0ghcr.io/maiychrus25/opentea-dx-os-api:1.10.0ghcr.io/maiychrus25/opentea-dx-os-postgres:1.10.0ghcr.io/maiychrus25/opentea-dx-os-scanner:1.10.0ghcr.io/maiychrus25/opentea-dx-os-migrate:1.10.0ghcr.io/maiychrus25/opentea-dx-os-dataops:1.10.0
Deploy
Download opentea-dx-os-1.10.0.tar.gz, verify it with SHA256SUMS, then follow the
release deployment guide (6-step order: postgres, platform-init, migrate, platform-init again, rest, then --profile tools run --rm ollama-init to pull the pinned LLM model).
Set DXOS_MQTT_DEVICES and DXOS_MQTT_INGEST_PASSWORD in docker/.env.local first: the broker refuses to start while any MQTT password begins with change_me.
Also set MINIO_ACCESS_KEY, MINIO_SECRET_KEY (SeaweedFS refuses placeholders), KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD, and run every command as docker compose --env-file docker/.env.local -f docker/docker-compose.yml -f docker/docker-compose.release.yml ..., otherwise Compose ignores those values.
OpenTea DX-OS v1.9.0
Added
- Optional
descriptionin the mini-app manifest (1-200 characters), shown by the upcoming app store;helloandtea-tournow declare one.docs/miniapps.mddocuments it and the rule that public pages live under/public/<htxCode>/...(from v1.9.0 the web proxy serves a public page only when that HTX has enabled the app). Web package version is now1.9.0 - App Store: install mini-apps per cooperative (the manifest
descriptionabove feeds it). A manager opens "Kho ứng dụng" (/manager/app-store) and installs or removes an app for their own HTX; the card shows Chưa cài, Đang cài…, Đã cài, Đang gỡ…, Lỗi (with Thử lại) or "Đã cài cho mọi HTX (quản trị máy chủ)", and polls every 3 s only while something is in progress, then refreshes the sidebar menu of the manager who pressed the button (other signed-in users of the HTX see the change at their next page load). A mini-app is now served, and listed in the menu, only to the HTXs that enabled it: the proxy answers 404 to any other HTX on protected and public paths, and a public page names its HTX in/public/<htxCode>/.... New tables in schemaplatform(platform/postgres/init/06-app-store.sql, applied byplatform-init):app_catalog(synced fromminiapps/*/app.yamlbymake platform-upand by the worker; an installed app keeps its card when its directory is gone),app_enablements(*means every HTX),app_requests(one open request per app and HTX, enforced by a unique index) andapp_worker(heartbeat); requests and enablements are audited../dxos workeris the host process that claims requests one at a time (ENABLEinstalls the app when needed,DISABLEremoves the container once no HTX is left, and keeps the data), takes a lock indocker/runtime/<project>/worker.lock, fails requests a crashed worker left running (undoing the half install) and logs one line per job; without it the page warns that requests wait for the administrator../dxos install <dir>is unchanged and enables the app for*. New API:GET /api/app-store,POST /api/app-store/requests(docs/api-contract.md) - Mini-app
leaf-purchase(Thu mua búp tươi): officers and managers write fresh-leaf weighing tickets (household, date, grade, kg with one decimal, price copied from the grade when written; money is integer VND shown as9.000 ₫) and can edit or void a ticket until its period closes; managers set the price per grade (/prices), close a payment period over a date range (/periods: every non-voided ticket in the range joins it and gets one payout per household) and mark each payout paid; a farmer sees their own tickets and payouts at/mine. The household lists come from Hasura with the caller's own token and role, so a farmer sees only their household. Periods of one HTX never overlap (checked in a transaction under an advisory lock, since the app role cannot createbtree_gist), and a ticket cannot be written or moved into a closed period's dates. Menu: "Thu mua búp tươi" (officer, manager), "Kỳ thanh toán" (manager), "Phiếu cân của tôi" (farmer). Schemaapp_leaf_purchase - Mini-app
tea-shop(Cửa hàng chè): managers list products (name, pack, price, stock, optional trace lot code) and process orders (Mới→Đã xác nhận→Đang giao→Hoàn tất, or cancel, which gives the stock back); guests order without an account at/apps/tea-shop/public/<htxCode>(cash on delivery), get an 8-character order code and look the order up with code and phone together. Stock is locked per order in a fixed product order, so concurrent orders never oversell and never deadlock; an order keeps the product name and price it was placed with; a manager's stock edit is an adjustment (+/-), never an overwrite. Personal data (name, phone, address, note) is shown only to the HTX's manager and never on a public page. Menu: "Cửa hàng chè" (manager). Schemaapp_tea_shop - Mini-app
farm-supply(Vật tư mua chung): managers open a group-buying round with a deadline and add items (name, unit, price) while it is open; each farmer registers quantities for their own household (the household comes from Hasura with the farmer's token, never from the form) until the round closes; closing creates one settlement per registered household, and the manager marks each delivered and paid and sees totals per item and per household. Menu: "Vật tư mua chung" (manager), "Đăng ký vật tư" (farmer). Schemaapp_farm_supply - Tests for the store and the three apps:
make apps-smokenow also installs, calls through the gateway (200 with the right role, 404 on the published port, the gateway's refusal for a wrong role, including/tickets/*and/periods/*ofleaf-purchase), reads the real Hasura household lists as officer, manager and farmer, makes one write per app (a ticket, a closed period and a payout, a public order, a registration) and purges each app; through the queue it enablestea-shopfor TC, checks that the web proxy answers 404 for LB when the web container runs, disables it, enables it again and checks that the product created before is still there. It refuses to start when one of the five apps is installed, and starts its own./dxos worker. Browser:tests/e2e/story/app-store.spec.ts(TC installs the shop from the page and seesĐang cài…thenĐã cài; LB does not see it and gets 404; a guest orders on a 390 px phone; the manager advances the order, presses Gỡ, installs again and finds the order) andbusiness-apps.spec.ts(the leaf-purchase and farm-supply stories);screens.spec.tsadds the store page and one screen per app and role at 1280 and 390 px, light and dark. CI runs the pytest suites of the three apps next totea-tour's and, inplatform-smoke, a./dxos workerfor the store stories
Upgrade notes
- First
make platform-uprecreatespostgresonce: it mounts the newplatform/postgres/init/06-app-store.sql. The data indocker_pgdatais kept, andplatform-initcreates the store tables on the existing database. Never delete thedocker_*volumes - Apps installed before the upgrade stay enabled for every HTX: the
platform-initrun that createsplatform.app_enablementsenables each already-installed app for*once (enabled_by = 'dxos-upgrade'), so nothing disappears from the menu. Later runs never do it again: an installed app with no enablement is a valid state (every HTX turned it off) and is not handed back to everyone - Start
./dxos worker: the store only queues a request until a worker runs. Start it from the repo root (README, "Kho ứng dụng và./dxos worker", has a systemd unit); until it runs, the page warns "Trình cài đặt chưa chạy"../dxos installand./dxos removework without it - The web image must be rebuilt (
up -d --build web): the proxy, the menu and the store page readplatform.app_enablements; the package version is now1.9.0, which the new manifests require - Demo: build the images of the three new apps ahead (install each once, then
./dxos remove <id> --purge) and start the worker before the demo; the first Cài otherwise builds an image, which takes minutes
Known limits
- Apps still trust each other (ruling R24, unchanged): enabling an app per HTX only decides who sees it; every installed app shares
dxos-apps-netand decodes the token without verifying it, so another installed app can read or change the data ofleaf-purchase,tea-shopandfarm-supply. Install only apps of this repository. Real per-app isolation is deferred - The worker is a host process, not a container (the web app must never hold the Docker socket): it must be started and kept alive by the operator, and one worker serves one compose project
- The farm-supply item form shows a rejected item (empty name, bad price) as a plain error page (heading and one message, no form and no link back; the browser's Back button returns to the round) instead of an inline error; nothing is stored
- The gateway can answer 503 for up to about 30 seconds after a core service restarts (for example Hasura): its DNS client caches the "name not found" answer it got while the service was down, and
apisix.dns_resolver_validonly shortens the cache of valid answers. Unchanged from earlier releases
Container images
ghcr.io/maiychrus25/opentea-dx-os-web:1.9.0ghcr.io/maiychrus25/opentea-dx-os-api:1.9.0ghcr.io/maiychrus25/opentea-dx-os-postgres:1.9.0ghcr.io/maiychrus25/opentea-dx-os-scanner:1.9.0ghcr.io/maiychrus25/opentea-dx-os-migrate:1.9.0ghcr.io/maiychrus25/opentea-dx-os-dataops:1.9.0
Deploy
Download opentea-dx-os-1.9.0.tar.gz, verify it with SHA256SUMS, then follow the
release deployment guide (6-step order: postgres, platform-init, migrate, platform-init again, rest, then --profile tools run --rm ollama-init to pull the pinned LLM model).
Set DXOS_MQTT_DEVICES and DXOS_MQTT_INGEST_PASSWORD in docker/.env.local first: the broker refuses to start while any MQTT password begins with change_me.
Also set MINIO_ACCESS_KEY, MINIO_SECRET_KEY (SeaweedFS refuses placeholders), KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD, and run every command as docker compose --env-file docker/.env.local -f docker/docker-compose.yml -f docker/docker-compose.release.yml ..., otherwise Compose ignores those values.
OpenTea DX-OS v1.8.1
The v1.8.0 tag has no GitHub Release, images or bundle: the release workflow's smoke gate failed on the flaky restart fixed below. v1.8.1 is the same product with that fix and is the first published build of the mini-app platform.
Fixed
make platform-upno longer recreates containers whose build inputs did not change: BuildKit attached a provenance attestation with a new digest to every build, so rebuilding an unchanged image (up --build,run --build migrate, the web step) produced a new image ID and Compose recreatedagrimarket-postgres(and its dependents) under a running Keycloak. Keycloak then answered 500 on its next admin call, which failedmake apps-smokeon main and in the release gate (FAIL: keycloak admin PUT .../default-client-scopes/...,Error 22). The Makefile,./dxosand the CIplatform-smokejob now setBUILDX_NO_DEFAULT_ATTESTATIONS=1, so the same inputs give the same image ID. First-start behaviour is unchangedmake apps-smokewaits for Keycloak aftermake platform-up: it now asserts that the postgres container is the same one as before, then waits (bounded, 120 s for the admin API, 60 s for the user token) before using Keycloak, so a legitimate restart no longer fails the run. New helperkc_readyinplatform/tests/tokens.sh; no assertion was removed
Container images
ghcr.io/maiychrus25/opentea-dx-os-web:1.8.1ghcr.io/maiychrus25/opentea-dx-os-api:1.8.1ghcr.io/maiychrus25/opentea-dx-os-postgres:1.8.1ghcr.io/maiychrus25/opentea-dx-os-scanner:1.8.1ghcr.io/maiychrus25/opentea-dx-os-migrate:1.8.1ghcr.io/maiychrus25/opentea-dx-os-dataops:1.8.1
Deploy
Download opentea-dx-os-1.8.1.tar.gz, verify it with SHA256SUMS, then follow the
release deployment guide (6-step order: postgres, platform-init, migrate, platform-init again, rest, then --profile tools run --rm ollama-init to pull the pinned LLM model).
Set DXOS_MQTT_DEVICES and DXOS_MQTT_INGEST_PASSWORD in docker/.env.local first: the broker refuses to start while any MQTT password begins with change_me.
Also set MINIO_ACCESS_KEY, MINIO_SECRET_KEY (SeaweedFS refuses placeholders), KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD, and run every command as docker compose --env-file docker/.env.local -f docker/docker-compose.yml -f docker/docker-compose.release.yml ..., otherwise Compose ignores those values.
OpenTea DX-OS v1.7.0
Added
- Tea leaf disease model:
ai-models/tea_leaf_model.keras(MobileNetV2 transfer learning, 224×224, 8 classes listed inai-models/tea_class_names.txt, 9.2 MB) with Vietnamese labels intea_class_names_vi.json, each marked for officer review.ai-models/tea/holds the reproducible pipeline (train.py,datasets.jsonwith DOIs, download URLs and SHA-256, pinnedrequirements.txt) that runs inpython:3.12.15-slim-bookworm. It is trained on three CC BY 4.0 Mendeley datasets (Kimutai and Förster, Kenya; Islam, Bangladesh; Billah et al., Bangladesh), credited inai-models/ATTRIBUTION.md; no image is committed.ai-models/tea/MODEL_CARD.mdreports the measured numbers: test accuracy 0.8683 on 1,025 images and confidence threshold 0.60, but only 0.12 to 0.35 when one source is held out, and a random-noise image is calledhealthyat 0.988. Accuracy on Thái Nguyên photos is not measured; every result goes to an officer - Tea disease model served:
POST /predict?model=teaondisease-apiuses the tea leaf model next to the general one (still the default; any other model name answers 400). Responses gainmodelanduncertain; a tea result belowTEA_CONFIDENCE_THRESHOLD(default0.60, rejected at startup outside (0, 1]) has null names and keepstop3./healthaddsmodelswith each model's state - Tea disease flow in the web app: a parcel whose crop names
chè/teais diagnosed with the tea model, any other with the general one. An uncertain result is stored asKhông xác định, and every result still goes to the officers; the farmer screen saysĐã gửi cán bộ kỹ thuật xeminstead of presenting a final diagnosis. A 503 from the tea model is an outage (503AI_UNAVAILABLE), never a fallback to the general model - Officer's confirmed diagnosis: the review form has a Tên bệnh đã xác nhận field, pre-filled with the AI name (empty when uncertain).
PUT /api/officer/diseases/[id]/reviewtakesconfirmed_diagnosis, required when approving, and stores it inconfirmed_diagnosis; the farmer history, officer lists, soil-health screen, notification and archived report show it over the AI name - Tea harvest rounds:
POST /api/parcels/[id]/start-round(officer only,TenantGuard.parcel) moves aHARVESTEDparcel toTENDINGand opens the cycleLứa <n>/<year>, numbered within the year in Vietnam time. The status check and the new cycle are one transaction, so a second start, or a start on any other status, is refused with 422 and creates nothing. The officer's household screen has a Bắt đầu lứa mới button on harvested parcels - Journal photo upload:
POST /api/journal/upload(farmer and officer) returns a presigned upload URL valid for 900 seconds and the keypara/<htxCode>/Areas/Journal/<yyyy>/<uuid>-<safe name>, whichPOST /api/journalaccepts asphoto_minio_key. Onlyimage/jpeg,image/pngandimage/webpare accepted; the name is reduced to its last segment without Vietnamese marks or unsafe characters, capped at 100 characters. The farmer journal form's photo upload called this route before it existed; the A3 browser story uploads a photo through it to storage and opens it again - Withdrawal on the farmer dashboard:
Thửa <mã> còn <N> ngày cách lyfor each parcel of the farmer's household whose latest safe harvest date (from journal entries not rejected) is still ahead;Nis whole days, rounded up - Tea demo data:
npm run seed(new script, runsprisma db seed) creates the Tân Cương (TC) and La Bằng (LB) cooperatives with made-up households and tea parcels (Trung du, LDP1, Kim Tuyên). ParcelTC-A3has, relative to the seed run, a fertiliser entry, a spraying entry still under its 7-day withdrawal, a harvested previous round whose lotTC-CHE-A3-001is already exported with a public trace page, and one pending tea disease report. Re-running it changes onlyTCandLBrows (plus the shared market, bulletin and partner rows); the history of the seeded parcels is rebuilt with fresh dates.platform/tests/seed-test.shchecks this on a throwaway database - Tea demo accounts in the realm:
manager_tc,officer_tc,farmer_tc,manager_lb,officer_lb,farmer_lb(passwordTest1234!; managers and officers must set up TOTP). The farmers have fixed ids, which the seed uses to link them to their household - Tea market data:
comtrade_export_syncalso fetches HS0902and stores it asTea;vietnam_market_syncadds a simulated dried tea bud price (Tea,VND/kg). Every price that workflow simulates is now written under the sourceMô phỏng (Toàn quốc)instead of naming a ministry or market portal, and the dashboard price list, the market widget and the chatbot's market context label such pricesgiá mô phỏng; the chatbot and the bulletin prompt must say so too, and the chatbot's context no longer calls its market data "thực tế". The market widget names no source when it has no data. Prices already stored under the old source names are not relabelled - Design system and dark mode:
DESIGN.md(google-labs-code/design.md format) documents the tokens ofapps/web/src/styles/globals.css, which now has a dark value for every colour token, applied underprefers-color-scheme: darkunless the viewer picked light, or underdata-theme="dark". A theme button (Sáng → Tối → Theo hệ thống, stored inlocalStoragekeyopentea-theme) sits in the top bar and on the home and login pages; an inline script sets the stored theme before first paint and does nothing if storage is blocked. Tailwind'sdark:variant follows the same choice, and semantic tokens (bg-danger-subtle,text-ink-secondary, ...) are available as Tailwind colours. Tests check that every light token has a dark value, that text/background pairs reach WCAG AA 4.5:1 in both themes, and thatDESIGN.mdmatchesglobals.css. A colour guard fails on hard-coded colours in*.module.cssand*.tsx; its baseline of files still to convert (74 when it was added) was emptied by the move to tokens below - A3 story and priority screens in the browser:
tests/e2e/story/tea-a3.spec.tsruns "Một ngày của lô chè A3" on the seeded stack with real Keycloak logins: the farmer sees A3's withdrawal and adds a journal entry with a photo uploaded to storage; a tea photo diagnosis goes through the gateway to the tea model (checked in thedisease-apiaccess log) and into the officer queue, where the officer confirms it with a name the farmer then sees; harvest approval and a lot of A3 are refused during the withdrawal; the officer creates and exports a lot ofTC-A2; the public pages/q/<code>of that lot and ofTC-CHE-A3-001show their withdrawal status.tests/e2e/visual/screens.spec.tssaves the priority screens of spec §6.4 (9 pages: the disease review is both the queue and the review form) at 1280×800 and 390×844 in light and dark (36 screenshots undertest-results/screens/) and fails on page-level horizontal overflow, on overlapping visible text, and on a theme button missing from or crowded in the phone top bar. Theplatform-smokeCI job now seeds the demo data, startsdisease-apiwithweb, runs both specs after the core tenant spec and uploads the screenshots as thepriority-screensartifact.make platform-smokealso createssmoke_officer_tc, because the demo officers must set up TOTP first - Home page:
/is now public for signed-out visitors, with a short introduction, a sign-in button and a lot code field that opens the public trace page/q/<code>(signed-in users are still sent to their dashboard). The PWA icons are real 192 and 512 px tea-leaf icons and are served without a session
Changed
- disease-api dependencies pinned: every package in
apps/disease-api/requirements.txthas an exact version, andtensorflow-cpu(unpinned, no arm64 wheel) is replaced bytensorflow==2.21.0withkeras==3.15.1, so the image also builds on arm64; it is larger than before. The 46-class general model gives the same prediction as with the previously resolved versions. A pytest suite (requirements-dev.txt:pytest,httpx2) covers model selection, the threshold and the general model, and the CI job "Lint FastAPI" now runs it with-W error - Brand: the product is named
OpenTea DX-OSeverywhere (page titles via one title template, sidebar, top bar, login, register and PIN pages, trace pages, PWA manifest and the Keycloak login theme's title), fromapps/web/src/lib/brand.ts. The Keycloak theme directory and realm keep the nameagrimarket - Colours: the accent is now amber (
#b45309, was orange#EA580C); the status, feedback and tertiary text colours are darkened where white or coloured text missed 4.5:1;--font-family-sansuses Be Vietnam Pro instead of an Inter font that was never loaded. The login page uses tokens only - Tea vocabulary: the app no longer speaks of rice. Placeholders, chat suggestions, mock bulletins, the soil-health warning and the seeded market, bulletin and partner rows use tea; the seed no longer attributes made-up figures to real bodies (its FAOSTAT rows and the bulletin's WTO and Sở NN&PTNT sources are gone, and its one demo price is simulated); the menu item
Lịch vụ mùais nowLịch thu hái; a new zone's season defaults toLứa 1/<year>; the default commodity of the bulletin, market widget and market API isChè/Tea(the farmer bulletin page now looks it up by its English name, as the workflows store it, andGET /api/bulletinwithout?commodityreadsTeafor any tea crop of the HTX, such asChè Trung du). The manager dashboard's price list shows the 3 newest tea prices, topped up with the newest other commodities only when fewer than 3 exist. A test fails when a rice word is back in the web source or the seed; its only exceptions are the commodity name maps for Comtrade rice and wheat rows - Demo data and accounts: the
MD2rice cooperative is no...