Skip to content

(bug) Pi permissions controls are hidden when the agent config omits harness.kind #5661

Description

@mmabrouk

When an agent config omits harness.kind, the runner treats the harness as pi_core: all seven Pi built-ins are active and the harness.permissions allow/ask/deny rules are enforced at runtime. The web UI does not apply the same default, so for such a config the Pi permissions controls are hidden while the run enforces Pi permission gating. The author cannot see or edit the rules that apply to their runs.

Where the gap is: in web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx, harnessValue stays null when harness.kind is absent (line 174), so isPiHarness is false (line 175) and hasPiPermissions (line 379) hides PiPermissionsControl.

This is a visibility gap only; the runtime permission gate (including allow_reads) still applies. The UI should treat an absent harness.kind as pi_core, matching the runner, with coverage for the {harness: {}} case.

Follow-up from a review comment on #5651: #5651 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions