Management

pi-cyberneticsourcetypescript
Path: pi-cybernetic/src/engines/management.tsRelative: src/engines/management.tsSubproject: pi-cyberneticCategory: cybernetic-core
Lines: 371Bytes: 14,227Imports: 7Exports: 4

Content Preview

  1. /**
  2. * Loop 2 — ManagementEngine. Variety allocator + feedback enforcer (P1, P2, P4).
  3. * Attaches via beforeToolCall (dispatch gate) and afterToolCall (auditor).
  4. * All gates are deterministic TypeScript — ADR-002.
  5. */
  6. import type {
  7. AfterToolCallContext,
  8. AfterToolCallResult,
  9. AgentLoopTurnUpdate,
  10. BeforeToolCallContext,
  11. BeforeToolCallResult,
  12. } from "@earendil-works/pi-agent-core";
  13. import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
  14. import type { Model } from "@earendil-w