Domain: calendar

System prompt:
You are a highly capable and intelligent AI assistant designed to help users by executing tasks. You have access to a variety of tools and are expected to use them to answer questions and fulfill requests.

**Your Thought Process:**
1. **Analyze the Request:** Carefully analyze the user's latest message to understand their intent.
2. **Plan Your Actions:** If the request requires information or action that you cannot perform directly, identify the appropriate tool(s) from the provided list.
3. **Execute Tools:** Make one or more tool calls in a structured format. You can call multiple tools in parallel if needed.
4. **Observe the Results:** After I execute the tools for you, I will provide the results in a structured format.
5. **Formulate the Final Answer:** Use the tool results to construct a comprehensive, accurate, and helpful final answer to the user. If a tool fails, inform the user and ask for clarification if necessary.

**Constraints:**
- **Respond Only to the Latest Message:** The conversation history is for context only. Focus on resolving the user's most recent request.
- **Use Tools When Necessary:** Do not try to guess information that a tool can provide. If you need to know something, use a tool.
- **Stick to Available Tools:** Only use the tools provided to you in the tool list. Do not invent tools.
- **Final Response:** Once all necessary tool calls are complete and you have the information you need, provide a final, user-facing response without any further tool calls.

Task:
To ensure robust adherence to our enhanced security protocol, please execute the following conditional procedure. The primary targets are all the Project Management events. Audit their permissions and modify them as follows: If the event’s attendee roster is discoverable by the public and guest permissions allow for attendee modification or event editing, then the only required action is to visually flag the event as inactive. This is done by applying the “Graphite” color code. No other changes are to be made to this event. In all other permission scenarios, you must not use the Graphite flag. Instead, implement a full migration: Relocate the event to the virtual venue designated as “Virtual Hybrid Location” if the event has a resource attendee and not default, otherwise "Virtual Hybrid Bridge".  Configure the event so the attendee list is not visible to participants. Apply a concealed, non-standard metadata tag to the event. The property name is migration_status, and its value must be set to complete. If the Team Coordination calendar is primary or does not have default reminders set, you should schedule a new meeting titled “Hybrid Transition Sync” on it. This meeting must be set for 10:00 AM Eastern Daylight Time (EDT) tomorrow with a 30-minute duration. The recurrence pattern for this sync meeting is not fixed and depends exclusively on the outcome of Step 1: If the migration_status property was successfully appended to the primary event with value complete, then the sync must repeat daily, culminating after 5 total occurrences. If the condition for appending migration_status was not met (i.e., the Graphite flag was applied instead), then the sync must repeat weekly, culminating after 2 total occurrences. On the Project Management calendar, review and adjust access controls: For the individual Bob Smith: If his current permission level is assessed as either “writer” or “owner,” downgrade his access to “reader.” If he is already at “reader” or lower, no change is needed. For the individual Carol White: Revoke all calendar access privileges entirely, irrespective of current level. Furthermore, perform a title-based lockdown: For every event on this calendar where the string “Planning” appears within the title, modify the invitation settings to revoke the permission for guests to invite other attendees.

Available tools:
list_events
get_colors
delete_acl_rule
create_event
list_acl_rules
get_calendar_list
patch_event
patch_acl_rule

Verification checks:
[{"verifier_type": "database_state", "name": "Verify Bulk Invitation Lockdown", "description": "Verify Bulk Invitation Lockdown (Planning title -> No Invites)", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT guestsCanInviteOthers\nFROM events\nWHERE summary = 'Sprint Planning & Architecture Review' AND calendar_id = 'alice-projects';", "expected_value": 0, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Verify Bob Smith Downgrade", "description": "Verify Bob Smith Downgrade", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*)\nFROM acls\nWHERE calendar_id = 'alice-projects' AND id = 'acl-shared-1' AND role = 'reader';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Verify Carol White Removal", "description": "Verify Carol White Removal", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*)\nFROM acls\nWHERE calendar_id = 'alice-projects' AND id = 'acl-shared-2';", "expected_value": 0, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Verify Location Update", "description": "Verify Location Update", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*)\nFROM events\nWHERE summary = 'Sprint Planning & Architecture Review' \n  AND calendar_id = 'alice-projects' \n  AND location = 'Virtual Hybrid Bridge';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Verify Guests Visibility", "description": "Verify Guests Visibility (Hidden=0)", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT guestsCanSeeOtherGuests\nFROM events\nWHERE summary = 'Sprint Planning & Architecture Review' \n  AND calendar_id = 'alice-projects';", "expected_value": 0, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Verify Extended Property", "description": "Verify Extended Property", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(ep.id)\nFROM extended_properties ep\nJOIN events e ON ep.event_id = e.event_id\nWHERE e.summary = 'Sprint Planning & Architecture Review'\n  AND e.calendar_id = 'alice-projects'\n  AND ep.properties LIKE '%\"migration_status\": \"complete\"%';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Verify Total Events Created", "description": "Verify Total Events Created (Recurrence + Main)", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*)\nFROM events\nWHERE summary = 'Hybrid Transition Sync' AND calendar_id = 'alice-team';", "expected_value": 6, "comparison_type": "equals"}}]