Skip to content

Releases

v0.3.0 — iMessage attachments

Choose a tag to compare

@github-actions github-actions released this 24 Nov 16:00

v0.3.0 — iMessage attachments

An additive release: the iMessage channel now delivers what arrived, and a kian started under a git
hook stops pointing nested git at the caller's repository. No event kind, wire shape, replay rule or
database migration changes; a text-only payload keeps its exact bytes, and a config without media:
keeps its tool set byte-identical.

Attachments reach the model

  • Metadata first. The adapter models the bridge's attachments whitelist and maps filename,
    mime_type, total_bytes and is_sticker into the channel payload, so a photo, voice note or file
    arrives as [image]/[attachment] marker text plus what arrived instead of a bare marker. A
    text-only payload keeps its exact bytes (the key is absent without attachments), and
    watch.attachments (default on) documents the knob. One checked-in ABI row is asserted by both the
    bridge's emitter and the adapter's parser, so a renamed field fails a test rather than vanishing
    from the model's view.

  • Bytes are opt-in. attachments: bytes (default metadata, refused without a media: section)
    fetches each image/audio item with the page's generation through the bridge's new authenticated
    GET /v1/attachment route, writes the bytes into the artifact store and hands the ADR-062 envelope
    to the media edge — the model reads an OCR/ASR transcript instead of a bare [image] marker. A
    generation mismatch is 409, watch.max_attachment_bytes (default 16 MiB) bounds one file, a failed
    fetch keeps the metadata and admits the row, and base64 never persists. Vision of pixels stays out
    (ADR-063).

Contract: CHANNEL-IMESSAGE §2.5, §3.2, §4,
ADR-064.

Cron worktrees

A kian started under a hook (or any wrapper exporting GIT_DIR/GIT_WORK_TREE) no longer points
worktree inspection, creation or cleanup at that checkout instead of the configured repository: every
nested git spawn goes through cron_worktree::git_command, which scrubs the repository environment and
the object/store overrides.

Upgrading

  • No database migration, no event-kind change and no KiandProto bump (still v3): a kiand built from
    0.2.0 talks to a 0.3.0 kian and vice versa.
  • The kian server must be upgraded for attachment metadata to reach the model: an older server
    ignores the additive field, so a mixed pair stays safe but the model sees a bare marker.
  • The bridge must be upgraded for attachments: bytes (the new route); metadata mode works with the
    previous bridge.
  • Enabling bytes is three config pieces, and the binaries go first: attachments: bytes on the
    channel, media: + artifacts: at the top level, and the media API key in the environment. An
    unknown attachments value refuses boot on the previous binary.

Install

Prebuilt archives (with .sha256) for x86_64/aarch64 Linux and macOS,
ghcr.io/flyer103/kian:0.3.0, and crates.io:

cargo install kian-cli --version 0.3.0
cargo install kiand --version 0.3.0

From source:

cargo build --release --locked -p kian-cli -p kiand

The macOS bridge is built from source (cargo build --release -p kian-imessage-bridge); it is not part
of the archives.

Boundaries, stated up front

  • The WeChat channel does not emit the media envelope yet.
  • attachments: metadata (the default) never fetches bytes; the model sees the name, type and size.
  • The bridge route serves image and audio only; pixels do not reach the model as vision parts through
    this path (ADR-063).

Licensed under Apache-2.0.

v0.2.0 — vision, media, compaction, budgets

Choose a tag to compare

@github-actions github-actions released this 23 Nov 15:45

v0.2.0 — vision, media, compaction, budgets

The first feature release since the public snapshot. Everything here is additive: no event kind,
wire shape or replay rule breaks, and a config that does not opt in keeps its request bytes
byte-identical.

Context and cost

  • Long sessions compact themselves. kian-orchestrator::compaction folds old turns under
    measured pressure — only when the worst-case next request would consume 90% of a declared
    model_profiles.*.context_window, or when the provider reports an overflow. The fold is an
    ordinary persisted maintenance turn (step/request with purpose: compact, then a compact
    event on success), uses the session's bound slot with one request and no fallback, and is capped
    at two folds per drain episode. Ordinary turns reserve 10% of the token allowance for it.
  • A session-lifetime token budget that refuses before the call. agents.<name>.budgets.tokens
    projects base + Σbudget/raised − Σturn/end.usage, admits the request plan's worst case and
    refuses the turn before step/request is persisted; the session parks awaiting_budget and
    resumes. kian raise-budget / raise_budget admits one durable, idempotent control row.
  • A price book turns usage into money. pricing: declares per-million-token cache-hit,
    cache-miss and output prices, peak windows and holidays, normalized once to integer micro-USD;
    kian cost attributes each turn/end usage to the last request target and reports priced /
    unpriced / unknown usage and the peak split. Nothing is written to the event stream.
  • Request plans. Every provider attempt is built by a pure planner returning the body, its
    dialect, profile digest, body digest and a token band; sender, persistence, cache check and the
    budget gate consume that one value. model_profiles: now also carries vision: true.
  • kian usage-stats, /metrics and session inspect report cache-miss input tokens and a hit
    rate. A rejected DeepSeek request (HTTP 422 / in-band 400/422) is classified InvalidResponse
    and no longer retried on a fallback.

