gemini(cockpit): actor/source badges inventory across cockpit and activity surfaces #134

Closed
opened 2026-05-28 01:20:44 +02:00 by codex · 1 comment
Collaborator

Parent: #2
Agent lane: Gemini 3.5 Flash
Wave: cockpit / read model
Risk class: low

Goal

Make trust metadata visible consistently: who said/did what, from where, and with what authority.

Context refs

  • Open issues #83, #80
  • docs/operational-cockpit-contract.md

Scope

  • Inspect cockpit, recent activity, audit view, and card context surfaces.
  • Inventory actor/source/channel badges or missing equivalents.
  • Recommend small consistent vocabulary.

Acceptance

  • Inventory covers Piotr/Iskra/Codex/system and Signal/Kan/Forgejo/Obsidian sources.
  • Operator-approved vs tool-result/proposal is not blurred.
  • No broad design rewrite.

Suggested checks

  • Static UI/code search.

Non-goals / fences

  • Do not deploy, restart production, rotate secrets, or run production migrations.
  • Do not widen MCP write authority or public exposure.
  • Keep the change small enough for one focused PR or one scouting report.

Expected output

A short PR or issue comment with findings, touched files, tests run, and remaining risks.

Parent: #2 Agent lane: Gemini 3.5 Flash Wave: cockpit / read model Risk class: low ## Goal Make trust metadata visible consistently: who said/did what, from where, and with what authority. ## Context refs - Open issues #83, #80 - `docs/operational-cockpit-contract.md` ## Scope - Inspect cockpit, recent activity, audit view, and card context surfaces. - Inventory actor/source/channel badges or missing equivalents. - Recommend small consistent vocabulary. ## Acceptance - Inventory covers Piotr/Iskra/Codex/system and Signal/Kan/Forgejo/Obsidian sources. - Operator-approved vs tool-result/proposal is not blurred. - No broad design rewrite. ## Suggested checks - Static UI/code search. ## Non-goals / fences - Do not deploy, restart production, rotate secrets, or run production migrations. - Do not widen MCP write authority or public exposure. - Keep the change small enough for one focused PR or one scouting report. ## Expected output A short PR or issue comment with findings, touched files, tests run, and remaining risks.
Author
Collaborator

Codex scouting pass after #140 / before badge UI work.

Inventory

Card activity surface

File: apps/web/src/views/card/components/ActivityList.tsx

Already good:

  • Activity uses agentAttribution.displayActorName before falling back to the Kan user.
  • Agent actions can show a small via agent / via automation badge.
  • API schema exposes agentAttribution.auditPublicId, actor, displayActorName, machineIdentityPublicId, machineIdentitySlug, machineIdentityDisplayName, machineIdentityKind in packages/api/src/schemas/card.ts.

Gap:

  • Badge vocabulary is generic (via agent) and does not show source/channel (Signal, MCP, n8n, etc.).
  • It does not expose audit id or confidence inline, which is probably fine for card view, but useful as tooltip/follow-up.

Agent audit surface

File: apps/web/src/views/settings/AgentAuditSettings.tsx

Already good:

  • Actor display prefers machineIdentityDisplayName ?? machineIdentitySlug ?? actor.
  • Shows mode, action, date, source badge, raw/redacted payload badge, audit id, optional idempotency key, optional source ref, identity slug.
  • Source filters include signal, fastmail, meeting, forgejo, manual, obsidian, iskra, n8n.

Gap:

  • Source/actor badges are local to audit view; no shared vocabulary/component yet.
  • machineIdentityKind is rendered as plain text, not a consistent badge.

Agent proposals surface

File: apps/web/src/views/settings/AgentProposalsSettings.tsx

Already good:

  • Shows proposal status.
  • Shows Prepared by <createdBy>.
  • Extracts sources from create_card action metadata and renders them as a compact source chip.

Gap:

  • Source chip only looks at create_card metadata today.
  • It does not distinguish operator-approved, tool-result, proposal, applied, or rejected as trust states beyond status.

Operational cockpit surface

File: apps/web/src/views/settings/OperationalCockpitSettings.tsx

Already good:

  • Shows sourceSystem, domain/status/risk/needsPiotr/stale, evidence kind/ref.
  • It is suitable for producer-side trust metadata via snapshot items.

Gap:

  • No explicit actor badge because snapshot items are evidence/read-model entries, not necessarily actions.
  • Should avoid implying “who did it” unless producer supplies a safe actor/source field later.
  • #133/#141 addresses risky evidence refs in the default UI.

Recent activity / MCP read path

Docs: docs/agent-mcp-contract.md

Already good:

  • Contract names actorKind, displayActorName, viaAgentTokenName, agentAuditPublicId, agentAttributionConfidence, list public IDs/names.
  • Contract explicitly says Iskra actions should display as OpenClaw Iskra MCP, not Piotr.
  • agentAudit[] includes machine identity fields.

Gap:

  • This is strong in API/MCP contract, but not consistently surfaced as one shared UI badge vocabulary.

Create a shared UI helper/component for trust chips, without redesigning pages:

  • ActorChip: human / agent / automation / system, display name, optional machine identity kind.
  • SourceChip: signal / fastmail / meeting / forgejo / manual / obsidian / iskra / n8n / kan / mcp.
  • TrustStateChip: proposal / approved / applied / rejected / audit-exact / audit-low-confidence / redacted.

