Skip to main content

keble-task

keble-task owns generic Keble task schemas, task relations, task-room graph context, lifecycle/action events, task cost records, and agent query/mutation tool contracts.

Verified State

Checked on 2026-07-18 against pyproject.toml, package exports, keble_task/, and tests.

  • Package: keble-task 2.24.1
  • Python: >=3.13,<3.14
  • Critical deps: keble-helpers, keble-db, pydantic-ai-slim, tenacity
  • Source roots: schemas/, actions/, crud/, main/, agent/, utils/
  • Public exports: TaskClient, CRUD classes, task/task-relation schemas, task-cost schemas, lifecycle/action events, and agent tool providers.

Runtime Contract

  • Task identity, stage, relations, and cost accounting belong here. Feature packages should attach domain metadata instead of redefining task rows.
  • First-class long-running features should be real TaskType flows in the consuming service, not generic subagent workflows plus parallel adapters.
  • Lifecycle and action events must stay typed and stable for backend websocket fanout and frontend task-list rendering.
  • Mongo CRUD changes must expose indexed query shapes directly and keep index creation in startup wiring, not request handlers.
  • Token rates are stored as native-currency micros per million tokens through the shared LlmTokenPriceBand. Metered non-token provider spend that can be smaller than one ISO minor unit uses TaskCostMicrosAmount; settled values remain Money. This preserves rates such as USD 0.075 and one-item charges such as USD 0.002 without rounding either to cents.
  • Version 2.24.x reads the legacy Money-per-counter rate shape only for migration and writes the canonical currency + priceBand shape. Migrate stored rows and old admin clients before removing that reader in 2.25.0.
  • Version 2.24.1 also reads legacy additionalCost rows while new metered provider rows write exactAdditionalCost: {currency, micros} and keep the legacy field at zero in the same currency. The two nonzero representations are rejected to prevent double counting.

Testing

uv sync --group test
RUN_INTEGRATION=1 RUN_REAL_DB=1 RUN_LOCAL_STACK=1 RUN_DB_STACK=1 uv run pytest -q -m "not live and not container"
uv run pytest -q -m "not live and not slow and not eval and not local_stack and not db_stack and not container"
uv run pytest -q -m eval
uv run pytest -q -m integration
RUN_LLM_LIVE=1 uv run pytest -m "live and llm"
uv run npx --yes pyright .

Package-owned test helpers live under keble_task.testing; do not recreate root-level tests/config.py, tests/utils.py, root test packages, or legacy source folders such as tests/schemas/.

Mongo/Redis integration settings load explicit process env first, then tests/.env, then the umbrella keble.backend/.env through keble_db.testing.resolve_test_env. Live LLM settings load explicit LIVE_LLM_* values first and otherwise map the first backend Azure endpoint/token/deployment entry. Set KEBLE_BACKEND_ENV_FILE=/path/to/.env from unusual worktree or CI layouts. Mongo/Redis tests are integration, db, mongo, redis, and local_stack; they run in the local-full Keble command and stay out of the portable-offline fallback command. Selecting integration tests without configured Mongo/Redis now fails with a clear environment requirement instead of silently skipping. Eval tests use tests/evals/ plus eval; selecting -m eval is the eval opt-in, with no generic RUN_EVALS gate. Keep the package-owned test database and collection names isolated.

Change Logs

Historical release notes and long AI change history live under logs/.

Side Effect If Changes

  • Backend task APIs, owner task lists, task room sockets, cost accounting, and frontend task rows depend on these schemas/events.
  • Backend pricing configuration and task-cost admin clients must use the exact micro-rate wire introduced in 2.24.0 and the exact additional-spend wire from 2.24.1; optional missing prices are unknown, not free usage.
  • Relation or graph-context changes can affect all feature rooms that load child tasks or background sessions.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keble_task-2.24.1.tar.gz (315.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

keble_task-2.24.1-py3-none-any.whl (61.1 kB view details)

Uploaded Python 3

File details

Details for the file keble_task-2.24.1.tar.gz.

File metadata

  • Download URL: keble_task-2.24.1.tar.gz
  • Upload date:
  • Size: 315.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for keble_task-2.24.1.tar.gz
Algorithm Hash digest
SHA256 f9e74bf7e2434cc4b7b8fac80772d799c9e4ec66d46233cf8f9a86e2554d8b1f
MD5 5c838265aa6df509ca7a6744caa2f1d8
BLAKE2b-256 13d2094840602605f1d776e9a44442461eeb32e68ec7913c4c1cc971a04d8bad

See more details on using hashes here.

File details

Details for the file keble_task-2.24.1-py3-none-any.whl.

File metadata

  • Download URL: keble_task-2.24.1-py3-none-any.whl
  • Upload date:
  • Size: 61.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for keble_task-2.24.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97a8857383f9fb6f18ccf78244e369b468b6b215381c42dabf9a8cf0d6540202
MD5 a261d0e24efae4981a24559370c25b3c
BLAKE2b-256 1562342f2057a5a99890270fbfdae81815d11c315336e49641d007b364d434c0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.24.1 This release

2 files

2.24.0

2 files

2.22.1

2 files

2.22.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page