Skip to content

Team mode M11: Private-content access audit and member notice #4149

Closed

Description

@DoodleBears

Parent: hub #4138 (spec #4137, ADR-0336). Blocked by: #4142.

Behavior

  • Every view of another member's private Bot, private Channel, DM or Bot–Bot DM by the Owner or a granted role writes an audit record: who, when and which object.
  • The Owner sees the audit log in the UI and through CLI audit.
  • Members see a Settings notice that private content is accessible to authorised administrators.

Acceptance

  • Audit records are written for each access path (Client, CLI) and are tamper-evident for non-Owners.
  • No record is written for a member reading their own content.

Activity

  1. DoodleBears commented on Nov 14, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim

    • Agent: Claude Code (orchestrator, UI/UX) + Codex CLI (logic)
    • Task: claude/local/74a5ee4a-f6fe-4aab-870f-5e465b0b8474 (not a DSH Session)
    • Issue scope: M11 per the contract below
    • Branch: claude/4149-private-audit (from main; Codex sub-branch codex/4149-logic)
    • Started: 2026-11-14 15:12 UTC
    • State: active

    M11 wire contract (agreed before parallel work; Claude = UI, Codex = logic)

    Based on main after M2, M3, M4, M9 (and E4). M10 (#4186) and M6 are landing in parallel; take the next free migration generation at merge time (never hard-coded) and reconcile member-methods.ts.

    Who may view. The Owner and holders of privateContent.view (Owner-only grantable, M3). Bots never (spec amendment 2026-11-15): every method below refuses a Bot-initiated or Bot-tool call.

    Private objects. Another member's private Bot (profile, Memory files, DMs with it), private Channel, Human–Human DM, and Bot–Bot DM between Bots of other members.

    • privateObjects { humanId?, kind? } → [{ objectId, kind: 'bot'|'channel'|'dm'|'bot-dm', name, ownerHumanIds }] — names only, no content, no audit record (listing is not viewing).
    • privateContentOpen { kind, objectId, reason? } → { viewId, object, messages: first page, memoryFiles?: [...] } read-only; writes one audit record per open. Further pages via privateContentPage { viewId, before } (no extra record while the view is open, max 30 minutes).
    • Refusals: permission-required (details.permission: 'privateContent.view'), object-not-found, own-content (the viewer's own content needs no audited view).

    Audit log. Append-only, hash-chained records { auditId, at, viewerHumanId, viewerName, kind, objectId, objectName, ownerHumanIds, reason?, prevHash, hash }.

    • auditLog { after?, limit? } → page; Owner and audit.view holders. Members never see it.
    • auditVerify → { ok: true } | { ok: false, brokenAt: auditId } — tamper evidence; non-Owners cannot edit or delete records (no such method exists), and the chain detects direct database edits.
    • No record when someone reads their own content.

    Member notice. teamMode gains privateAccessNotice: true in Team mode (members are told authorised administrators can view private content, and that each view is recorded).

    CLI: audit list [--after] [--limit], audit verify, private list [--member <username>] [--kind], private open <kind> <id> [--reason]; --as for all.

    Client (Claude): Settings › Team › Audit log (Owner / audit.view), member sheet › "View private content" → list → read-only viewer with a "This view is recorded" banner and optional reason; member Settings notice; en + zh.

    Tests: every open path (Client RPC, CLI) writes exactly one record; own content writes none; non-holders refused; Bot callers refused; hash chain verify detects an edited and a deleted row; members cannot read the log; CLI --as parity.

  2. DoodleBears commented on Nov 15, 2026

    @DoodleBears
    ContributorAuthor

    Completed by merged PR #4220 (its body linked this issue but did not use a closing keyword). Acceptance evidence in #4220: audit rows are written for Client and CLI opens, audit verify → { ok: true } and the hash chain plus durable head make edits or deletions fail verification for non-Owners; opening your own content is refused (own-content) and writes no row. Real-Host e2e with Owner + two members is recorded in the PR. The M15 real-LLM security run is tracked in #4197.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions