Skip to content

feat(loop): FutureOS loop control plane — native should-run kernel, event-sourced goals, quota/scheduler, extensions & multi-agent - #97

Merged
huichen merged 2 commits into
mainfrom
claude/loopx-control-plane
Aug 6, 2026
Merged

huichen merged 2 commits into
mainfrom
claude/loopx-control-plane

Conversation

@huichen

@huichen huichen commented Aug 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

FutureOS-native loop control plane in orchestration/loop, productized and renamed to future-loop (CLI + agent skill + install script + gRPC executor bridge).

What's included

Native control plane

  • Deterministic should-run decision kernel: quota gating, gates/monitors/claim-lease, run history, event ledger + replay, goal registry, backup/restore, file locks
  • Agent binary untouched — all loop policy lives in the new crate

Kernel modularization & arbitration

  • decision.rs split into subdomain modules (identity / boundary / frontier / monitor / stall / heartbeat recommendation / goal boundary / primary action)
  • Scheduler arbitration layer: 9 dispositions with reason codes, observe-only → enforcement rollout, fail-closed consistency repair

Quota & scheduler

  • Slot accounting (run/agent/heartbeat sources), stall repair, 24h/7d usage summaries
  • Scheduler state machine: cadence normalization, progression, atomic persistence, host-failure tracking
  • Monitor metadata (target/policy/cadence) + poll events with exact replay

Event sourcing & projections

  • Content-addressed event ids + idempotent append + conflict detection (fail-closed)
  • QuotaSpent / EvidenceAttached events; markdown backfill; per-goal schema migration bridge
  • Task-lease state machine (claim/renew/release/expire); privacy-graded projections; run lifecycle (compaction/index/retention)

Extensions & multi-agent

  • CLI command registry (groups + capability hooks + aggregated help)
  • Capability lifecycle state machine + catalog; per-capability command hooks; capability gate
  • Extension manifests, install/enable/disable/rollback, readiness doctor; capability→extension resolver
  • Identity-scoped agent scope/lane, supervisor events, handoff delivery contract, task graph, attention queue / operator inbox

Evaluation & diagnostics

  • Benchmark minimal loop (gRPC adapter + deterministic ledger), decision replay + model-behavior corpus, canary smoke suite, version/doctor/history/turn/evidence-log commands

Productized CLI surface

  • Independent validators: todo add --verify "cmd" --max-validation-attempts N — exit 0 completes, bounded repair otherwise
  • todo supersede / todo update, goal cancel / goal delete, run --agent-id claim/lease
  • Next Action refreshed on every todo/gate mutation (no stale status); cancelled goals stop automation

Validation

  • cargo clippy --workspace --all-targets -D warnings — clean
  • cargo fmt --check — clean
  • future-loop: 494 tests green (76 baseline contracts + per-phase suites + productized-feature contracts)
  • GUI: tsc / eslint / vitest 251/251; src-tauri 182 tests
  • Note: 3 future-agent sandbox tests are flaky under parallel execution (pre-existing: tests mutate the global HOME env var; serial run 856/856 green) — unrelated to this change

@huichen
huichen force-pushed the claude/loopx-control-plane branch 20 times, most recently from 318e589 to 14ec5a2 Compare August 5, 2026 15:07
huichen pushed a commit that referenced this pull request Aug 6, 2026
39 个 add/add 冲突全部取我们(local main 更新版产品化 + 重构内核,内容为
2b87309 超集);删除其带回的旧单体 src/decision.rs(与 src/decision/ 冲突)。
scripts/install-future-loop.sh 与 skill/future-loop 取 ours(更新版)。
@huichen
huichen force-pushed the claude/loopx-control-plane branch from 7110c85 to fd1925c Compare August 6, 2026 07:15
@huichen huichen changed the title feat(loopx): native LoopX-style loop control plane + rename to future-loop feat(loop): FutureOS loop control plane — native should-run kernel, event-sourced goals, quota/scheduler, extensions & multi-agent Aug 6, 2026
@huichen
huichen force-pushed the claude/loopx-control-plane branch 4 times, most recently from 59256a7 to 05eea1b Compare August 6, 2026 07:38
…vent-sourced goal state, quota/scheduler, extensions & multi-agent

Implements orchestration/loop as the FutureOS loop control plane (CLI + skill
+ gRPC executor bridge), productized as future-loop:

- Native control plane: deterministic should-run decision kernel, event
  ledger + replay, goal registry, run history, backup/restore, file locks,
  claim/lease, gates, monitors, quota
- Kernel modularized into decision subdomains (identity/boundary/frontier/
  monitor/stall/heartbeat/goal-boundary/primary-action) + scheduler
  arbitration layer (9 dispositions, observe-only → enforcement)
- Quota & scheduler: slot accounting (run/agent/heartbeat), stall repair,
  usage summaries, scheduler state machine (cadence/progression, atomic
  persistence), monitor metadata + poll events
- Event sourcing: content-addressed event ids + conflict detection,
  QuotaSpent/EvidenceAttached events, markdown backfill, schema migration
  bridge, lease state machine, privacy-graded projections, run lifecycle
- Extensions & multi-agent: CLI command registry, capability lifecycle/
  catalog/gate, extension manifests + rollback, capability resolver,
  identity-scoped agent scope/lane/supervisor, handoff, task graph,
  attention queue / operator inbox
- Evaluation: benchmark minimal loop (gRPC adapter + ledger), decision
  replay + behavior corpus, canary smoke, version/doctor/history/turn
- Productized CLI surface: independent --verify validators (bounded repair),
  todo supersede/update, goal cancel/delete, run --agent-id claim/lease;
  Next Action refreshed on every mutation; cancelled-goal stop
- Rename crate to future-loop (lib future_loop, bin future-loop)
- 494 tests green; clippy --workspace --all-targets -D warnings + fmt clean
@huichen
huichen force-pushed the claude/loopx-control-plane branch from 05eea1b to 9f3b3f0 Compare August 6, 2026 07:43
@huichen
huichen merged commit e2a8fb8 into main Aug 6, 2026
17 checks passed
@huichen
huichen deleted the claude/loopx-control-plane branch August 6, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant