ubiquitous-invention/apps/web
Randall Stillwell fc2235a346 feat(agent-runs): capture client + model identity on claim/complete
Adds level-B agent attribution: every MCP tool call can identify itself
with a `client` (e.g. cursor-ide, codex, echodo-orchestrator) and `model`
(e.g. claude-4.6-sonnet) string. Both optional, both stored in
agent_runs.metadata as JSONB so the schema doesn't move.

- claim_task: new optional `client` + `model` args. Written into the
  inserted agent_runs row's metadata, and mirrored into the audit log
  entry. On idempotent re-claim, incoming values are merged into
  existing metadata (existing keys override only when explicit), so a
  mid-session model switch updates attribution without losing earlier
  context.
- complete_task: same optional args, with merge-on-close semantics —
  late-bound values override the earlier claim's values so the run row
  reflects whichever model actually closed the session. Audit row also
  carries the merged identity.
- /settings/runs UI: stack the client/model under the actor name in the
  table so attribution is visible at a glance without adding a column.

Smoke-tested: claim with {cursor-ide, claude-4.6-sonnet} then complete
with only model={claude-4.6-sonnet-medium-thinking} yields final
metadata {client: cursor-ide, model: claude-4.6-sonnet-medium-thinking}
on both the run row and the task.completed audit entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 10:11:35 -05:00
..
app feat(agent-runs): capture client + model identity on claim/complete 2026-06-03 10:11:35 -05:00
components feat(runs): agent_runs table + tRPC router + settings UI 2026-06-02 22:16:04 -05:00
lib feat(security): in-process rate limit for sign-in and invite creation 2026-06-02 13:26:19 -05:00
public docker: ensure apps/web/public exists so web runtime COPY succeeds 2026-04-27 14:46:47 -05:00
server feat(backlog): workflow_prompt with task → epic → plan inheritance 2026-06-02 22:18:18 -05:00
styles feat: Full project management application scaffold 2026-03-26 22:39:16 -05:00
eslint.config.mjs chore(lint+types): green pnpm lint && pnpm type-check from a clean clone 2026-06-02 00:11:52 -05:00
middleware.ts feat: Full project management application scaffold 2026-03-26 22:39:16 -05:00
next-env.d.ts feat: Full project management application scaffold 2026-03-26 22:39:16 -05:00
next.config.ts fix(web): import @tasks/ai via workspace alias instead of relative path 2026-04-27 12:57:27 -05:00
package.json feat(web): wire AI chat page to streaming /api/chat handler 2026-06-02 00:23:21 -05:00
postcss.config.mjs feat: Full project management application scaffold 2026-03-26 22:39:16 -05:00
tailwind.config.ts feat: Full project management application scaffold 2026-03-26 22:39:16 -05:00
tsconfig.json feat: Full project management application scaffold 2026-03-26 22:39:16 -05:00