chore: cr updates

This commit is contained in:
ajspig 2026-03-10 18:10:07 -04:00
parent 574364b0bb
commit 0baa2eca86
2 changed files with 31 additions and 4 deletions

View File

@ -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"])

View File

@ -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 ----