Mockflow contains first-party mock environments for local agent testing and API-parity workflows. It owns local env development, seed contracts, dev tooling, API parity checks, and the shared Docker base image.
example_tasks/ are fixtures and templates used to prove mockflow runtime
contracts. Benchmark scoring and canonical task authoring stay outside this
repo.
Run commands from the mockflow repo root. Prerequisites:
- Python 3.12+
uv- Docker daemon for Docker/base-image smoke checks
- free local ports
9001-9005and9060
Run the unit/control smoke:
scripts/smoke_dev.shStart every configured mock service plus devhub:
scripts/dev.shStop with Ctrl-C. Local DBs and runtime state live under .data/dev/; remove
that directory if you want a clean local-dev state.
Start only services declared by an example task:
scripts/dev.sh task gdrive-archive-stale-draftsOpen devhub:
http://127.0.0.1:9060
The shared base image is published as:
kywch/mockflow:0.1.0
VERSION is the source of truth for the semver tag. Task Dockerfiles should
pin FROM kywch/mockflow:<VERSION>. latest may exist as a convenience alias,
but task Dockerfiles should not depend on it.
Build and push:
docker/build-base.sh --pushRelease checklist:
- Bump
VERSIONif the base image contract changed. - Run
scripts/smoke_dev.sh. - Run changed env tests, for example
cd packages/environments/mock-gdrive && uv run --extra dev pytest tests -q. - Build locally with
docker/build-base.sh. - Run
scripts/smoke_docker_examples.sh. - Push with
docker/build-base.sh --push. - Validate remote pull with
docker pull kywch/mockflow:$(cat VERSION).
Validate all example Dockerfiles against the published base:
scripts/smoke_docker_examples.shFor faster local reruns:
PULL_BASE=0 scripts/smoke_docker_examples.shmockflow/
├── packages/environments/mock-gmail/
├── packages/environments/mock-gcal/
├── packages/environments/mock-gdoc/
├── packages/environments/mock-gdrive/
├── packages/environments/mock-slack/
├── docker/
├── devhub/
├── docs/
├── example_tasks/
├── scripts/
├── tests/
├── config.toml
└── VERSION
- Service metadata comes from
config.toml. - Service ids and CLIs are canonical
mock-*names. - Service URLs use canonical
MOCK_*_URLenv vars. - Task service declaration uses
task.toml [environment] services = [...]. - Task Dockerfiles are thin and inherit from
kywch/mockflow:<VERSION>. - Hidden task payload lives under
/var/lib/task. - Task-aware seeding uses internal
--task-data+--task-nameplumbing. - Dev/user UX stays task-name based:
scripts/dev.sh task <name>.
Current implementation note: config.toml is the source of truth for runtime
metadata, but scripts/smoke_docker_examples.sh and docker/gws-wrapper.sh
still contain small service maps and must be kept in sync when adding services.
example_tasks/ currently covers:
email-confidential-forwardgdoc-search-keyword-indexgdrive-archive-stale-draftsmulti-mail-cal-syncmulti-misread-approval-scope
These examples are mockflow fixtures/templates, not source-of-truth task definitions.
Mockflow is licensed under the GNU Affero General Public License v3.0 only
(AGPL-3.0-only). See LICENSE.
You may self-host, use, modify, and redistribute Mockflow under the terms of the AGPL. BenchFlow also offers an official hosted Mockflow service.