Repository navigation
Description
Problem
The CLI already advertises cohost management, but its direct-add path does not complete Partiful's cohost invitation/acceptance lifecycle.
Current implementation:
partiful cohosts add <event-id> --name "Alex Smith"
partiful cohosts add <event-id> --user-id <partiful-user-id>--name resolves against /getContacts, then the CLI PATCHes cohostIds directly on the Firestore event document. There are no dedicated cohost tests.
Observed failure:
- Created an event and added an existing Partiful contact as cohost through the CLI.
- CLI and a raw backend read both reported that user's ID in
cohostIds. - The recipient received no cohost invitation.
- In the recipient's Partiful UI, the event still listed only the creator under Hosted by. The recipient appeared as a regular guest and could only edit their RSVP.
- Re-running the command returned
No new co-hosts to add, leaving the CLI unable to repair the state.
This is a false-success bug. Writing cohostIds directly is not sufficient, or the CLI is missing another required invitation/acceptance step.
Partiful UI behavior to support
The mobile UI exposes cohost management in two places:
- Event create/edit screen: Hosted by → Add cohosts
- Event settings: Hosts → Add cohost and Add Cohost Via Link
There are two distinct workflows:
- Add a person directly by selecting an existing Partiful contact, searched by name.
- Enable/copy a cohost invite link and share it through any channel, such as iMessage.
Phone number lookup should not be assumed. Partiful's contact data currently exposes names and user IDs, not phone numbers.
Proposed CLI shape
Exact naming can follow API discovery, but the capabilities should be clear:
# Existing direct-contact path, fixed to use the canonical Partiful lifecycle
partiful cohosts add <event-id> --name "Alex Smith" --dry-run
# Link lifecycle
partiful cohosts link <event-id> --dry-run
partiful cohosts link <event-id> --enable
partiful cohosts link <event-id> --disableThe Partiful CLI should return the invite URL, not own channel-specific delivery. The Partiful skill can then send it through iMessage or another approved messaging tool.
Acceptance criteria
- Reverse-engineer the network calls/state changes behind both mobile UI workflows.
- Replace the raw
cohostIds-only write with Partiful's canonical direct-add/invite flow. - Direct add resolves an exact Partiful contact name safely.
- Ambiguous partial-name matches fail closed and show candidates rather than selecting the first match.
- An unresolved name is a command failure, not a warning followed by apparent success.
- Re-running direct add can detect and repair a stale
cohostIds-only state. - Add commands to inspect, enable/create, return, and disable the cohost invite link.
-
--dry-runperforms read-only validation and clearly reports intended actions. - Output distinguishes invited/pending/accepted states if Partiful exposes them.
- Add unit/orchestration tests for direct add, ambiguous names, unresolved names, stale state repair, link lifecycle, and no-op behavior.
- Run a live end-to-end test with a second account: recipient gets the expected invite or link, accepts it, appears under Hosted by, and receives host controls.
- Update schema/help output for every new or changed command.
- Update
skills/partiful/references/guests-invitations-and-cohosts.mdwith both workflows and approval rules. - Surface cohost management from the Partiful skill's event-management route as well as the guest/invitation route.
- Update event-management docs/examples for adding cohosts during create/update.
Existing work
- [P2] Co-host management #24 introduced cohost management.
- feat: add co-host management (#24) #46 implemented the current
cohosts list/add/removecommands and--cohostevent flags.
This issue extends that work rather than replacing the command family.
Activity
fix(cohosts): use canonical invitation lifecycle (#75)