STATE-WP-0093: per-recipient broadcast receipts and standing notices (T01-T06).
Founder approved T01 on 2026-09-22 (D2, D3, D6 as recommended).
- T02: message_receipts table; kind/expires_at/supersedes_id on
agent_messages; migration d7e8f9a0b1c2 archives existing broadcasts,
leaves direct messages untouched, reversible.
- T03: reader-aware mark-read (unattributed broadcast mark-read is a
metered, deprecated no-op), delivery receipts on the scoped unread inbox,
POST /messages/{id}/ack, news/standing kinds, expiry, supersede, broadcast
archive no longer stamps read_at, reply writes the replier's receipt.
- T04 (state-hub part): Codex MCP reader param and acknowledge_notice;
hub-core part handed off (message 69fc387c).
- T05: GET /messages/notices, standing_notices in /state/summary,
dashboard standing-notices panel.
- T06: 17 new tests; full suite green.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 63291@bnt-lap001
Assistant-Session: 8bd77868-ca68-4f49-bb1e-d539ecc0d703
This commit is contained in:
parent
740068fcf1
commit
ef541f58cf
18 changed files with 1256 additions and 52 deletions
|
|
@ -10,6 +10,7 @@ from __future__ import annotations
|
|||
import json
|
||||
import os
|
||||
from typing import Any
|
||||
from urllib.parse import quote
|
||||
|
||||
import httpx
|
||||
from fastmcp import FastMCP
|
||||
|
|
@ -59,9 +60,22 @@ def get_messages(to_agent: str, unread_only: bool = True) -> str:
|
|||
|
||||
|
||||
@mcp.tool()
|
||||
def mark_message_read(message_id: str) -> str:
|
||||
"""Mark one coordination message as read."""
|
||||
return _json(_request("PATCH", f"/messages/{message_id}/read", {}))
|
||||
def mark_message_read(message_id: str, reader: str | None = None) -> str:
|
||||
"""Mark one coordination message as read.
|
||||
|
||||
Pass ``reader`` (your repository slug) so a broadcast is marked read for
|
||||
you only; without it a broadcast stays visible and the call is deprecated.
|
||||
"""
|
||||
path = f"/messages/{message_id}/read"
|
||||
if reader:
|
||||
path += f"?reader={quote(reader, safe='')}"
|
||||
return _json(_request("PATCH", path, {}))
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def acknowledge_notice(message_id: str, agent: str) -> str:
|
||||
"""Acknowledge a standing notice after acting on it (clears it for ``agent``)."""
|
||||
return _json(_request("POST", f"/messages/{message_id}/ack", {"agent": agent}))
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue