No description
  • Rust 88.5%
  • CSS 7.7%
  • Starlark 2.6%
  • Shell 0.8%
  • Go Template 0.3%
Find a file
Peter Kurfer 85fa76cca1 Implement run orchestration in df-agent-channel
New crate df-agent-channel (openspec iter1-run-orchestration): the
control-plane side of the agent protocol, mounted by `dark-factory serve`.

- Agent port: mTLS via tokio-rustls with client certs bound to the run
  (URI SAN, peer IP via SandboxProvider::resolve_identity). TLS material
  is reloaded on rotation (checked at most every 10 s), handshakes are
  bounded in time and count.
- Session: Hello/HelloAck, HarnessCredentials and Assign, batched
  persistence with cumulative acks, dedup and gap detection, transcript
  storage with blob extraction, prompt (re-)delivery and wall-clock Cancel
  counted from the runtime's first Hello. Effects of committed messages
  run even before a gap; tool calls and credentials are refused once the
  run ended.
- Scheduler: SKIP LOCKED run start on task_message_queued and a 15 s
  tick, background provisioning, provider events, connect timeout and
  hard stop; continuation summary keeps the newest messages.
- Factory tools with schema validation and at-most-once execution (the
  forge is called outside any transaction), PR lifecycle (draft on push,
  ready + completion summary on completion), Git credential grants.
- Graceful shutdown: sessions drain in-flight tool calls, the scheduler
  drains provisioning, main waits SHUTDOWN_GRACE before aborting.
- Migration: tasks.completion_summary, runs.connected_at.
- Config: agent and harness sections deny unknown fields; ChannelConfig
  holds the df-core sections; Helm configmap sets agent.tls.
- Placeholder provider, forge and secret store until
  iter1-sandbox-provisioning and iter1-integration-plugins land.
- Bazel: production library without test-util, separate test-util
  variant for tests. Remote Bazel is blocked by a pre-existing toolchain
  issue (docs/bazel-remote-toolchain.md); verified locally.
- Deferred review findings are tracked as TD-8 to TD-26 in
  docs/tech_debt.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:33:04 +00:00
.agents Specs: onboard OpenSpec 2026-10-17 13:35:25 +02:00
.cargo Pin dev tooling via rules_multitool and bazel_env 2026-10-18 12:41:39 +02:00
.claude Specs: onboard OpenSpec 2026-10-17 13:35:25 +02:00
.codegraph Implement the factory-agent runtime and the fake ACP agent 2026-10-19 09:12:22 +02:00
.pi Specs: onboard OpenSpec 2026-10-17 13:35:25 +02:00
.sqlx Iteration 1: implement foundation 2026-10-17 16:18:29 +02:00
build Pin dev tooling via rules_multitool and bazel_env 2026-10-18 12:41:39 +02:00
contract Implement run orchestration in df-agent-channel 2026-10-20 05:33:04 +00:00
crates Implement run orchestration in df-agent-channel 2026-10-20 05:33:04 +00:00
deploy Implement run orchestration in df-agent-channel 2026-10-20 05:33:04 +00:00
design Design repository config, agent memory and gitoxide notes 2026-10-19 13:21:26 +02:00
docs Implement run orchestration in df-agent-channel 2026-10-20 05:33:04 +00:00
openspec Implement run orchestration in df-agent-channel 2026-10-20 05:33:04 +00:00
plugins Iteration 1: implement build and deployment artifacts 2026-10-18 11:28:17 +02:00
product Design repository config, agent memory and gitoxide notes 2026-10-19 13:21:26 +02:00
tools/xtask Include standalone tailwindcss binary in multitool lock 2026-10-19 22:01:54 +02:00
.bazelignore Iteration 1: implement build and deployment artifacts 2026-10-18 11:28:17 +02:00
.bazelrc Add rustfmt.toml and Rust-aware editorconfig sections 2026-10-19 09:41:57 +02:00
.bazelrc.agents Implement the factory-agent runtime and the fake ACP agent 2026-10-19 09:12:22 +02:00
.bazelversion Iteration 1: implement build and deployment artifacts 2026-10-18 11:28:17 +02:00
.editorconfig Add rustfmt.toml and Rust-aware editorconfig sections 2026-10-19 09:41:57 +02:00
.envrc Pin dev tooling via rules_multitool and bazel_env 2026-10-18 12:41:39 +02:00
.gitignore Pin dev tooling via rules_multitool and bazel_env 2026-10-18 12:41:39 +02:00
.hadolint.yaml Add hadolint, typos and cargo-machete hooks 2026-10-18 13:17:46 +02:00
.kube-linter.yaml Pin dev tooling via rules_multitool and bazel_env 2026-10-18 12:41:39 +02:00
.mcp.json Specs: onboard OpenSpec 2026-10-17 13:35:25 +02:00
_typos.toml Add hadolint, typos and cargo-machete hooks 2026-10-18 13:17:46 +02:00
AGENTS.md Upgrade Rust to 1.99.1 and all outdated dependencies 2026-10-19 09:36:42 +02:00
apm.lock.yaml Specs: onboard OpenSpec 2026-10-17 13:35:25 +02:00
apm.yml Specs: onboard OpenSpec 2026-10-17 13:35:25 +02:00
BUILD.bazel Include standalone tailwindcss binary in multitool lock 2026-10-19 22:01:54 +02:00
Cargo.lock Implement run orchestration in df-agent-channel 2026-10-20 05:33:04 +00:00
Cargo.toml Implement run orchestration in df-agent-channel 2026-10-20 05:33:04 +00:00
deny.toml Upgrade Rust to 1.99.1 and all outdated dependencies 2026-10-19 09:36:42 +02:00
lefthook.yml Upgrade Rust to 1.99.1 and all outdated dependencies 2026-10-19 09:36:42 +02:00
MODULE.bazel Include standalone tailwindcss binary in multitool lock 2026-10-19 22:01:54 +02:00
MODULE.bazel.lock Implement run orchestration in df-agent-channel 2026-10-20 05:33:04 +00:00
multitool.lock.json Include standalone tailwindcss binary in multitool lock 2026-10-19 22:01:54 +02:00
README.md Specs: prepare iteration 1 2026-10-17 14:19:08 +02:00
rust-toolchain.toml Upgrade Rust to 1.99.1 and all outdated dependencies 2026-10-19 09:36:42 +02:00
rustfmt.toml Add rustfmt.toml and Rust-aware editorconfig sections 2026-10-19 09:41:57 +02:00

dark-factory

A lightweight, Kubernetes-native control plane for AI agents working as "employees" on software projects — an opinionated rethink of Paperclip for a homelab. A Rust control plane provisions agent-sandbox sandboxes, a Rust runtime inside each sandbox drives Claude Code (or other ACP harnesses) and talks back over mTLS, and integrations with forges and issue trackers run as WASI plugins.

Status: design — nothing runnable yet.

Repository layout

Path Content
product/context.md Vision, requirements, decision index, future options
product/iterations/ Iteration plans — scope, milestones, spikes
product/agent-playbook.md How agents are expected to work; source for built-in and project skills
design/tech-stack.md The whole tech stack in one place
design/adr/ Architecture Decision Records
design/ Technical deep dives (agent-run.md, egress.md, deployment.md)
contract/ Wire and plugin contracts: protobuf (agent protocol, transcript), WIT (integration plugins), factory tool schemas
openspec/ Specs and implementation changes; order of work per iteration

Planned as the code arrives: a Cargo workspace (crates/), WASI plugins (plugins/), the Helm chart (deploy/helm/dark-factory/, ADR-0031) and Bazel build files (MODULE.bazel), see ADR-0024.