Kanshō/Permission request

Permission request

The trust gate. Shows what the agent wants, why, and the exact scopes it will use — before any side effect.

Included in the single kansho full pack. Components are not offered as separate installs.

Medium risk — file write

Write generated tests to /repo

medium risk
The code-writer agent wants to add Vitest specs to cover the new invoice query path.
Requested scope
filesystem.writefilesystem.read
  • filesystem.write /repo/src/queries/__tests__/**
  • filesystem.read /repo/src/queries/**

Demo outcome: pending

High risk — network + credential

Send dunning emails to 23 customers

high risk
Outgoing email reaches paying customers and cannot be recalled. Always-allow is disabled for this scope.
Requested scope
email.sendcredentials.read
  • email.send 23 recipients · mailer@example.com
  • credentials.read POSTMARK_TOKEN

Demo outcome: pending

Low risk — read only

Read calendar to pick a follow-up slot

low risk
Read-only access to the user's primary calendar. No data leaves this run.
Requested scope
calendar.read
  • calendar.read primary, next 14 days

Demo outcome: pending

Included components

This page is the canonical destination for these components. All ship in the single Kansho pack.

Approval actions

components/agent/approval-actions.tsx

Approval card base

components/agent/approval-card-base.tsx

Component documentation

Approval actions

components/agent/approval-actions.tsx

Purpose

Renders a compact row of approval actions from caller-supplied definitions.

Appropriate use

Use as the footer of an approval or permission card when each decision is already represented by a callback.

Example

components/agent/approval-actions.tsx has a representative live example in the "Medium risk — file write" section on /components/permission-request.

States

Actions support primary, secondary, ghost, and destructive variants plus wired, disabled-preview, and empty sets.

API and props

ApprovalActions accepts actions with id, label, optional variant, and optional onClick, plus className, staticPreview, and previewLabel.

Dependencies

Direct imports are React, Button, and cn.

Accessibility

Each action is a native button; static-preview actions are disabled rather than pretending to mutate state.

Limitations

It does not coordinate decisions, pending state, confirmation, or error feedback; the owning card or host must do so.

Source

Source: components/agent/approval-actions.tsx.

Full pack

components/agent/approval-actions.tsx is documented at /components/permission-request and installs only through the single Kansho full pack; no individual component install is offered.

Approval card base

components/agent/approval-card-base.tsx

Purpose

Provides the shared visual structure for approval and permission cards.

Appropriate use

Use to compose a header, summary, details, and footer when a specialised approval component is not appropriate.

Example

components/agent/approval-card-base.tsx has a representative live example in the "Medium risk — file write" section on /components/permission-request.

States

Its meaningful configurations are optional icon, summary, details, and footer regions; it has no internal decision state.

API and props

ApprovalCardBase accepts headerIcon, required header, optional summary, details, footer, and className.

Dependencies

Direct imports are React and cn.

Accessibility

It adds no dialog, alert, or form semantics; supplied headings and controls retain their own semantics.

Limitations

This is layout only and does not enforce focus order, action wiring, or approval-state transitions.

Source

Source: components/agent/approval-card-base.tsx.

Full pack

components/agent/approval-card-base.tsx is documented at /components/permission-request and installs only through the single Kansho full pack; no individual component install is offered.

Permission Request

components/agent/permission-request.tsx

Purpose

Presents requested scopes, rationale, risk, and permission decisions in a shared approval card.

Appropriate use

Use at a permission boundary only when the host can handle approve, deny, always-allow, and optional edit outcomes.

Example

components/agent/permission-request.tsx has a representative live example in the "Medium risk — file write" section on /components/permission-request.

States

Risk is low, medium, or high; scopes may include detail; actions may be wired or intentionally disabled with staticPreview.

API and props

PermissionRequest accepts title, rationale, scopes, risk, staticPreview, approve, deny, always-allow and edit callbacks, and className.

Dependencies

Direct imports are React, Lucide icons, ApprovalActions, ApprovalCardBase, Tag, and cn.

Accessibility

Decision actions use native buttons and static previews disable them so no false interaction is offered.

Limitations

It does not enforce policy, submit decisions, show pending/error results, or create an audit record; the host owns the full gate lifecycle.

Source

Source: components/agent/permission-request.tsx.

Full pack

components/agent/permission-request.tsx is documented at /components/permission-request and installs only through the single Kansho full pack; no individual component install is offered.