This repository has been archived on 2026-06-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
xingyue 10a601c28b docs: update for executor loop, task events, pending-tasks projection
Reflect recent changes across all docs:
- README: add executor loop (fire-and-forget), task events lifecycle,
  pending-tasks projection, update architecture diagram, add pulse-hermes
  package, add RFC #58 reference
- CONTRIBUTING: add task-events.ts, defs.ts, projection-engine.ts,
  pending-tasks-projection.ts to code structure, update architecture
  diagram to three-layer decoupled model, add design principles 6-7,
  add ui/ directory, add migrate.ts, add RFC #58 reference
- DESIGN: update packages table with all current packages
2026-04-15 19:44:11 +08:00

1.3 KiB

Design Document

See RFC #44: Pulse — Agent 的自主神经系统

Summary

Core Formula

f(prevSnapshot, currSnapshot) → (Effect[], tickMs)

Key Properties

  • Moore Machine — Effects determined by state, not events. Pulse polls projection values, not event streams.
  • Path Dependent — Sampling is lossy. A→B + B→C ≠ A→C at the effect level. Poll frequency = resolution of reality.
  • S Combinator — Single composition primitive. pulse = S r3 . S r2 . S r1 $ dummy
  • Not Forced Pure — Rules can be async/impure. Framework doesn't distinguish certain/uncertain.
  • Agent Managed — The rule repo is managed by the Agent. Types, rules, collectors, effectors — all TypeScript, all under tsc guard.
  • Staging via git worktree — Safe experimentation before promote to production.

Packages

Package Purpose
@uncaged/pulse Core engine: runPulse() + Rule type + executorLoop + task projections. Generic, zero deps.
@uncaged/pulse-openclaw OpenClaw adapter: Gateway/LLM watchers + OC-specific rules + executors.
@uncaged/pulse-cursor Cursor Agent CLI executor adapter.
@uncaged/pulse-hermes Hermes Agent adapter.
@uncaged/upulse CLI: daemon lifecycle + test/staging/promote + embedded WebUI