Skip to main content

Demiurge 0.4.0

Demiurge is alpha / developer-preview software. APIs, runtime layout, and authoring contracts may still change.

Summary

This release adds a host-owned background job runtime for long-running terminal commands, spawned child agents, and background evolution runs. It also expands the package system with repository-backed packages, provider-owned STT and web search packages, and a more usable package wizard.

User-Visible Changes

  • Added an in-memory JobRuntime for background work, with shared job ids, status, summaries, log tails, cancellation, write-scope conflict checks, and completion events.
  • Added the job tool for list, poll, log, wait, and cancel.
  • terminal(background=true) now returns a job_id; process_id remains as a compatibility alias for terminal jobs.
  • Background jobs default to notify_on_complete=true. Completed jobs queue a synthetic model turn in the originating session; user input takes priority and pending completion summaries merge into that user turn.
  • ctx.agents.spawn(...) now creates an agent backend background job instead of maintaining separate runner-owned background state.
  • evolve_core(background=true) now creates an evolve backend job that produces a candidate and report without automatically promoting or switching the active core.
  • Added package repository support and improved package install flows.
  • Redesigned package wizard output, including clearer table rendering.
  • Added provider-owned speech-to-text packages.
  • Added provider-owned web search packages.
  • Added schedule management tooling and explicit default schedule fields.
  • Added candidate-core evolver runs and manifest checks.
  • Rebuilt and reorganized the public manual, including Chinese manual pages.

Fixes

  • Prevented background completion turns from running concurrently with user turns in TUI, text, and Telegram channels.
  • Preserved /stop behavior as foreground-turn cancellation only; background jobs continue until explicitly cancelled through job.
  • Kept terminal background log retrieval bounded by default while preserving full in-memory logs through job(action="log").
  • Aligned release checks with the current GitHub Actions release workflow, including website build and release-note publication checks.

Breaking Changes

  • Background terminal execution is now represented by JobRuntime job ids. process_id is still returned for terminal compatibility, and process remains as a terminal-job compatibility view, but job is the owning control API for background work.
  • Background evolve_core no longer auto-promotes. It creates the candidate and report; promotion or active-core switching must happen through a later normal host-owned action.

Known Limitations

  • Background jobs, logs, and pending completion events are in-memory only and are lost when the host process exits.
  • blocked_needs_user jobs notify the user and require later user action; they do not auto-approve dangerous actions.
  • Code slots run in the host-shared Python environment by default.
  • Candidate Agent Core evolution cannot add dependencies automatically.
  • External gateway channels are disabled by default and require explicit authentication-related environment variables or tokens.
  • Telegram is still long-polling only.
  • Package repositories can be local, built-in, or explicitly trusted Git/path sources; install-time trust still belongs to the host.
  • Provider profile tests make live network calls only when explicitly invoked.
  • GitHub Releases do not attach wheel or sdist artifacts by default yet; use the source checkout or managed checkout install path for this alpha release.

Verification

  • uv run python -m compileall demiurge tests
  • uv run pytest -vv --durations=20 -o faulthandler_timeout=60
  • uv run demiurge --help
  • uv run demiurge init --help
  • (cd ui-tui && npm ci && npm run typecheck && npm test -- --run && npm run build)
  • cmp ui-tui/dist/entry.js demiurge/ui/tui_dist/entry.js
  • (cd website && npm ci && npm run build)
  • git diff --check -- ':!demiurge/ui/tui_dist/entry.js'
  • uv run python -c 'import tomllib, demiurge; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"]); print(demiurge.__version__)'
  • rg -n "0\\.4\\.0|docs/releases/0\\.4\\.0" pyproject.toml demiurge/__init__.py uv.lock README.md README.zh-CN.md docs website