From 0baa2eca867c25ca764099b22f1c353cf7a4cfaf Mon Sep 17 00:00:00 2001 From: ajspig Date: Tue, 10 Mar 2026 18:10:07 -0400 Subject: [PATCH] chore: cr updates --- docs/v3/guides/granola.mdx | 1 + examples/granola/honcho_granola.py | 34 ++++++++++++++++++++++++++---- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/docs/v3/guides/granola.mdx b/docs/v3/guides/granola.mdx index 5787a400..ebf80b83 100644 --- a/docs/v3/guides/granola.mdx +++ b/docs/v3/guides/granola.mdx @@ -89,6 +89,7 @@ The summary is attributed to you because it's *your* record of what happened. Gr ## Querying After Import ```python +import os from honcho import Honcho honcho = Honcho(workspace_id="granola", api_key=os.environ["HONCHO_API_KEY"]) diff --git a/examples/granola/honcho_granola.py b/examples/granola/honcho_granola.py index 32762373..8f3922cd 100644 --- a/examples/granola/honcho_granola.py +++ b/examples/granola/honcho_granola.py @@ -530,7 +530,26 @@ def parse_participants(participants_str: str) -> ParsedParticipants: if not participants_str: return result - for entry in re.split(r",\s*(?=[A-Z])", participants_str): + # Split on commas, but not commas inside angle brackets (e.g. email fields). + entries: list[str] = [] + current: list[str] = [] + depth = 0 + for ch in participants_str: + if ch == "<": + depth += 1 + current.append(ch) + elif ch == ">": + depth = max(depth - 1, 0) + current.append(ch) + elif ch == "," and depth == 0: + entries.append("".join(current)) + current = [] + else: + current.append(ch) + if current: + entries.append("".join(current)) + + for entry in entries: entry = entry.strip() if not entry: continue @@ -664,6 +683,7 @@ def sanitize_content(text: str) -> str: return text + def to_honcho_peer_id(value: str, fallback: str = "peer") -> str: """Normalize user-provided identifiers into a Honcho-safe peer ID.""" normalized = value.strip().lower() @@ -877,8 +897,9 @@ async def main(): m.update(details) if extract_summary_from_meeting(m): fetched_summary = True - except Exception: - pass + except Exception as exc: + m["detail_fetch_failed"] = True + print(f" ⚠ Failed to fetch details for {mid}: {exc}") if fetched_transcript and fetched_summary: print(f" [{i}/{len(meetings)}] transcript+summary: {title}") @@ -972,7 +993,12 @@ async def main(): continue creator_email = creator["email"] if creator else None - me_source = creator_email or "abigail@plasticlabs.ai" + creator_name = creator.get("name") if creator else None + me_source = creator_email or creator_name + if not me_source: + print(" -> Skipped (no creator identifier)") + results["skipped"] += 1 + continue me_peer_id = to_honcho_peer_id(me_source) # ---- Register note creator peer ----