Skip to content

One-click answers about an event, per reader and shared, on django-ag-ui 0.95.0 and WC 0.21.0 - #174

Draft
Artui wants to merge 6 commits into
mainfrom
gallery/answers
Draft

Artui wants to merge 6 commits into
mainfrom
gallery/answers

Conversation

@Artui

@Artui Artui commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

One-click answers about a board event, per reader and shared, on the floors that serve them.

Floors (e7c5907)

  • django-ag-ui[specs,harness,mcp]>=0.95.0 (answers mounts and shared skills), django-spec-agents>=0.33.0 (what 0.95.0 requires); uv.lock names 0.95.0 and 0.33.0.
  • The four frontends' range is >=0.21.0 <1.0.0; each pnpm lock names 0.21.0.
  • Host opt-ins between WC 0.18.0 and 0.21.0: the Svelte German strings table gains the seven toolPayload* keys from 0.19.0, which show on every tool card. Nothing else is owed. The connectors panel and its approval box need data-connectors-url, and the approval form needs approveWithEdits; no frontend sets either.
  • Angular's production budget rises from 1.2/1.3 MB to 1.4/1.5 MB (warning/error). The initial bundle is 1.34 MB with WC 0.21.0, and the README says so.

Answers

  • backend/agent/answers_server.py, two mounts, neither in AgentsDirectory:
    • answers/ (id="answers", store scoped answers): explain-event, per reader. Its gate is list_events(user=...) and its version is Event.updated_at. Its tools are list_events (a readOnlyHint selector) and week_overview, which is named in read_only_tools.
    • answers/team/ (id="team-answers", no tools): event-brief, a shared skill.
      • shared_subject returns the event's public fields (title, day, hour, duration, room).
      • The reader gate admits the owner or a member of the owner's organisation.
      • can_regenerate requires board.change_event.
      • It runs anonymously, with no shared_user.
      • It has no tools, because the only read tool is user-scoped and would always fail under AnonymousUser, leaving every brief degraded.
  • react/src/board/EventCard.tsx: a selected card shows "Explain" and "Team brief" <ag-ui-answer> elements, with version set to updated_at. The Vite dev server proxies /answers.
  • An offline scripted answer model serves both skills when no DEMO_MODEL is set.

Tests (backend/tests/test_answers.py, 12)

  • An explain answers, and a reload runs nothing.
  • A moved event makes the next explain and the next brief each a new run.
  • No answer thread appears in agents-home/inbox/ or agent/threads/, checked over HTTP.
  • The explain run is offered no write tool, and the brief run is offered no tools.
  • Two readers of a brief cost one run.
  • A shared run whose tool always fails is still stored once, with degraded: true.
  • A refused reader gets 404 on GET, POST and events/, and starts no run.
  • An owner outside every organisation reads their own brief.
  • subject=² answers 404, not 500.

Every test was falsified by mutation. Against main, the whole module fails at import, which does not count as a falsification.

Review

  • reviewer at 301586f found 2 blocking items: an untested per-reader gate, and list_events reaching the shared run. Both are fixed in 5e7b9cb, along with the follow-ups.
  • reviewer-delta at 5e7b9cb: ready, nothing new.
  • pytest: 217 passed. pnpm build passes in all four apps.
  • Checked in the React app with a freshly seeded database, as the demo user and the member user:
    • Explain shows an answer. After a reload, opening it again sends one GET that answers 200, and no run starts.
    • After the event moved to Tuesday 08:00, Explain sends a GET (404) and a POST, and answers with the new time.
    • Team brief: the owner's open makes one run, owned by shared:team-answers. The member's GET answers the same thread and text, with can_regenerate false. Five run logs before, five after. The member cannot open the per-reader explain (404).
    • The member's board lists only their own events, so the member's brief was opened from an element mounted by hand in their page.
  • eeba874 gives the team mount its own URL namespace. Django's check warned urls.W005 with both mounts on answers, and a test now fails on that warning.
  • Layout note: the answer tray hangs inside the week grid's scroll box. Near the bottom or right edge it scrolls into view rather than overflowing the grid.

Still to come (draft until then)

READ-ARGS-ADOPT-GALLERY waits on django-admin-agent 0.66.0 reaching PyPI. Then the admin floor rises to it, after confirming it vendors WC 0.21.0, and uv lock --upgrade-package django-spec-agents django-ag-ui django-admin-agent runs.

🤖 Generated with Claude Code

Artui and others added 6 commits December 2, 2026 22:44
The transport release serves answer cards, shared skills included; the
runtime moves to 0.33.0, the floor it requires. The four frontends' ranges
take the web component release that follows a shared answer.

Host opt-ins between 0.18.0 and 0.21.0: the Svelte app's German strings
table gains the seven tool-card payload strings 0.19.0 added, which show on
every tool card. Nothing else is owed: the connectors panel, its approval
box and their strings need data-connectors-url, the approval form needs
approveWithEdits, and no frontend sets either; compact step groups and
filled summary templates need no setting. Angular's budget rises by 0.1 MB
for the larger element.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An answers mount at /answers/, kept out of the agents directory, with two
skills over read tools only (list_events, week_overview): explain-event, the
reader's own answer about one of their events, and event-brief, one shared
answer per event and version for the owner's organisation, built from the
event's public fields and regenerable by whoever may change events. The
offline model gets its own scripted answer path. The React board's selected
card offers both through <ag-ui-answer>, versioned by the row's updated_at.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he degraded answer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without it, pnpm dev answers /answers/ with the app's own page and the
answer element draws its failed state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…owner tests

The shared brief had the read tools but runs as AnonymousUser, so every
brief with a real model would be stored degraded. It now has its own
mount with no tools. Also: a superscript subject is a 404, and the
README and urls docstring name the mount.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Both answers mounts took the library's default namespace, so Django's
system check warned (urls.W005) and one of them could not be reversed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant