Skip to content

Add an optional Agent Assistant policy bridge for confirmed turn actions #301

Description

@khaliqgant

Summary

@agentworkforce/turn-kit provides runConfirmedTurnAction() to ensure success text is constructed only after a provider mutation returns a confirmed receipt. It does not yet provide reusable risk classification, approval gating, or audit records.

Add an optional bridge to @agent-assistant/policy so agents can apply consistent mutation policy without coupling the core turn lifecycle to Agent Assistant.

Depends on the turn-kit foundation in #299.

Scope

  • Add an optional turn-kit policy entry point, likely @agentworkforce/turn-kit/policy.
  • Map a requested turn action into Agent Assistant action classification and gating.
  • Support allow, deny, and explicit-approval outcomes before the mutation runs.
  • Compose with runConfirmedTurnAction() so provider receipts remain the source of truth for success.
  • Emit a normalized audit result for requested, denied, approved, attempted, confirmed, and unconfirmed outcomes.
  • Keep @agent-assistant/policy optional; the base turn-kit package must work without it.
  • Avoid embedding provider-specific GitHub, Linear, Telegram, or Relayfile logic.

Acceptance criteria

  • Denied or unapproved actions never invoke the provider mutation.
  • Approved actions still cannot produce success text until the provider receipt is confirmed.
  • Unconfirmed provider receipts are audited as failures and retain the current fail-closed behavior.
  • Policy metadata can include conversation, actor, action class, and provider reference without storing sensitive message content by default.
  • Tests cover low-risk allow, high-risk approval, denial, provider failure, and unconfirmed receipt paths.
  • Documentation includes a complete mutation example and explains the ownership boundary between policy and provider confirmation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions