Skip to content

[feature] MCP external-analysis surface: recording-level write-back for external AI analysts - #229

Merged
YJack0000 merged 1 commit into
mainfrom
feat/mcp-external-analysis-surface
Aug 14, 2026
Merged

YJack0000 merged 1 commit into
mainfrom
feat/mcp-external-analysis-surface

Conversation

@YJack0000

Copy link
Copy Markdown
Contributor

What this changes

Adds the MCP write-back surface that lets an external AI analyst (e.g. a Claude Code session) own the analysis of saved recordings while Parley stays the capture/transcribe/replay layer:

  • update_recording_meta — patch a saved recording's frame by id: meetingType (scenario id), meetingContext, and speakerNames (merged per key; empty string removes a custom name). This is the repair path for a misclassified meeting (e.g. an office hour analyzed as a sales call) or a wrong me/them speaker mapping.
  • set_recording_analysis — replace whole analysis fields on a saved recording by id: findings, actionItems, brief (markdown debrief), and the analyzed flag. Omitted fields stay untouched; payloads are normalized by the frontend before hitting disk; the open replay syncs immediately; cloud push rides the existing lifecycle.
  • list_recordings gains a since filter (createdAt >= epoch ms) and the summary cards now mirror the entry's analyzed flag, so an external analyst can poll cheaply for new, not-yet-analyzed recordings.
  • TimelineEvent gains author (which analyst wrote a marker — external passes stamp e.g. "claude", Parley's own pass omits it) and quotes. quotes was already advertised in the MCP finding schema but missing from the TS type, so quotes sent by MCP clients were silently dropped by normalizeFinding — fixed.
  • get_recording additionally returns analyzed, companyId, threadId.

Both new tools ride the existing call_frontend RPC so writes go through the frontend's read-modify-write + cloud-sync path (same as rename_recording), never raw file writes behind the app's back.

Why

The external-AI analysis loop (transcribe in Parley → analyze in an AI app over MCP → write conclusions back) currently dead-ends at write-back: findings tools only touch the loaded session, and meeting type / speaker mapping / brief / action items are read-only over MCP. In practice Parley's built-in pass can misread a meeting (a mentoring office hour classified as sales, the user mapped to them-1) with no way to correct it from outside.

How it was verified

  • bunx tsc --noEmit passes
  • bunx vitest run passes (330 tests)
  • cargo check + cargo clippy clean in src-tauri
  • Ran the app (bun run tauri dev) and exercised the change
  • Added or updated tests
  • Added new user-facing strings to both zh-TW and en in src/i18n/messages.ts (no user-facing strings — MCP surface only)

End-to-end exercise against a real recording (rename + meta fix + external findings/brief write on an existing office-hour recording) planned right after this lands in a release build.

…recording_analysis + list_recordings since/analyzed + finding author/quotes

外部 AI 分析迴圈的寫回面:
- update_recording_meta:改任意已存錄音的 meetingType / meetingContext / speakerNames(per-key 合併,空字串移除),修正誤判的會議類型與 me/them 對映
- set_recording_analysis:以 id 全量替換 findings / actionItems、寫 brief、標 analyzed;經前端 normalize 後落盤 + 雲端同步,載入中的 replay 即時反映
- list_recordings 加 since(createdAt >= ms)過濾;summary 卡帶 analyzed 旗標,外部分析者可便宜輪詢新錄音
- TimelineEvent 加 author(外部 pass 署名)與 quotes(原本 schema 有宣告但型別缺欄位,寫入被靜默丟棄的 bug 一併修掉)
- get_recording 回傳補 analyzed / companyId / threadId
@YJack0000
YJack0000 merged commit 29b198e into main Aug 14, 2026
@YJack0000
YJack0000 deleted the feat/mcp-external-analysis-surface branch August 14, 2026 08:56
@sonarqubecloud

Copy link
Copy Markdown

YJack0000 added a commit that referenced this pull request Aug 17, 2026
The site and the README were still selling three subsystems that shipped
their last release weeks ago — the live intelligence board, the accounts
mini-CRM, and live voice translation — while the thing that actually grew,
the MCP server, got one code block and three bullet points.

Both are rewritten around where the app converged in v0.22.14–v0.22.18:
record, transcribe, analyze, search, and an MCP surface wide enough that an
external agent can own the library, including the analysis.

website/index.html
- Hero, metadata, OG/Twitter cards and JSON-LD rewritten around the record +
  MCP story instead of real-time coaching. Pre-flight is gone from the
  workflow steps; meeting context replaces the meeting-type picker.
- The MCP section grows from one code block to all 48 tools in five groups,
  each name checked against src-tauri/src/mcp.rs, plus the auto-analyze-off
  handover flow that #230 and #229 built.
- The iPhone section gets the real App Store link (id6795031201). Android is
  described honestly as built and syncing but not on Play yet.
- Footer regrouped into Product / Project / Legal & support; account deletion
  moves out of the top-level nav into Legal (the /account-deletion/ URL is
  unchanged — Play requires it to stay reachable).
- Pathors is de-emphasised: the nav link and the "A Pathors AI open source
  project" line are gone, the JSON-LD Organization graph collapses to a single
  author field, and the open-source section explains the origin without
  leaning on the brand.

website/{privacy,support,account-deletion}
- English-only, per the repository convention. lang was zh-Hant with an
  "English summary" appended; now there is one language and no duplication.
- Support gains three desktop entries that did not exist before: a failed
  system-audio tap, an MCP client that cannot connect, and analysis not
  running because auto-analyze is off.

README.md
- Drops the live-translation section, the Gemini-key install step and the
  virtual-mic build step. Adds the MCP server as a first-class section with
  the tool table and the external-analyst flow.

showcase-accounts.png is deleted: it pictures the accounts mini-CRM removed
in #245 and nothing referenced it any more.

Note that the remaining desktop screenshots predate the removals — hero still
shows the intel board — and need a reshoot in a follow-up.
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