8000 feat(circles): let a circle see when you're free, and find a time by adeelahmad · Pull Request #661 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(circles): let a circle see when you're free, and find a time - #661

Merged
adeelahmad merged 3 commits into
mainfrom
claude/project-thread-97gkhw
Oct 19, 2026
Merged

adeelahmad merged 3 commits into
mainfrom
claude/project-thread-97gkhw

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: circles could share items and run sharing rules, but nobody's agent could find out when family members were free, so finding a time for a call meant asking each person.

After: turn on They can see when you're free on a circle (lets: ["free_busy"]). Its people, or their agents, ask POST /api/v1/circles/when-free, MCP when_free or the assistant for a window of up to 31 days, and get each person's busy times (start and end only, never what, where or with whom) plus the free stretches when everyone is free, within the hours of the day asked for. Each ask shows in the asked person's timeline as agent.asked.

How: domain/circles_ask.py gathers the calendar events a person organises or is invited to, plus every event in a namespace they alone belong to, skipping vaults, and merges busy intervals per person; free stretches are the gaps in the union. No model is called. circles_ask loads at the end of circles.py so either module can import first.

Motivation and Context

Part of the agent family network (agents find times and schedule calls for each other), the third of the saved circles PRs after #626, #649 and #653.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it in changelog.d/circles-when-free.md.

Done questions (AGENTS.md)

  • Goal: agents find a time that suits everyone in a circle; merged on green CI.
  • Agents: API POST /api/v1/circles/when-free, MCP when_free, assistant when_free.
  • Zero setup: nothing new to install or configure.
  • Fewest clicks: one toggle on a circle; asking needs only the people and a window.
  • Configurable: the circle's lets is set in the web app and API; off by default.
  • Light: interval maths over stored events, no model or new service.
  • Private and secure: only start and end leave, never from a vault, only when the person turned it on; threat model gains P-FREE-BUSY.
  • Cost: no model call.
  • User decides: nothing is shared until the person lets a circle see it; defaults unchanged.
  • Upgrades: n/a, lets defaults to empty on existing circles, so nothing changes until turned on.
  • Honest: docs label it built; asking someone's agent stays planned.
  • Tests (test_when_people_are_free), docs and the generated client (make openapi) updated.
  • Open standards: reads iCalendar-derived events; no new dependency.
  • Reported in the project thread; refine later: count every occurrence of a repeating event (docs/circles.md).
  • Reuse: reuses calendar events, circles and the timeline's activity log.

Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012v8sNShSVTXxoPDab62A1L
… module imports first

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012v8sNShSVTXxoPDab62A1L
@adeelahmad
adeelahmad merged commit 747ff36 into main Oct 19, 2026
12 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-97gkhw branch October 19, 2026 03:47
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.

2 participants

0