Media and artifacts

  • Tool results ride the event stream by reference. With artifacts: configured, a successful
    tool/result above inline_max_bytes (16 KiB) is rewritten to a content-addressed
    {artifact, preview, truncated} before the event is appended; the store is sha256-addressed,
    atomic, path-traversal-proof and collected by retention (kian artifacts gc, 10 GiB / 30 days).
    artifact_read serves the payload back in bounded windows.
  • Media tools and file ingest. media: mounts image_ocr, audio_transcribe and
    speech_synthesize as audited tools over DeepSeek's media APIs; kian artifacts put <path>
    turns a local file into an artifact.
  • Vision inputs. A vision-profile target sees artifact-backed images as OpenAI image_url
    content parts; V1 and every image-free V2 body stay byte-identical, and a reclaimed blob degrades
    the picture rather than the turn.
  • Channel-edge media. Voice notes and photos from an adapter carrying the media envelope are
    written to the artifact store, transcribed, and admitted as text plus an artifact reference — no
    base64 ever re-enters the payload. Shipped adapters emit the envelope in their phase-2 contract.

Tools and operations

  • web_search and web_fetch on the operator's own DeepSeek key (web:), as ordinary
    audited tool calls; large pages spill by reference instead of being truncated.
  • Artifact retention runs inside kian serve beside the snapshot and view tickers, and
    kian session export --with-artifacts pins every referenced blob into a sibling directory so an
    audit package stays payload-complete.
  • Off-peak deferral. JSON-RPC submit/queue with defer: "off_peak" and a cron resident
    schedule with defer: off_peak persist the ordinary inbox row with a computed eligible_at,
    bounded by defer.max_wait_ms. No second scheduler, no timer per row, no new event kind.

Install

Prebuilt archives (with .sha256) for x86_64/aarch64 Linux and macOS are attached below, and
ghcr.io/flyer103/kian:0.2.0 carries the same kian + kiand pair. From source:

cargo build --release --locked -p kian-cli -p kiand

crates.io still carries 0.1.1; the registry publish is a separate step.

Boundaries, stated up front

  • No shipped channel adapter emits the media envelope yet — WeChat and iMessage record it as
    their phase-2 contract.
  • Search/Fetch per-request fees are not yet in the token cost projection.
  • Wall-clock budget raises are projected but not enforced while a drain is idle.
  • Compaction never runs for cost: only measured context pressure or a provider overflow triggers it.

Licensed under Apache-2.0.

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 22 Nov 17:52
Kian Runtime 0.1.1: registry metadata, crates.io install path

v0.1.0 — first public release

Choose a tag to compare

@flyer103 flyer103 released this 21 Nov 13:41

v0.1.0 — first public release

First public snapshot of Kian — the durable execution runtime for agents.

A Session is the one first-class durable entity, the append-only event stream is the only truth, and
a drain is a disposable execution interval. Three promises follow from that shape.

kill -9 mid-turn, no lost work

Durable execution

A crash, a deploy or a machine move costs a restart, not the work. Session state is a projection of
the stream, a new drain replays it and continues, and the exact model request bytes are persisted
before the call flies (step/request) — so replay is byte-identical and the provider's prefix cache
survives a takeover. Safety comes from epoch fencing, not from the lease: a partitioned-but-alive old
holder is fenced out.

The recording above is a real run: the turn is in flight, kill -9, a new drain takes over at
epoch 2, and the replay derives 2 of 2 request bodies byte-identically.

BYOM execution

A single-binary kiand daemon runs the session's commands on the machine you choose, over a durable
at-least-once queue with a heartbeat watchdog, bound 1:1 to its worker session for that session's
whole life. Offline work parks and resumes; membership is liveness only, and binding is frozen for
the session's lifetime.

The same demo, recorded:
the brain stays, the hands move.

Harness integration

The built-in ReAct loop, or dsh / Claude Code / Codex behind the same LoopDriver seam and the same
23 event kinds, selected per worker agent. A harness-owned loop is a projection-only session,
and the capability matrix states exactly what each one supports instead of implying equivalence.

In this release

  • 19 crates — core, store (sqlite default, postgres for replicas), orchestrator and its bounded
    three-layer recovery, OpenAI-compatible provider with session-immutable model slots, the loop seam,
    memory, cron, hook plugins, endpoint/exec (KiandProto), the super-agent bundle, three harness
    bridges, the wire-only SDK, the CLI and the macOS iMessage bridge.
  • Contracts — a 23-kind event model, a JSON-RPC + SSE API, session inspect/replay/export, a
    Prometheus /metrics surface, and a resumable read model.
  • Channels — Lark IM, GitHub (webhook + poll), WeChat iLink (QR login, best-effort) and iMessage
    through a macOS bridge, with two-level admission filtering and untrusted-input marking.
  • Operational surface — durable confirmation (permissions: ask), scheduled turns on a durable
    slot cursor, hook plugins over a stdio ABI, agent memory (notes + dreaming), and multi-replica
    safety.
  • An example — examples/issue-watch:
    a resident Router triaging one repository's issues, in one editable config.

Getting started

Container, prebuilt archive, or source — the README has
one command for each. Then:

kian serve --config kian.yaml

kian.yaml and the RPC calls that run a session end to end are in the
quickstart; every other capability has one runnable
snippet in docs/advanced.md.

Boundaries, stated up front

  • A projection-only harness session persists no step/request: durable control and audit, but no
    byte-level model-request replay.
  • The BYOM command queue is at-least-once, not exactly-once; duplicate results dedupe on command id.
  • No cross-worker failover: a binding is immutable, so moving to another machine means a new session.
  • The WeChat channel is best-effort: iLink publishes no stable contract, and cross-downtime backfill
    is unmeasured.

Licensed under Apache-2.0. Security reports:
SECURITY.md.