Use it first in AgentAuditSettings and maybe ActivityList; do not touch every surface in one PR.

Vocabulary proposal

Actors:

  • Piotr / human
  • OpenClaw Iskra MCP / agent
  • codex-<thread-id> / agent
  • n8n-<workflow> / automation
  • system / system

Sources:

  • Signal, Kan, Forgejo, Obsidian, Fastmail, Meeting, Iskra, n8n, MCP

Trust states:

  • manual
  • via agent
  • proposal
  • approved
  • applied
  • audit exact
  • audit low confidence
  • redacted

Non-goals confirmed

No production change, no token/identity change, no MCP authority change. This was static code/docs scouting only.

Codex scouting pass after #140 / before badge UI work. ## Inventory ### Card activity surface File: `apps/web/src/views/card/components/ActivityList.tsx` Already good: - Activity uses `agentAttribution.displayActorName` before falling back to the Kan user. - Agent actions can show a small `via agent` / `via automation` badge. - API schema exposes `agentAttribution.auditPublicId`, `actor`, `displayActorName`, `machineIdentityPublicId`, `machineIdentitySlug`, `machineIdentityDisplayName`, `machineIdentityKind` in `packages/api/src/schemas/card.ts`. Gap: - Badge vocabulary is generic (`via agent`) and does not show source/channel (`Signal`, `MCP`, `n8n`, etc.). - It does not expose audit id or confidence inline, which is probably fine for card view, but useful as tooltip/follow-up. ### Agent audit surface File: `apps/web/src/views/settings/AgentAuditSettings.tsx` Already good: - Actor display prefers `machineIdentityDisplayName ?? machineIdentitySlug ?? actor`. - Shows `mode`, action, date, source badge, raw/redacted payload badge, audit id, optional idempotency key, optional source ref, identity slug. - Source filters include `signal`, `fastmail`, `meeting`, `forgejo`, `manual`, `obsidian`, `iskra`, `n8n`. Gap: - Source/actor badges are local to audit view; no shared vocabulary/component yet. - `machineIdentityKind` is rendered as plain text, not a consistent badge. ### Agent proposals surface File: `apps/web/src/views/settings/AgentProposalsSettings.tsx` Already good: - Shows proposal status. - Shows `Prepared by <createdBy>`. - Extracts sources from `create_card` action metadata and renders them as a compact source chip. Gap: - Source chip only looks at `create_card` metadata today. - It does not distinguish `operator-approved`, `tool-result`, `proposal`, `applied`, or `rejected` as trust states beyond status. ### Operational cockpit surface File: `apps/web/src/views/settings/OperationalCockpitSettings.tsx` Already good: - Shows `sourceSystem`, domain/status/risk/needsPiotr/stale, evidence kind/ref. - It is suitable for producer-side trust metadata via snapshot items. Gap: - No explicit actor badge because snapshot items are evidence/read-model entries, not necessarily actions. - Should avoid implying “who did it” unless producer supplies a safe actor/source field later. - #133/#141 addresses risky evidence refs in the default UI. ### Recent activity / MCP read path Docs: `docs/agent-mcp-contract.md` Already good: - Contract names `actorKind`, `displayActorName`, `viaAgentTokenName`, `agentAuditPublicId`, `agentAttributionConfidence`, list public IDs/names. - Contract explicitly says Iskra actions should display as `OpenClaw Iskra MCP`, not Piotr. - `agentAudit[]` includes machine identity fields. Gap: - This is strong in API/MCP contract, but not consistently surfaced as one shared UI badge vocabulary. ## Recommended small next PR Create a shared UI helper/component for trust chips, without redesigning pages: - `ActorChip`: human / agent / automation / system, display name, optional machine identity kind. - `SourceChip`: signal / fastmail / meeting / forgejo / manual / obsidian / iskra / n8n / kan / mcp. - `TrustStateChip`: proposal / approved / applied / rejected / audit-exact / audit-low-confidence / redacted. Use it first in `AgentAuditSettings` and maybe `ActivityList`; do not touch every surface in one PR. ## Vocabulary proposal Actors: - `Piotr` / human - `OpenClaw Iskra MCP` / agent - `codex-<thread-id>` / agent - `n8n-<workflow>` / automation - `system` / system Sources: - `Signal`, `Kan`, `Forgejo`, `Obsidian`, `Fastmail`, `Meeting`, `Iskra`, `n8n`, `MCP` Trust states: - `manual` - `via agent` - `proposal` - `approved` - `applied` - `audit exact` - `audit low confidence` - `redacted` ## Non-goals confirmed No production change, no token/identity change, no MCP authority change. This was static code/docs scouting only.
codex closed this issue 2026-06-03 09:15:48 +02:00
Sign in to join this conversation.
No labels
3plus3-followup
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
analytics
api
cockpit
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
docs
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
gemini-flash
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
leviathan
mcp
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
ops
priority:p0
priority:p1
priority:p2
priority:p3
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
safety
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
scout
security
size/large
size/medium
size/small
size/tiny
size/unknown
small-task
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tests
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
ui
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/kan-ductor#134
No description provided.